feat(agent): enhance canvas agent functionality with new Codex permissions, improved task progress display, and streamlined user interactions

This commit is contained in:
HouYunFei
2026-07-30 13:33:17 +08:00
parent 80756b6170
commit 520c12038f
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
{
"name": "@basketikun/canvas-agent",
"version": "0.2.0",
"version": "0.3.0",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"bin": {
"canvas-agent": "./dist/index.js"
"canvas-agent": "dist/index.js"
},
"files": [
"dist",
+3 -2
View File
@@ -103,8 +103,9 @@ export class CanvasSession {
updateState(body: unknown, clientId?: string) {
const targetClientId = clientId || this.activeClientId;
if (!targetClientId) return;
this.canvasStates.set(targetClientId, { ...((body && typeof body === "object" && !Array.isArray(body) ? body : {}) as Record<string, unknown>), clientId: targetClientId } as CanvasSnapshot);
logger.debug("Canvas state updated", { clientId: targetClientId, nodes: Array.isArray((body as CanvasSnapshot | null)?.nodes) ? (body as CanvasSnapshot).nodes.length : 0, connections: Array.isArray((body as CanvasSnapshot | null)?.connections) ? (body as CanvasSnapshot).connections.length : 0 });
const state = { ...((body && typeof body === "object" && !Array.isArray(body) ? body : {}) as Record<string, unknown>), clientId: targetClientId } as CanvasSnapshot;
this.canvasStates.set(targetClientId, state);
logger.debug("Canvas state updated", { clientId: targetClientId, nodes: state.nodes?.length || 0, connections: state.connections?.length || 0 });
}
/** 将指定网页设为最近激活的工具目标。 */