feat(chat): 完善运行状态与权限交互
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user