feat(tui): add agent picker and agents list rpc
This commit is contained in:
@@ -57,6 +57,16 @@ export type GatewaySessionList = {
|
||||
}>;
|
||||
};
|
||||
|
||||
export type GatewayAgentsList = {
|
||||
defaultId: string;
|
||||
mainKey: string;
|
||||
scope: "per-sender" | "global";
|
||||
agents: Array<{
|
||||
id: string;
|
||||
name?: string;
|
||||
}>;
|
||||
};
|
||||
|
||||
export type GatewayModelChoice = {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -165,9 +175,14 @@ export class GatewayChatClient {
|
||||
activeMinutes: opts?.activeMinutes,
|
||||
includeGlobal: opts?.includeGlobal,
|
||||
includeUnknown: opts?.includeUnknown,
|
||||
agentId: opts?.agentId,
|
||||
});
|
||||
}
|
||||
|
||||
async listAgents() {
|
||||
return await this.client.request<GatewayAgentsList>("agents.list", {});
|
||||
}
|
||||
|
||||
async patchSession(opts: SessionsPatchParams) {
|
||||
return await this.client.request("sessions.patch", opts);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user