支持部分agent实时更新上下文用量信息

This commit is contained in:
xintaofei
2026-03-08 23:48:47 +08:00
parent 53186c4ab5
commit 2b4f00484d
7 changed files with 116 additions and 3 deletions

View File

@@ -402,6 +402,11 @@ export interface AvailableCommandInfo {
input_hint?: string | null
}
export interface SessionUsageUpdateInfo {
used: number
size: number
}
// ACP events pushed from Rust backend (discriminated by "type" field)
export type AcpEvent =
| { type: "content_delta"; connection_id: string; text: string }
@@ -481,6 +486,12 @@ export type AcpEvent =
connection_id: string
commands: AvailableCommandInfo[]
}
| {
type: "usage_update"
connection_id: string
used: number
size: number
}
// Connection info returned by acp_list_connections
export interface ConnectionInfo {