mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-28 12:34:50 +02:00
apps: canvas-chat App Builder seeds + sync meta.json + stale-approval filter
App Builder launched from canvas chat now seeds the React template and registers an Output row tied to the session id, so the Apps sidebar lights up immediately. Adds a post-session-complete sync that reads meta.json from the workspace folder and updates the Output row's name and description, ending the 'Untitled App' problem. Also adds a stale- approval filter to the WS replay: resolved approvals no longer resurrect as dead cards when the user navigates back to a chat.
This commit is contained in:
@@ -24,6 +24,7 @@ import {
|
||||
} from '../state/agentsSlice';
|
||||
import { streamStart, streamDelta, streamEnd } from '../state/streamingSlice';
|
||||
import { addBrowserCardFromBackend, removeBrowserCard, setBrowserCardPosition, setGlowingBrowserCards, GRID_GAP } from '../state/dashboardLayoutSlice';
|
||||
import { upsertOutput } from '../state/outputsSlice';
|
||||
import { getAuthToken } from '../config';
|
||||
import { notifyAgentCompletion } from '../notifications';
|
||||
|
||||
@@ -488,6 +489,16 @@ class WebSocketManager {
|
||||
}
|
||||
break;
|
||||
|
||||
case 'agent:output_upserted':
|
||||
// Emitted by the backend when an Output row is created (canvas-launched
|
||||
// App Builder seed) or updated (post-session meta.json sync). The
|
||||
// upsert reducer merges over an existing row so a UI that already
|
||||
// loaded the row doesn't lose locally-applied fields.
|
||||
if (data.output && data.output.id) {
|
||||
store.dispatch(upsertOutput(data.output));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'agent:stream_start':
|
||||
case 'agent:stream_delta':
|
||||
case 'agent:stream_end':
|
||||
|
||||
Reference in New Issue
Block a user