mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
feat(assistant): self-configuring assistant mode (#244)
* test(backend): replace better-sqlite3 test mock with node:sqlite Reimplement the bun:sqlite test mock on top of node:sqlite with an explicit BEGIN/COMMIT/ROLLBACK transaction wrapper. * feat(assistant): self-configuring assistant mode Add a self-editable assistant workspace and the APIs that support it: - POST /assistant/reload disposes and re-bootstraps the assistant instance (directory-scoped, rate-limited) so agent.md edits apply. - Internal settings API accepts non-secret TTS/STT patches via dedicated partial schemas. - Strip the generated agent persona from opencode.json on repair so user-customized agents are preserved across config recovery. - Cache the last assistant session id to avoid redundant session listing on launch. * style(repo): align worktree and workspace tabs with primary/orange theme
This commit is contained in:
1 parent
eedbbfb94e
commit
dbd6866682
22 files changed
+733
-156
No files matched your search
@@ -3,6 +3,9 @@ import { fetchWrapper, fetchWrapperVoid } from './fetchWrapper'
|
||||
|
||||
type SessionListResponse = paths['/session']['get']['responses']['200']['content']['application/json']
|
||||
type SessionResponse = paths['/session/{sessionID}']['get']['responses']['200']['content']['application/json']
|
||||
type SessionListParams = NonNullable<paths['/session']['get']['parameters']['query']> & {
|
||||
roots?: boolean
|
||||
}
|
||||
type CreateSessionRequest = NonNullable<paths['/session']['post']['requestBody']>['content']['application/json']
|
||||
type MessageListResponse = paths['/session/{sessionID}/message']['get']['responses']['200']['content']['application/json']
|
||||
type SendPromptRequest = NonNullable<paths['/session/{sessionID}/message']['post']['requestBody']>['content']['application/json']
|
||||
@@ -67,9 +70,9 @@ export class OpenCodeClient {
|
||||
return { ...params, directory: this.directory }
|
||||
}
|
||||
|
||||
async listSessions() {
|
||||
async listSessions(params?: SessionListParams) {
|
||||
return fetchWrapper<SessionListResponse>(`${this.baseURL}/session`, {
|
||||
params: this.getParams(),
|
||||
params: this.getParams(params),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user