Add @ mention support for agents and files, extract CopyButton component

This commit is contained in:
Chris Scott committed 2025-12-06 11:21:06 -08:00
1 parent 3e31dbcdf8
commit dc7964021d
11 files changed
+306 -99

No files matched your search

+6
View File
@@ -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