@parhelia/core 0.1.12705 → 0.1.12719
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/editor/ai/AgentTerminal.js +13 -7
- package/dist/editor/ai/AgentTerminal.js.map +1 -1
- package/dist/editor/ai/ToolCallDisplay.js +15 -11
- package/dist/editor/ai/ToolCallDisplay.js.map +1 -1
- package/dist/editor/itemContextMenu.d.ts +13 -0
- package/dist/editor/itemContextMenu.js +80 -0
- package/dist/editor/itemContextMenu.js.map +1 -0
- package/dist/editor/media-selector/MediaFolderBrowser.js +96 -19
- package/dist/editor/media-selector/MediaFolderBrowser.js.map +1 -1
- package/dist/editor/media-selector/Thumbnails.d.ts +2 -1
- package/dist/editor/media-selector/Thumbnails.js +61 -4
- package/dist/editor/media-selector/Thumbnails.js.map +1 -1
- package/dist/editor/media-selector/TreeSelector.js +7 -5
- package/dist/editor/media-selector/TreeSelector.js.map +1 -1
- package/dist/editor/settings/panels/CreateJavaScriptToolDialog.js +3 -2
- package/dist/editor/settings/panels/CreateJavaScriptToolDialog.js.map +1 -1
- package/dist/editor/version-diff/versionDiffTargets.js +37 -12
- package/dist/editor/version-diff/versionDiffTargets.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/setup/wizard/steps/ImportModelDialog.js +3 -2
- package/dist/setup/wizard/steps/ImportModelDialog.js.map +1 -1
- package/dist/splash-screen/ParheliaAssistantChat.js +176 -10
- package/dist/splash-screen/ParheliaAssistantChat.js.map +1 -1
- package/dist/task-board/TaskBoardWorkspace.js +4 -7
- package/dist/task-board/TaskBoardWorkspace.js.map +1 -1
- package/package.json +1 -1
|
@@ -2417,6 +2417,12 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
|
|
|
2417
2417
|
const toolCallCreatedDate = message.data.createdDate ||
|
|
2418
2418
|
message.timestamp ||
|
|
2419
2419
|
new Date().toISOString();
|
|
2420
|
+
const toolCallState = String(message.data?.state || "").toLowerCase();
|
|
2421
|
+
const isExplicitApprovalRequired = toolCallState === "toolapprovalsrequired" ||
|
|
2422
|
+
toolCallState === "waitingforapproval";
|
|
2423
|
+
const requiresApproval = isExplicitApprovalRequired
|
|
2424
|
+
? message.data?.requiresApproval
|
|
2425
|
+
: undefined;
|
|
2420
2426
|
const toolCall = {
|
|
2421
2427
|
id: toolCallId,
|
|
2422
2428
|
messageId: toolCallMessageId,
|
|
@@ -2431,7 +2437,7 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
|
|
|
2431
2437
|
isCompleted: false,
|
|
2432
2438
|
responseTimeMs: message.data.responseTimeMs,
|
|
2433
2439
|
createdDate: toolCallCreatedDate,
|
|
2434
|
-
requiresApproval
|
|
2440
|
+
requiresApproval,
|
|
2435
2441
|
};
|
|
2436
2442
|
// Check for existing tool call - search across ALL messages by toolCallId first
|
|
2437
2443
|
// This handles the case where the first message had messageId: null (used fallback UI ID)
|
|
@@ -2537,7 +2543,7 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
|
|
|
2537
2543
|
const messageWithToolCall = messagesRef.current.find((msg) => msg.id === toolCallMessageId);
|
|
2538
2544
|
appendToolUiEvent("ui:tool-call-attached", `${extractedToolCall.functionName || "unknown"} toolCallId=${toolCallId} targetMessageId=${toolCallMessageId} messageToolCalls=${messageWithToolCall?.toolCalls?.length || 0} assistantMessages=${messagesRef.current.filter((msg) => msg.role === "assistant").length}`);
|
|
2539
2545
|
// If tool requires approval, agent is now waiting for user action - stop thinking
|
|
2540
|
-
if (
|
|
2546
|
+
if (requiresApproval) {
|
|
2541
2547
|
setIsAgentThinking(false);
|
|
2542
2548
|
}
|
|
2543
2549
|
}
|
|
@@ -4421,7 +4427,7 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
|
|
|
4421
4427
|
setActiveInlineDialog(null);
|
|
4422
4428
|
}
|
|
4423
4429
|
}, []);
|
|
4424
|
-
const handleSubmit = async () => {
|
|
4430
|
+
const handleSubmit = async (promptOverride) => {
|
|
4425
4431
|
// Guard against double-submit and missing context
|
|
4426
4432
|
if (isSubmitting) {
|
|
4427
4433
|
console.warn("[AgentTerminal] handleSubmit blocked: already submitting");
|
|
@@ -4450,7 +4456,7 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
|
|
|
4450
4456
|
return;
|
|
4451
4457
|
}
|
|
4452
4458
|
// Save the prompt text before any state changes
|
|
4453
|
-
const savedPrompt = prompt.trim();
|
|
4459
|
+
const savedPrompt = (promptOverride ?? prompt).trim();
|
|
4454
4460
|
// Check if agent is new - allow empty prompts for new agents to trigger greeting
|
|
4455
4461
|
const isNewAgent = agentStub.status === "new" || agent?.status === "new";
|
|
4456
4462
|
if (!savedPrompt && !isNewAgent) {
|
|
@@ -4895,8 +4901,8 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
|
|
|
4895
4901
|
// If it has placeholders, just set the prompt so PlaceholderInput UI appears
|
|
4896
4902
|
const hasPlaceholders = /\{\{[^{}]+\}\}|<<[^<>]+>>/.test(effectiveInitialPrompt);
|
|
4897
4903
|
if (!hasPlaceholders) {
|
|
4898
|
-
//
|
|
4899
|
-
handleSubmit();
|
|
4904
|
+
// Submit the provided prompt directly; React state updates are async.
|
|
4905
|
+
handleSubmit(effectiveInitialPrompt);
|
|
4900
4906
|
}
|
|
4901
4907
|
}, 200);
|
|
4902
4908
|
}
|
|
@@ -6392,7 +6398,7 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
|
|
|
6392
6398
|
? "Your browser does not support Speech Recognition"
|
|
6393
6399
|
: isListening
|
|
6394
6400
|
? "Stop voice input"
|
|
6395
|
-
: "Start voice input", "aria-pressed": isListening, "aria-disabled": isVoiceDisabled, children: isListening ? (_jsx(MicOff, { className: "size-3", strokeWidth: 1 })) : (_jsx(Mic, { className: "size-3", strokeWidth: 1 })) }) }), _jsx(Button, { onClick: isExecuting ? handleStop : handleSubmit, disabled: !isExecuting &&
|
|
6401
|
+
: "Start voice input", "aria-pressed": isListening, "aria-disabled": isVoiceDisabled, children: isListening ? (_jsx(MicOff, { className: "size-3", strokeWidth: 1 })) : (_jsx(Mic, { className: "size-3", strokeWidth: 1 })) }) }), _jsx(Button, { onClick: isExecuting ? handleStop : () => handleSubmit(), disabled: !isExecuting &&
|
|
6396
6402
|
(allPendingApprovals.length > 0 ||
|
|
6397
6403
|
(!prompt.trim() && !activePlaceholderInput) ||
|
|
6398
6404
|
(!!prompt &&
|