fraim-hub 2.0.267 → 2.0.268
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/src/ai-hub/server.js +3 -0
- package/package.json +2 -2
- package/public/ai-hub/script.js +27 -18
|
@@ -200,6 +200,9 @@ function resolveConversationPersonaKey(conversation, projectPath, customJobOwner
|
|
|
200
200
|
const custom = customJobOwners
|
|
201
201
|
? customJobOwners.get(jobId) ?? null
|
|
202
202
|
: getCustomPersonaForJob(projectPath, jobId);
|
|
203
|
+
if (!custom && conversation.personaKey?.startsWith('custom:')) {
|
|
204
|
+
return conversation.personaKey;
|
|
205
|
+
}
|
|
203
206
|
return custom ?? getHubPersonaForJob(jobId);
|
|
204
207
|
}
|
|
205
208
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fraim-hub",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.268",
|
|
4
4
|
"description": "FRAIM Hub local companion package.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"fraim-hub": "bin/fraim-hub.js",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"electron": "^41.2.2",
|
|
164
164
|
"electron-updater": "^6.8.9",
|
|
165
165
|
"express": "^5.2.1",
|
|
166
|
-
"fraim": "2.0.
|
|
166
|
+
"fraim": "2.0.268",
|
|
167
167
|
"mongodb": "^7.0.0",
|
|
168
168
|
"node-cron": "4.2.1",
|
|
169
169
|
"node-edge-tts": "^1.2.10",
|
package/public/ai-hub/script.js
CHANGED
|
@@ -760,13 +760,19 @@ function ensureTaskPaneLauncher() {
|
|
|
760
760
|
root.appendChild(actions);
|
|
761
761
|
|
|
762
762
|
document.body.insertBefore(root, document.body.firstChild);
|
|
763
|
-
document.getElementById('task-pane-project-select')?.addEventListener('change', (event) => {
|
|
764
|
-
const statusEl = document.getElementById('task-pane-start-status');
|
|
765
|
-
const project = taskPaneProjectEntries().find((entry) => entry.folderPath === event.target.value);
|
|
766
|
-
if (statusEl && project) statusEl.textContent = `Project: ${project.name || friendlyProjectShortName(project.folderPath)}`;
|
|
767
|
-
});
|
|
768
|
-
|
|
769
|
-
|
|
763
|
+
document.getElementById('task-pane-project-select')?.addEventListener('change', (event) => {
|
|
764
|
+
const statusEl = document.getElementById('task-pane-start-status');
|
|
765
|
+
const project = taskPaneProjectEntries().find((entry) => entry.folderPath === event.target.value);
|
|
766
|
+
if (statusEl && project) statusEl.textContent = `Project: ${project.name || friendlyProjectShortName(project.folderPath)}`;
|
|
767
|
+
});
|
|
768
|
+
document.getElementById('task-pane-employee-select')?.addEventListener('change', (event) => {
|
|
769
|
+
const value = event.target && event.target.value;
|
|
770
|
+
if (value && hubConfiguredAgents().some((agent) => agent.id === value)) {
|
|
771
|
+
state.selectedEmployeeId = value;
|
|
772
|
+
}
|
|
773
|
+
});
|
|
774
|
+
return root;
|
|
775
|
+
}
|
|
770
776
|
|
|
771
777
|
function renderTaskPaneLauncher() {
|
|
772
778
|
if (!isTaskPaneSurface() || !state.bootstrap) return;
|
|
@@ -851,20 +857,23 @@ async function taskPaneStartSelectedJob() {
|
|
|
851
857
|
if (start) start.disabled = true;
|
|
852
858
|
if (statusEl) statusEl.textContent = 'Starting...';
|
|
853
859
|
try {
|
|
854
|
-
const result = await startRun(job, instructions ? instructions.value : '', employeeId, undefined, 'projects');
|
|
855
|
-
if (result && result.ok) {
|
|
856
|
-
taskPaneLauncherForcedOpen = false;
|
|
857
|
-
if (statusEl) statusEl.textContent = 'Started.';
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
}
|
|
860
|
+
const result = await startRun(job, instructions ? instructions.value : '', employeeId, undefined, 'projects');
|
|
861
|
+
if (result && result.ok) {
|
|
862
|
+
taskPaneLauncherForcedOpen = false;
|
|
863
|
+
if (statusEl) statusEl.textContent = 'Started.';
|
|
864
|
+
renderActive();
|
|
865
|
+
syncTaskPaneSurfaceMode();
|
|
866
|
+
} else if (statusEl) {
|
|
867
|
+
statusEl.textContent = (result && result.error) || 'Could not start.';
|
|
868
|
+
}
|
|
861
869
|
} catch (error) {
|
|
862
870
|
if (statusEl) statusEl.textContent = 'Could not start.';
|
|
863
871
|
console.warn('[ai-hub] task-pane start failed:', error);
|
|
864
|
-
} finally {
|
|
865
|
-
renderTaskPaneLauncher();
|
|
866
|
-
|
|
867
|
-
}
|
|
872
|
+
} finally {
|
|
873
|
+
renderTaskPaneLauncher();
|
|
874
|
+
syncTaskPaneSurfaceMode();
|
|
875
|
+
}
|
|
876
|
+
}
|
|
868
877
|
|
|
869
878
|
// ---------------------------------------------------------------------------
|
|
870
879
|
// Concept popover population (drives the welcome-line "see ... jobs" lists)
|