@seed-ship/mcp-ui-solid 2.8.3 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ScratchpadPanel.cjs +732 -180
- package/dist/components/ScratchpadPanel.cjs.map +1 -1
- package/dist/components/ScratchpadPanel.d.ts +2 -13
- package/dist/components/ScratchpadPanel.d.ts.map +1 -1
- package/dist/components/ScratchpadPanel.js +733 -181
- package/dist/components/ScratchpadPanel.js.map +1 -1
- package/dist/types/chat-bus.d.ts +25 -1
- package/dist/types/chat-bus.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/ScratchpadPanel.tsx +458 -165
- package/src/types/chat-bus.ts +21 -1
- package/tsconfig.tsbuildinfo +1 -1
package/src/types/chat-bus.ts
CHANGED
|
@@ -60,6 +60,7 @@ export interface ChatEvents {
|
|
|
60
60
|
|
|
61
61
|
// --- Scratchpad (HITL shared workspace) ---
|
|
62
62
|
onScratchpad: (event: ChatEventBase & { scratchpad: ScratchpadEvent }) => void
|
|
63
|
+
onScratchpadPreview: (event: ChatEventBase & { id: string; preview: ScratchpadState['preview'] }) => void
|
|
63
64
|
|
|
64
65
|
// --- Fallback ---
|
|
65
66
|
onCustomEvent: (type: string, event: ChatEventBase & { data: unknown }) => void
|
|
@@ -100,6 +101,10 @@ export interface ChatCommands {
|
|
|
100
101
|
/** Show suggestion chips */
|
|
101
102
|
showSuggestions: (items: SuggestionItem[]) => void
|
|
102
103
|
|
|
104
|
+
// --- Scratchpad ---
|
|
105
|
+
/** Send scratchpad filter/form changes to the agent */
|
|
106
|
+
updateScratchpad: (id: string, update: { filters?: Record<string, string | string[]>; formData?: Record<string, unknown> }) => void
|
|
107
|
+
|
|
103
108
|
// --- Configuration ---
|
|
104
109
|
/** Toggle a connector on/off */
|
|
105
110
|
toggleConnector: (connectorId: string, enabled: boolean) => void
|
|
@@ -335,12 +340,27 @@ export interface ScratchpadState {
|
|
|
335
340
|
/** Agent messages (explanations, questions) */
|
|
336
341
|
agentMessages: Array<{ text: string; type: 'info' | 'question' | 'warning' }>
|
|
337
342
|
status: 'loading' | 'ready' | 'waiting_human' | 'processing' | 'complete'
|
|
343
|
+
/** Endpoint for auto-refresh preview when filters change */
|
|
344
|
+
previewEndpoint?: string
|
|
345
|
+
/** Debounce delay for preview refresh (ms, default 500) */
|
|
346
|
+
previewDebounce?: number
|
|
347
|
+
/** Current turn number (multi-tour) */
|
|
348
|
+
turn?: number
|
|
349
|
+
/** Total expected turns */
|
|
350
|
+
totalTurns?: number
|
|
351
|
+
/** History of completed turns */
|
|
352
|
+
turnHistory?: Array<{
|
|
353
|
+
turn: number
|
|
354
|
+
label: string
|
|
355
|
+
summary: string
|
|
356
|
+
status: 'done' | 'active' | 'pending' | 'skipped'
|
|
357
|
+
}>
|
|
338
358
|
}
|
|
339
359
|
|
|
340
360
|
export interface ScratchpadSection {
|
|
341
361
|
id: string
|
|
342
362
|
title: string
|
|
343
|
-
type: 'data' | 'filter' | 'preview' | 'message' | 'action' | 'steps' | 'form'
|
|
363
|
+
type: 'data' | 'filter' | 'preview' | 'message' | 'action' | 'steps' | 'form' | 'understanding' | 'feedback' | 'prompt'
|
|
344
364
|
content: unknown
|
|
345
365
|
/** Can the human edit this section? */
|
|
346
366
|
editable: boolean
|