@parhelia/core 0.1.12331 → 0.1.12337
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 +53 -12
- package/dist/editor/ai/AgentTerminal.js.map +1 -1
- package/dist/editor/ai/dialogs/AgentDialogHandler.js +22 -4
- package/dist/editor/ai/dialogs/AgentDialogHandler.js.map +1 -1
- package/dist/editor/ai/dialogs/QuestionnaireInline.js +1 -1
- package/dist/editor/ai/dialogs/QuestionnaireInline.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/task-board/TaskBoardWorkspace.js +3 -0
- package/dist/task-board/TaskBoardWorkspace.js.map +1 -1
- package/dist/task-board/components/CreateTaskDialog.js +1 -0
- package/dist/task-board/components/CreateTaskDialog.js.map +1 -1
- package/dist/task-board/components/ItemCollectionPicker.js +5 -3
- package/dist/task-board/components/ItemCollectionPicker.js.map +1 -1
- package/dist/task-board/components/ProjectDashboard.d.ts +1 -0
- package/dist/task-board/components/ProjectDashboard.js +6 -2
- package/dist/task-board/components/ProjectDashboard.js.map +1 -1
- package/dist/task-board/components/ProjectSettingsDialog.js +7 -0
- package/dist/task-board/components/ProjectSettingsDialog.js.map +1 -1
- package/dist/task-board/components/TaskAttachmentsSection.d.ts +7 -0
- package/dist/task-board/components/TaskAttachmentsSection.js +137 -0
- package/dist/task-board/components/TaskAttachmentsSection.js.map +1 -0
- package/dist/task-board/components/TaskDetailPanel.js +6 -123
- package/dist/task-board/components/TaskDetailPanel.js.map +1 -1
- package/dist/task-board/components/TaskReviewActions.d.ts +1 -1
- package/dist/task-board/components/TaskReviewActions.js +2 -2
- package/dist/task-board/components/TaskReviewActions.js.map +1 -1
- package/dist/task-board/components/WizardCommunicationShared.js +11 -5
- package/dist/task-board/components/WizardCommunicationShared.js.map +1 -1
- package/dist/task-board/components/WizardTaskDetailsPanel.js +4 -2
- package/dist/task-board/components/WizardTaskDetailsPanel.js.map +1 -1
- package/dist/task-board/services/taskService.d.ts +1 -0
- package/dist/task-board/services/taskService.js.map +1 -1
- package/dist/task-board/taskExecutionStatus.js +12 -1
- package/dist/task-board/taskExecutionStatus.js.map +1 -1
- package/dist/task-board/taskStatus.js +3 -0
- package/dist/task-board/taskStatus.js.map +1 -1
- package/dist/task-board/types.d.ts +6 -2
- package/dist/task-board/views/KanbanView.js +2 -1
- package/dist/task-board/views/KanbanView.js.map +1 -1
- package/dist/task-board/views/ListView.js +1 -0
- package/dist/task-board/views/ListView.js.map +1 -1
- package/dist/task-board/views/WizardView.js +38 -33
- package/dist/task-board/views/WizardView.js.map +1 -1
- package/package.json +1 -1
|
@@ -54,6 +54,10 @@ function buildPlaceholderAgentDetails(agentStub) {
|
|
|
54
54
|
function normalizeDialogAgentId(value) {
|
|
55
55
|
return value?.trim().toLowerCase() || "";
|
|
56
56
|
}
|
|
57
|
+
function getVisibleDialogRegistry() {
|
|
58
|
+
const registry = globalThis.__agentDialogVisibleCallbacks;
|
|
59
|
+
return registry && typeof registry === "object" ? registry : {};
|
|
60
|
+
}
|
|
57
61
|
// Simple user message component
|
|
58
62
|
const UserMessage = ({ message }) => {
|
|
59
63
|
const content = message.content || "";
|
|
@@ -731,6 +735,21 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
|
|
|
731
735
|
const orphanTimeoutRef = useRef(null);
|
|
732
736
|
useEffect(() => {
|
|
733
737
|
activeInlineDialogRef.current = activeInlineDialog;
|
|
738
|
+
const visibleRegistry = { ...getVisibleDialogRegistry() };
|
|
739
|
+
const callbackId = activeInlineDialog?.request.callbackId || null;
|
|
740
|
+
const agentKeys = [
|
|
741
|
+
normalizeDialogAgentId(agentStubIdRefForDialogs.current),
|
|
742
|
+
normalizeDialogAgentId(agentIdRefForDialogs.current),
|
|
743
|
+
].filter(Boolean);
|
|
744
|
+
agentKeys.forEach((key) => {
|
|
745
|
+
if (callbackId) {
|
|
746
|
+
visibleRegistry[key] = callbackId;
|
|
747
|
+
}
|
|
748
|
+
else {
|
|
749
|
+
delete visibleRegistry[key];
|
|
750
|
+
}
|
|
751
|
+
});
|
|
752
|
+
globalThis.__agentDialogVisibleCallbacks = visibleRegistry;
|
|
734
753
|
}, [activeInlineDialog]);
|
|
735
754
|
useEffect(() => {
|
|
736
755
|
onQuestionnaireOpenChange?.(isQuestionnaireDialogOpen);
|
|
@@ -819,6 +838,19 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
|
|
|
819
838
|
const [showPredefined, setShowPredefined] = useState(false);
|
|
820
839
|
const [activeProfile, setActiveProfile] = useState(undefined);
|
|
821
840
|
const [selectedModelId, setSelectedModelId] = useState(undefined);
|
|
841
|
+
const normalizeAgentMode = (value) => {
|
|
842
|
+
if (value === "autonomous" ||
|
|
843
|
+
value === "read-only" ||
|
|
844
|
+
value === "supervised") {
|
|
845
|
+
return value;
|
|
846
|
+
}
|
|
847
|
+
// Backend task/spawned agents persist raw "agent", which behaves like
|
|
848
|
+
// autonomous in the frontend's current 3-mode model.
|
|
849
|
+
if (value === "agent") {
|
|
850
|
+
return "autonomous";
|
|
851
|
+
}
|
|
852
|
+
return null;
|
|
853
|
+
};
|
|
822
854
|
const [mode, setMode] = useState("supervised");
|
|
823
855
|
const [queuedPrompts, setQueuedPrompts] = useState([]);
|
|
824
856
|
const [expandedQueuedTriggerIds, setExpandedQueuedTriggerIds] = useState({});
|
|
@@ -3237,6 +3269,12 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
|
|
|
3237
3269
|
useEffect(() => {
|
|
3238
3270
|
const prevId = agentStubIdRefForDialogs.current;
|
|
3239
3271
|
agentStubIdRefForDialogs.current = agentStub.id;
|
|
3272
|
+
const visibleRegistry = { ...getVisibleDialogRegistry() };
|
|
3273
|
+
const normalizedPrevId = normalizeDialogAgentId(prevId);
|
|
3274
|
+
if (normalizedPrevId) {
|
|
3275
|
+
delete visibleRegistry[normalizedPrevId];
|
|
3276
|
+
globalThis.__agentDialogVisibleCallbacks = visibleRegistry;
|
|
3277
|
+
}
|
|
3240
3278
|
if (prevId && prevId !== agentStub.id) {
|
|
3241
3279
|
const orphanedDialog = activeInlineDialogRef.current;
|
|
3242
3280
|
if (orphanedDialog) {
|
|
@@ -3318,6 +3356,13 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
|
|
|
3318
3356
|
return () => {
|
|
3319
3357
|
const mounted = (globalThis.__agentDialogMountedAgents ?? []).filter((x) => typeof x === "string");
|
|
3320
3358
|
globalThis.__agentDialogMountedAgents = mounted.filter((id) => id !== normalizeDialogAgentId(agentStubIdRefForDialogs.current));
|
|
3359
|
+
const visibleRegistry = { ...getVisibleDialogRegistry() };
|
|
3360
|
+
const idsToClear = [
|
|
3361
|
+
normalizeDialogAgentId(agentStubIdRefForDialogs.current),
|
|
3362
|
+
normalizeDialogAgentId(agentIdRefForDialogs.current),
|
|
3363
|
+
].filter(Boolean);
|
|
3364
|
+
idsToClear.forEach((id) => delete visibleRegistry[id]);
|
|
3365
|
+
globalThis.__agentDialogVisibleCallbacks = visibleRegistry;
|
|
3321
3366
|
// If unmounting with an active dialog, defer the orphan event so that
|
|
3322
3367
|
// React strict mode remounts can cancel it. Only real unmounts fire.
|
|
3323
3368
|
const orphanedDialog = activeInlineDialogRef.current;
|
|
@@ -3405,20 +3450,16 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
|
|
|
3405
3450
|
// Initialize mode from metadata; fall back to agent.Mode from server
|
|
3406
3451
|
useEffect(() => {
|
|
3407
3452
|
try {
|
|
3408
|
-
const metaMode = agentMetadata?.mode;
|
|
3409
|
-
if (metaMode
|
|
3410
|
-
metaMode === "read-only" ||
|
|
3411
|
-
metaMode === "supervised") {
|
|
3453
|
+
const metaMode = normalizeAgentMode(agentMetadata?.mode);
|
|
3454
|
+
if (metaMode) {
|
|
3412
3455
|
setMode(metaMode);
|
|
3413
3456
|
return;
|
|
3414
3457
|
}
|
|
3415
3458
|
}
|
|
3416
3459
|
catch { }
|
|
3417
3460
|
try {
|
|
3418
|
-
const serverMode = agent?.mode;
|
|
3419
|
-
if (serverMode
|
|
3420
|
-
serverMode === "read-only" ||
|
|
3421
|
-
serverMode === "supervised") {
|
|
3461
|
+
const serverMode = normalizeAgentMode(agent?.mode);
|
|
3462
|
+
if (serverMode) {
|
|
3422
3463
|
setMode(serverMode);
|
|
3423
3464
|
}
|
|
3424
3465
|
}
|
|
@@ -5044,10 +5085,10 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
|
|
|
5044
5085
|
}, children: _jsx(ExternalLink, { className: "h-2.5 w-2.5", strokeWidth: 1.5 }) }), backendAssignedSkillSet.has(skillId.toLowerCase()) ? (_jsx("span", { className: "text-[9px] text-gray-500", children: "auto" })) : (_jsx("button", { type: "button", className: "rounded p-0.5 text-gray-500 hover:bg-gray-200 hover:text-gray-700", onClick: () => {
|
|
5045
5086
|
void handleRemoveSkill(skillId);
|
|
5046
5087
|
}, title: "Remove skill", "aria-label": `Remove ${skill?.name || skillId}`, children: _jsx(X, { className: "h-2.5 w-2.5", strokeWidth: 1 }) }))] }, skillId));
|
|
5047
|
-
}) }))] }), _jsxs("div", { children: [_jsx("div", { className: "mb-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5088
|
+
}) }))] }), _jsxs("div", { children: [_jsx("div", { className: "mb-0.5 px-0.5 text-[11px] font-medium text-gray-700", children: "Subscribed triggers" }), _jsx("div", { className: "max-h-28 overflow-y-auto rounded border border-gray-100 bg-gray-50/50 p-1", children: triggerSubscriptionsLoading ? (_jsx("div", { className: "px-1 text-[10px] text-gray-500", children: "Loading subscribed triggers..." })) : activeTriggerSubscriptions.length > 0 ? (_jsx("div", { className: "space-y-0.5", children: activeTriggerSubscriptions.map((sub) => {
|
|
5089
|
+
const filterText = (sub.filter || "").trim();
|
|
5090
|
+
return (_jsxs("div", { className: "flex items-baseline gap-1.5 rounded px-1 py-0.5 hover:bg-white/60 transition-colors", children: [_jsx("div", { className: "shrink-0 text-[10px] font-medium text-gray-700", children: sub.triggerName }), filterText.length > 0 && (_jsx("div", { className: "truncate text-[9px] text-gray-400", title: filterText, children: filterText }))] }, sub.id));
|
|
5091
|
+
}) })) : (_jsx("div", { className: "px-1 text-[10px] text-gray-500", children: "No active trigger subscriptions" })) }), triggerSubscriptionsError && (_jsx("div", { className: "mt-1 text-[10px] text-red-600", children: triggerSubscriptionsError }))] })] }) })] }), activeProfile?.prompts?.length ? (_jsxs(Popover, { open: showPredefined, onOpenChange: setShowPredefined, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx("button", { className: "rounded p-1 hover:bg-gray-100", onClick: () => { }, title: "Predefined prompts", "aria-label": "Predefined prompts", type: "button", children: _jsx(Wand2, { className: "h-3 w-3", strokeWidth: 1 }) }) }), _jsx(PopoverContent, { className: "w-64 p-0", align: "start", children: _jsx("div", { className: "max-h-56 overflow-y-auto p-2", children: activeProfile.prompts.map((p, index) => (_jsx("div", { className: "cursor-pointer rounded p-1.5 text-[10px] text-gray-700 hover:bg-gray-100", onClick: () => {
|
|
5051
5092
|
setPrompt(p.prompt);
|
|
5052
5093
|
setShowPredefined(false);
|
|
5053
5094
|
if (textareaRef.current)
|