@yeaft/webchat-agent 1.0.518 → 1.0.519
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/index.js +1 -1
- package/local-runtime/server/handlers/client-workbench.js +11 -1
- package/local-runtime/version.json +1 -1
- package/local-runtime/web/app.bundle.js +122 -112
- package/local-runtime/web/app.bundle.js.gz +0 -0
- package/local-runtime/web/index.html +2 -2
- package/local-runtime/web/style.bundle.css +1 -1
- package/local-runtime/web/style.bundle.css.gz +0 -0
- package/package.json +1 -1
- package/workbench/file-ops.js +18 -3
- package/workbench/file-reference-resolver.js +38 -19
package/index.js
CHANGED
|
@@ -177,7 +177,7 @@ async function detectCapabilities() {
|
|
|
177
177
|
// agent build can speak plaintext WS frames. New servers see this and
|
|
178
178
|
// flip `agent.encryptOutbound = false`, stopping outbound encryption
|
|
179
179
|
// to this peer. Old servers ignore the unknown capability token.
|
|
180
|
-
const capabilities = ['background_tasks', 'file_editor', 'ping_session', 'plaintext-ok', 'workbench_session_routes', 'workbench_request_correlation', 'workbench_terminal_cleanup_fence', 'workbench_file_content_chunks', 'session_history_search', 'session_history_outline', 'session_history_window_prefetch', 'file_reference_resolution', 'yeaft_plugins', 'yeaft_managed_skills', 'settings_request_correlation'];
|
|
180
|
+
const capabilities = ['background_tasks', 'file_editor', 'ping_session', 'plaintext-ok', 'workbench_session_routes', 'workbench_request_correlation', 'workbench_terminal_cleanup_fence', 'workbench_file_content_chunks', 'session_history_search', 'session_history_outline', 'session_history_window_prefetch', 'file_reference_resolution', 'response_image_preview', 'yeaft_plugins', 'yeaft_managed_skills', 'settings_request_correlation'];
|
|
181
181
|
capabilities.push(getAgentUpgradeCapability());
|
|
182
182
|
if (isWorkCenterEnabled()) {
|
|
183
183
|
capabilities.push('work_center', 'work_center_message_v2');
|
|
@@ -170,7 +170,7 @@ function canonicalWorkbenchMessage(msg, resolved, { canonicalWorkDir = false } =
|
|
|
170
170
|
...clientFields,
|
|
171
171
|
agentId: resolved.agentId,
|
|
172
172
|
conversationId: resolved.conversationId,
|
|
173
|
-
workDir: canonicalWorkDir ? resolved.workDir : resolved.requestedWorkDir,
|
|
173
|
+
workDir: (canonicalWorkDir || msg?.responseImagePreview) ? resolved.workDir : resolved.requestedWorkDir,
|
|
174
174
|
workbenchRoute: resolved.route,
|
|
175
175
|
workbenchRouteKey: resolved.routeKey,
|
|
176
176
|
workbenchWorkspaceGeneration: resolved.workspaceGeneration,
|
|
@@ -318,6 +318,16 @@ export async function handleClientWorkbench(clientId, client, msg, checkAgentAcc
|
|
|
318
318
|
return;
|
|
319
319
|
}
|
|
320
320
|
const fileConvId = resolved.conversationId || msg.conversationId || client.currentConversation || '_explorer';
|
|
321
|
+
if (msg.responseImagePreview
|
|
322
|
+
&& !agents.get(fileAgentId)?.capabilities?.includes?.('response_image_preview')) {
|
|
323
|
+
await sendToWebClient(client, workbenchFailureResponse({
|
|
324
|
+
agentId: fileAgentId,
|
|
325
|
+
msg,
|
|
326
|
+
resolved: { ...resolved, conversationId: fileConvId },
|
|
327
|
+
error: 'Response image preview is not supported by this Agent',
|
|
328
|
+
}));
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
321
331
|
console.log(`[Server] Forwarding ${msg.type} to agent ${fileAgentId}, conv=${fileConvId}${msg.filePath ? `, path=${msg.filePath}` : ''}`);
|
|
322
332
|
await forwardCorrelatedWorkbenchRequest({
|
|
323
333
|
agentId: fileAgentId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0.
|
|
1
|
+
{"version":"1.0.519"}
|