feat(logging): update logging format to plain text and enhance HTTP diagnostics

This commit is contained in:
HouYunFei
2026-07-29 10:28:24 +08:00
parent b3b02f75a9
commit 92fd0ce129
8 changed files with 123 additions and 93 deletions
+3
View File
@@ -9,6 +9,7 @@ export type AgentEventLog = { id: string; time: string; title: string; text: str
export type AgentPendingToolCall = { requestId: string; name: string; input?: { ops?: CanvasAgentOp[]; path?: string } & Record<string, unknown> };
export type AgentCanvasContext = { snapshot: CanvasAgentSnapshot; applyOps: (ops?: CanvasAgentOp[]) => CanvasAgentSnapshot; undoOps: () => CanvasAgentSnapshot | null; canUndo: boolean };
export type AgentThreadSummary = { id: string; preview: string; name?: string | null; cwd?: string; status?: string; source?: unknown; createdAt?: number; updatedAt?: number };
export type AgentTokenUsage = { input: number; cached: number; output: number };
export type AgentPanelTab = "chat" | "setup" | "history" | "log";
const CONNECT_TIMEOUT_MS = 6000;
@@ -31,6 +32,7 @@ type AgentStore = {
sending: boolean;
waiting: boolean;
messages: AgentChatItem[];
tokenUsage: AgentTokenUsage | null;
eventLogs: AgentEventLog[];
threads: AgentThreadSummary[];
activeThreadId: string;
@@ -71,6 +73,7 @@ export const useAgentStore = create<AgentStore>((set, get) => ({
sending: false,
waiting: false,
messages: [],
tokenUsage: null,
eventLogs: [],
threads: [],
activeThreadId: "",