feat(chat): 完善运行状态与权限交互
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
resumeAgentChatStream,
|
||||
streamAgentChat,
|
||||
} from "@/lib/chatStream";
|
||||
import type { PermissionReply, StreamEvent } from "@/lib/chatStream";
|
||||
import type { PermissionDecision, StreamEvent } from "@/lib/chatStream";
|
||||
import { useAuthStore } from "@/store/authStore";
|
||||
import type {
|
||||
AgentArtifact,
|
||||
@@ -799,7 +799,7 @@ export const useAgentChatSession = ({
|
||||
}, [flushPendingTokens, getLastAssistantMessageId]);
|
||||
|
||||
const replyPermission = useCallback(
|
||||
async (requestId: string, reply: PermissionReply) => {
|
||||
async (requestId: string, reply: PermissionDecision) => {
|
||||
const target = messagesRef.current
|
||||
.flatMap((message) => message.permissions ?? [])
|
||||
.find((permission) => permission.requestId === requestId);
|
||||
|
||||
Reference in New Issue
Block a user