mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
feat: add LSP server status display UI with dialog list (#154)
* feat: add LSP server status display Co-authored-by: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com>
This commit is contained in:
1 parent
5746033fde
commit
a77d9e0371
11 files changed
+743
-2
No files matched your search
@@ -13,8 +13,10 @@ type ShellRequest = NonNullable<paths['/session/{sessionID}/shell']['post']['req
|
||||
type AgentListResponse = paths['/agent']['get']['responses']['200']['content']['application/json']
|
||||
type QuestionListResponse = paths['/question']['get']['responses']['200']['content']['application/json']
|
||||
type SendPromptResponse = paths['/session/{sessionID}/message']['post']['responses']['200']['content']['application/json']
|
||||
type LspStatusResponse = paths['/lsp']['get']['responses']['200']['content']['application/json']
|
||||
type LspStatus = LspStatusResponse[number]
|
||||
|
||||
export type { SendPromptResponse }
|
||||
export type { SendPromptResponse, LspStatus }
|
||||
|
||||
export class OpenCodeClient {
|
||||
private baseURL: string
|
||||
@@ -121,6 +123,12 @@ export class OpenCodeClient {
|
||||
})
|
||||
}
|
||||
|
||||
async getLSPStatus() {
|
||||
return fetchWrapper<LspStatusResponse>(`${this.baseURL}/lsp`, {
|
||||
params: this.getParams(),
|
||||
})
|
||||
}
|
||||
|
||||
async updateConfig(config: Partial<ConfigResponse>) {
|
||||
return fetchWrapper<ConfigResponse>(`${this.baseURL}/config`, {
|
||||
method: 'PATCH',
|
||||
|
||||
Reference in new issue
Block a user