feat(chat): 完善运行状态与权限交互

This commit is contained in:
2026-08-06 18:41:53 +08:00
parent 8d7c947897
commit 9e75e2df8a
21 changed files with 1025 additions and 226 deletions
+4 -3
View File
@@ -8,8 +8,9 @@ const getAgentSessionUrl = (sessionId: string, suffix = "") =>
export type AgentModel = string;
export type PermissionReply = "once" | "always" | "reject";
export type AgentApprovalMode = "request" | "always";
export type PermissionDecision = "once" | "always" | "reject";
export type PermissionReply = PermissionDecision;
export type AgentApprovalMode = "request" | "auto" | "always";
export type AgentQuestionStatus =
| "pending"
@@ -664,7 +665,7 @@ export const abortAgentChat = async (sessionId?: string) => {
export const replyAgentPermission = async (
sessionId: string,
requestId: string,
reply: PermissionReply,
reply: PermissionDecision,
) => {
const response = await apiFetch(
getAgentSessionUrl(sessionId, "/permission-responses"),