fix(agent): drop the client-side canvas upload size cap

The 2MB cap guarded a server limit that does not exist yet and silently
skipped uploads for large graphs, which are normal on a video/image
platform. The server owns its own limits.
This commit is contained in:
Nathaniel Parson Koroso
2026-07-10 15:00:48 -07:00
parent bca7995b4c
commit a7fffdcb4b

View File

@@ -115,9 +115,8 @@ const activeTab = computed<ActiveTab | null>(() => {
// The turn runs against the canvas as of the send: upload the serialized
// graph when it changed since the last upload so the server can seed the
// thread's draft from it (cloud postMessage.workflow contract; servers
// without the field ignore it). Oversized graphs are skipped, matching the
// server's 413 limit.
const MAX_UPLOAD_CHARS = 2_000_000
// without the field ignore it). No client-side size cap: the server owns
// its own limits.
let lastSentGraph: string | null = null
let snapshotTabPath: string | null = null
@@ -125,8 +124,7 @@ function takeWorkflowSnapshot(): WorkflowUpload | undefined {
const graph = app.graph?.serialize()
if (!graph) return undefined
const serialized = JSON.stringify(graph)
if (serialized === lastSentGraph || serialized.length > MAX_UPLOAD_CHARS)
return undefined
if (serialized === lastSentGraph) return undefined
lastSentGraph = serialized
snapshotTabPath = workflowStore.activeWorkflow?.path ?? null
return { graph, last_seen_version: draftStore.version }