mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
Add @ mention support for agents and files, extract CopyButton component
This commit is contained in:
1 parent
3e31dbcdf8
commit
dc7964021d
11 files changed
+306
-99
No files matched your search
@@ -10,6 +10,7 @@ type ConfigResponse = paths['/config']['get']['responses']['200']['content']['ap
|
||||
type CommandListResponse = paths['/command']['get']['responses']['200']['content']['application/json']
|
||||
type CommandRequest = NonNullable<paths['/session/{id}/command']['post']['requestBody']>['content']['application/json']
|
||||
type ShellRequest = NonNullable<paths['/session/{id}/shell']['post']['requestBody']>['content']['application/json']
|
||||
type AgentListResponse = paths['/agent']['get']['responses']['200']['content']['application/json']
|
||||
|
||||
export class OpenCodeClient {
|
||||
private client: AxiosInstance
|
||||
@@ -121,6 +122,11 @@ export class OpenCodeClient {
|
||||
return result.data
|
||||
}
|
||||
|
||||
async listAgents() {
|
||||
const response = await this.client.get<AgentListResponse>('/agent')
|
||||
return response.data
|
||||
}
|
||||
|
||||
getEventSourceURL() {
|
||||
const base = this.baseURL.startsWith('http')
|
||||
? this.baseURL
|
||||
|
||||
Reference in new issue
Block a user