mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
Fix compact command validation flow (#28)
* feat: Implement /compact command with processing feedback - Add 'compact' status type to session status store - Update SessionStatusIndicator to show purple pulsing animation for compaction - Add summarizeSession() API method to OpenCode client - Modify command handler for /compact to: - Get current model from state - Show compaction toast - Set session to compacting status - Call summarize endpoint with provider/model - Update SSE handler to clear compact status on session.compacted event The user sees a purple animated indicator and 'Compacting' text during the operation, matching the TUI experience. * Fix compact command to use break instead of return for model validation --------- Co-authored-by: Chris Scott <chris@cstech.dev>
This commit is contained in:
1 parent
516a894627
commit
a9ebee72c4
5 files changed
+47
-7
No files matched your search
@@ -82,6 +82,14 @@ export class OpenCodeClient {
|
||||
return response.data
|
||||
}
|
||||
|
||||
async summarizeSession(sessionID: string, providerID: string, modelID: string) {
|
||||
const response = await this.client.post(`/session/${sessionID}/summarize`, {
|
||||
providerID,
|
||||
modelID
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
async getConfig() {
|
||||
const response = await this.client.get<ConfigResponse>('/config')
|
||||
return response.data
|
||||
|
||||
Reference in new issue
Block a user