@openchambery/web 1.19.8-beta.9 → 1.19.8
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/assets/{AssistantView-_V4UEE4M.js → AssistantView-COc8I6gW.js} +1 -1
- package/dist/assets/{DiagramView-D8Xk1izq.js → DiagramView-CoVZOXs9.js} +1 -1
- package/dist/assets/MarkdownRenderer-_JCvalLT.js +2 -0
- package/dist/assets/{MarkdownRendererImpl-16-hpTiD.js → MarkdownRendererImpl-DN4uUYze.js} +1 -1
- package/dist/assets/{MarkstreamRendererImpl-CQ9A_Axs.js → MarkstreamRendererImpl-tc5eRLJw.js} +1 -1
- package/dist/assets/{MobileDetailNavigation-CxTQ5n40.js → MobileDetailNavigation-BQsfM2Rw.js} +1 -1
- package/dist/assets/{MobileShareBridge-DEjxww76.js → MobileShareBridge-Dxp1onW7.js} +1 -1
- package/dist/assets/MobileSurface-CQCBU22F.js +2 -0
- package/dist/assets/{MultiRunWindow-DKEtl1MN.js → MultiRunWindow-DT1_Ns0D.js} +1 -1
- package/dist/assets/{SettingsView-CVChPNTg.js → SettingsView-Dt_5bHeR.js} +1 -1
- package/dist/assets/{SettingsWindow-Dx-_XZKW.js → SettingsWindow-D9hpPkBj.js} +1 -1
- package/dist/assets/{TerminalView-DfpkoMYP.js → TerminalView-1PvRK1IA.js} +1 -1
- package/dist/assets/{ToolOutputDialog-CPJTGNsJ.js → ToolOutputDialog-DMbQi6z1.js} +1 -1
- package/dist/assets/{appThemeRegistry-CzHULiNl.js → appThemeRegistry-DPhbPffi.js} +1 -1
- package/dist/assets/{gitApi-CuSBAJ4T.js → gitApi-C_b8zklq.js} +1 -1
- package/dist/assets/{insertionBoundaries-4zBJDllC.js → insertionBoundaries-BaWrDrco.js} +1 -1
- package/dist/assets/{main-CjHSd7ST.js → main-D2HTQe9J.js} +2 -2
- package/dist/assets/{main-BT-xV1DG.js → main-DWgbPYug.js} +4 -4
- package/dist/assets/{miniChat-QPbM2mzf.js → miniChat-uGc-vzeR.js} +2 -2
- package/dist/assets/{mobile-D8AFENb2.js → mobile-CcNC7nNg.js} +2 -2
- package/dist/assets/{multirun-CaBsj01z.js → multirun-BhX-4Fl1.js} +1 -1
- package/dist/assets/{projectMeta-CPglSOOc.js → projectMeta-bRWLqh7i.js} +1 -1
- package/dist/assets/{renderElectronMiniChatApp-Q4wGizJk.js → renderElectronMiniChatApp-DnSqUd-V.js} +2 -2
- package/dist/assets/{renderMobileApp-slvtP8-X.js → renderMobileApp-BBzRRO_F.js} +4 -4
- package/dist/assets/{runtimeConfig-B3r1s8vj.js → runtimeConfig-Dz9IoMdy.js} +1 -1
- package/dist/assets/{runtimeEndpointReset-Cjw1fVud.js → runtimeEndpointReset-zQSnGP_k.js} +1 -1
- package/dist/assets/{sessionLookup-D5QA5gs9.js → sessionLookup-Bd75H5dK.js} +1 -1
- package/dist/assets/{useAppFontEffects-D1lBDx2n.js → useAppFontEffects-BF9UdL3e.js} +5 -5
- package/dist/assets/{useDesktopWindowControlsLayout-D1ZyUu7v.js → useDesktopWindowControlsLayout-SiK0UEm-.js} +1 -1
- package/dist/assets/{useEffectiveDirectory-D1SRQYSV.js → useEffectiveDirectory-CUKxer0Q.js} +1 -1
- package/dist/assets/{useMobileNavigationStore-Dbafrikj.js → useMobileNavigationStore-BUYEOEE2.js} +2 -2
- package/dist/assets/{useSessionAutoCleanup-ClHrwNz_.js → useSessionAutoCleanup-B6CyB5t3.js} +1 -1
- package/dist/assets/{useWorkerHighlightedLines-Dw049ocj.js → useWorkerHighlightedLines-De_sQIec.js} +1 -1
- package/dist/index.html +2 -2
- package/dist/mini-chat.html +2 -2
- package/dist/mobile.html +2 -2
- package/package.json +1 -1
- package/server/lib/llm/DOCUMENTATION.md +4 -9
- package/server/lib/llm/generate.test.js +0 -1
- package/server/lib/notifications/DOCUMENTATION.md +1 -1
- package/server/lib/notifications/runtime.js +2 -9
- package/server/lib/notifications/runtime.test.js +0 -144
- package/server/lib/session-index/DOCUMENTATION.md +2 -3
- package/server/lib/session-index/service.js +0 -1
- package/server/lib/session-index/service.test.js +2 -7
- package/server/lib/session-title/DOCUMENTATION.md +3 -4
- package/server/lib/session-title/runtime.js +0 -1
- package/server/lib/session-title/runtime.test.js +0 -6
- package/dist/assets/MarkdownRenderer-j2ZXXPkC.js +0 -2
- package/dist/assets/MobileSurface-DqQi0fkn.js +0 -2
package/dist/mini-chat.html
CHANGED
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
}
|
|
75
75
|
</style>
|
|
76
76
|
|
|
77
|
-
<script type="module" crossorigin src="/assets/miniChat-
|
|
77
|
+
<script type="module" crossorigin src="/assets/miniChat-uGc-vzeR.js"></script>
|
|
78
78
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-C0FnF6B9.js">
|
|
79
79
|
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-CnHfUmDN.js">
|
|
80
80
|
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-B4dlGEM2.js">
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
<link rel="modulepreload" crossorigin href="/assets/terminalApi-947l7Ra3.js">
|
|
92
92
|
<link rel="modulepreload" crossorigin href="/assets/types-BuiqMmh_.js">
|
|
93
93
|
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-DCowZ2ab.js">
|
|
94
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
94
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-Dz9IoMdy.js">
|
|
95
95
|
<link rel="stylesheet" crossorigin href="/assets/src-B-P5qIBc.css">
|
|
96
96
|
</head>
|
|
97
97
|
<body class="h-full bg-background text-foreground">
|
package/dist/mobile.html
CHANGED
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
})();
|
|
64
64
|
</script>
|
|
65
65
|
|
|
66
|
-
<script type="module" crossorigin src="/assets/mobile-
|
|
66
|
+
<script type="module" crossorigin src="/assets/mobile-CcNC7nNg.js"></script>
|
|
67
67
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-C0FnF6B9.js">
|
|
68
68
|
<link rel="modulepreload" crossorigin href="/assets/vendor-base-ui-CnHfUmDN.js">
|
|
69
69
|
<link rel="modulepreload" crossorigin href="/assets/vendor-zustand-B4dlGEM2.js">
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
<link rel="modulepreload" crossorigin href="/assets/terminalApi-947l7Ra3.js">
|
|
81
81
|
<link rel="modulepreload" crossorigin href="/assets/types-BuiqMmh_.js">
|
|
82
82
|
<link rel="modulepreload" crossorigin href="/assets/capgoAdapter-DCowZ2ab.js">
|
|
83
|
-
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-
|
|
83
|
+
<link rel="modulepreload" crossorigin href="/assets/runtimeConfig-Dz9IoMdy.js">
|
|
84
84
|
<link rel="stylesheet" crossorigin href="/assets/src-B-P5qIBc.css">
|
|
85
85
|
</head>
|
|
86
86
|
<body class="h-full bg-background text-foreground">
|
package/package.json
CHANGED
|
@@ -41,15 +41,10 @@ The 1.18.4 client exposes `GET /provider`, `GET /config/providers`, and
|
|
|
41
41
|
Non-vision models (for example deepseek-v4-flash) keep the `[image: …]`
|
|
42
42
|
description and any text-file bytes, and skip image data URLs so generate
|
|
43
43
|
cannot stall on unsupported vision parts. Non-image
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
`
|
|
48
|
-
immediately) so sidebar visibility, session-index, session-title, and
|
|
49
|
-
notification/push fanout treat them as system-owned — same contract as
|
|
50
|
-
non-empty `smallModel.purpose`. This is a text generator only — never the
|
|
51
|
-
contact transcript and never a coding SessionPrompt loop. Upstream
|
|
52
|
-
`info.error.message` is forwarded on 502.
|
|
44
|
+
text files are also inlined into the flattened prompt. Wait for idle via
|
|
45
|
+
`session.status` + `session.messages`, then delete the session. This is a
|
|
46
|
+
text generator only — never the contact transcript and never a coding
|
|
47
|
+
SessionPrompt loop. Upstream `info.error.message` is forwarded on 502.
|
|
53
48
|
|
|
54
49
|
### Internal token callback (in-process only)
|
|
55
50
|
|
|
@@ -78,7 +78,6 @@ describe('generateOpenCodeText', () => {
|
|
|
78
78
|
|
|
79
79
|
expect(create).toHaveBeenCalledWith(expect.objectContaining({
|
|
80
80
|
title: expect.stringContaining('[openchamber-llm]'),
|
|
81
|
-
metadata: { openchamber: { llm: { purpose: 'chat-completions' } } },
|
|
82
81
|
}), expect.anything())
|
|
83
82
|
expect(update).toHaveBeenCalled()
|
|
84
83
|
expect(promptAsync).toHaveBeenCalledWith(expect.objectContaining({
|
|
@@ -47,7 +47,7 @@ This module provides notification message preparation utilities for the web serv
|
|
|
47
47
|
- Returned API:
|
|
48
48
|
- `maybeSendPushForTrigger(payload)`
|
|
49
49
|
- Owns:
|
|
50
|
-
- top-level completion/question/permission trigger routing; completion is the sole task-status notification. Ordinary push is limited to sidebar-visible root sessions. Child/subagent sessions, Assistant bindings (`openchamber.assistant.assistantID` unless `assigned.from === 'contact'`), scheduled-task sessions, small-model system sessions (`metadata.openchamber.smallModel.purpose`),
|
|
50
|
+
- top-level completion/question/permission trigger routing; completion is the sole task-status notification. Ordinary push is limited to sidebar-visible root sessions. Child/subagent sessions, Assistant bindings (`openchamber.assistant.assistantID` unless `assigned.from === 'contact'`), scheduled-task sessions, small-model system sessions (`metadata.openchamber.smallModel.purpose`), and `smartfetch-secondary` titles are suppressed. Contact-assigned workers stay visible and still notify.
|
|
51
51
|
- contact-turn notifications (`sendContactTurnNotification`) are a separate SMS-style path: title is the assistant nickname, body is the spoken message text, on desktop / UI SSE / web-push / APNs. APNs does **not** rewrite these into the generic "Task completed" scenario title.
|
|
52
52
|
- top-level completion/error Live Activity `end` (`sendLiveActivityEnd`), independent of ordinary push settings and UI visibility, with the same hidden-session suppression; duplicate terminal events are idempotent at the token store
|
|
53
53
|
- session meta cache for sidebar-visibility suppression
|
|
@@ -185,9 +185,6 @@ export const createNotificationTriggerRuntime = (deps) => {
|
|
|
185
185
|
smallModelPurpose: meta.smallModelPurpose !== undefined
|
|
186
186
|
? meta.smallModelPurpose
|
|
187
187
|
: (previous?.smallModelPurpose ?? null),
|
|
188
|
-
llmPurpose: meta.llmPurpose !== undefined
|
|
189
|
-
? meta.llmPurpose
|
|
190
|
-
: (previous?.llmPurpose ?? null),
|
|
191
188
|
assistantID: meta.assistantID !== undefined ? meta.assistantID : (previous?.assistantID ?? null),
|
|
192
189
|
assignedFrom: meta.assignedFrom !== undefined ? meta.assignedFrom : (previous?.assignedFrom ?? null),
|
|
193
190
|
scheduledTaskID: meta.scheduledTaskID !== undefined
|
|
@@ -205,9 +202,6 @@ export const createNotificationTriggerRuntime = (deps) => {
|
|
|
205
202
|
: null;
|
|
206
203
|
return {
|
|
207
204
|
smallModelPurpose: normalizeSmallModelPurpose(openchamber?.smallModel?.purpose),
|
|
208
|
-
// Throwaway LLM gateway sessions (`metadata.openchamber.llm.purpose`) share
|
|
209
|
-
// the same sidebar-hidden contract as small-model system sessions.
|
|
210
|
-
llmPurpose: normalizeSmallModelPurpose(openchamber?.llm?.purpose),
|
|
211
205
|
assistantID: nonEmptySystemID(openchamber?.assistant?.assistantID)
|
|
212
206
|
? openchamber.assistant.assistantID
|
|
213
207
|
: null,
|
|
@@ -298,7 +292,6 @@ export const createNotificationTriggerRuntime = (deps) => {
|
|
|
298
292
|
if (!meta) return false;
|
|
299
293
|
if (typeof meta.parentID === 'string' && meta.parentID.length > 0) return true;
|
|
300
294
|
if (typeof meta.smallModelPurpose === 'string' && meta.smallModelPurpose.length > 0) return true;
|
|
301
|
-
if (typeof meta.llmPurpose === 'string' && meta.llmPurpose.length > 0) return true;
|
|
302
295
|
if (typeof meta.assistantID === 'string' && meta.assistantID.length > 0 && meta.assignedFrom !== 'contact') {
|
|
303
296
|
return true;
|
|
304
297
|
}
|
|
@@ -309,8 +302,8 @@ export const createNotificationTriggerRuntime = (deps) => {
|
|
|
309
302
|
|
|
310
303
|
// Only sessions that can appear as sidebar roots get ordinary push. Child /
|
|
311
304
|
// subagent sessions, archived Assistant bindings, scheduled-task sessions,
|
|
312
|
-
// small-model
|
|
313
|
-
//
|
|
305
|
+
// small-model system sessions, and SmartFetch secondaries are excluded.
|
|
306
|
+
// Contact-assigned worker sessions stay visible and still notify.
|
|
314
307
|
const shouldSkipSystemSessionNotification = async (sessionId, directory) => {
|
|
315
308
|
const meta = await fetchSessionMeta(sessionId, directory);
|
|
316
309
|
return isHiddenFromNavSession(meta);
|
|
@@ -229,150 +229,6 @@ describe('notification trigger runtime smallModel suppression', () => {
|
|
|
229
229
|
});
|
|
230
230
|
});
|
|
231
231
|
|
|
232
|
-
describe('notification trigger runtime llm system-session suppression', () => {
|
|
233
|
-
const llmSessionResponse = (purpose = 'chat-completions') => jsonResponse({
|
|
234
|
-
id: 'ses_llm',
|
|
235
|
-
parentID: null,
|
|
236
|
-
title: '[openchamber-llm] generate',
|
|
237
|
-
metadata: { openchamber: { llm: { purpose } } },
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
const expectAllOutletsSilent = ({
|
|
241
|
-
emitDesktopNotification,
|
|
242
|
-
broadcastUiNotification,
|
|
243
|
-
sendPushToAllUiSessions,
|
|
244
|
-
sendApnsToAllUiSessions,
|
|
245
|
-
sendLiveActivityEnd,
|
|
246
|
-
}) => {
|
|
247
|
-
expect(emitDesktopNotification).not.toHaveBeenCalled();
|
|
248
|
-
expect(broadcastUiNotification).not.toHaveBeenCalled();
|
|
249
|
-
expect(sendPushToAllUiSessions).not.toHaveBeenCalled();
|
|
250
|
-
expect(sendApnsToAllUiSessions).not.toHaveBeenCalled();
|
|
251
|
-
expect(sendLiveActivityEnd).not.toHaveBeenCalled();
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
it('skips ready notifications for llm sessions fetched by id', async () => {
|
|
255
|
-
vi.stubGlobal('fetch', vi.fn(async () => llmSessionResponse()));
|
|
256
|
-
const outlets = createRuntime();
|
|
257
|
-
await outlets.runtime.maybeSendPushForTrigger(completionPayload('ses_llm'));
|
|
258
|
-
expectAllOutletsSilent(outlets);
|
|
259
|
-
});
|
|
260
|
-
|
|
261
|
-
it('skips ready notifications synthesized from session.idle for llm sessions', async () => {
|
|
262
|
-
vi.stubGlobal('fetch', vi.fn(async () => llmSessionResponse()));
|
|
263
|
-
const outlets = createRuntime();
|
|
264
|
-
await outlets.runtime.maybeSendPushForTrigger({
|
|
265
|
-
type: 'session.idle',
|
|
266
|
-
properties: {
|
|
267
|
-
directory: '/repo',
|
|
268
|
-
sessionID: 'ses_llm',
|
|
269
|
-
},
|
|
270
|
-
});
|
|
271
|
-
expectAllOutletsSilent(outlets);
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
it('skips error notifications and live-activity end for llm sessions', async () => {
|
|
275
|
-
vi.stubGlobal('fetch', vi.fn(async () => llmSessionResponse()));
|
|
276
|
-
const outlets = createRuntime();
|
|
277
|
-
await outlets.runtime.maybeSendPushForTrigger({
|
|
278
|
-
type: 'session.error',
|
|
279
|
-
properties: {
|
|
280
|
-
directory: '/repo',
|
|
281
|
-
sessionID: 'ses_llm',
|
|
282
|
-
error: 'boom',
|
|
283
|
-
},
|
|
284
|
-
});
|
|
285
|
-
expectAllOutletsSilent(outlets);
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
it('skips question notifications for llm sessions', async () => {
|
|
289
|
-
vi.useFakeTimers();
|
|
290
|
-
vi.stubGlobal('fetch', vi.fn(async () => llmSessionResponse()));
|
|
291
|
-
const outlets = createRuntime();
|
|
292
|
-
await outlets.runtime.maybeSendPushForTrigger({
|
|
293
|
-
type: 'question.asked',
|
|
294
|
-
properties: {
|
|
295
|
-
directory: '/repo',
|
|
296
|
-
sessionID: 'ses_llm',
|
|
297
|
-
questions: [{ header: 'Input needed', question: 'Continue?' }],
|
|
298
|
-
},
|
|
299
|
-
});
|
|
300
|
-
await vi.runAllTimersAsync();
|
|
301
|
-
expectAllOutletsSilent(outlets);
|
|
302
|
-
});
|
|
303
|
-
|
|
304
|
-
it('skips permission notifications for llm sessions', async () => {
|
|
305
|
-
vi.useFakeTimers();
|
|
306
|
-
vi.stubGlobal('fetch', vi.fn(async () => llmSessionResponse()));
|
|
307
|
-
const outlets = createRuntime();
|
|
308
|
-
await outlets.runtime.maybeSendPushForTrigger({
|
|
309
|
-
type: 'permission.asked',
|
|
310
|
-
properties: {
|
|
311
|
-
directory: '/repo',
|
|
312
|
-
sessionID: 'ses_llm',
|
|
313
|
-
id: 'perm_llm',
|
|
314
|
-
permission: 'edit',
|
|
315
|
-
},
|
|
316
|
-
});
|
|
317
|
-
await vi.runAllTimersAsync();
|
|
318
|
-
expectAllOutletsSilent(outlets);
|
|
319
|
-
});
|
|
320
|
-
|
|
321
|
-
it('uses session.updated event cache so later idle stays suppressed without llm on fetch', async () => {
|
|
322
|
-
const fetchMock = vi.fn(async () => jsonResponse({
|
|
323
|
-
id: 'ses_llm',
|
|
324
|
-
parentID: null,
|
|
325
|
-
title: 'Ordinary after strip',
|
|
326
|
-
metadata: {},
|
|
327
|
-
}));
|
|
328
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
329
|
-
const outlets = createRuntime();
|
|
330
|
-
await outlets.runtime.maybeSendPushForTrigger({
|
|
331
|
-
type: 'session.updated',
|
|
332
|
-
properties: {
|
|
333
|
-
directory: '/repo',
|
|
334
|
-
info: {
|
|
335
|
-
id: 'ses_llm',
|
|
336
|
-
sessionID: 'ses_llm',
|
|
337
|
-
parentID: null,
|
|
338
|
-
title: '[openchamber-llm] generate',
|
|
339
|
-
metadata: { openchamber: { llm: { purpose: 'chat-completions' } } },
|
|
340
|
-
},
|
|
341
|
-
},
|
|
342
|
-
});
|
|
343
|
-
await outlets.runtime.maybeSendPushForTrigger({
|
|
344
|
-
type: 'session.idle',
|
|
345
|
-
properties: {
|
|
346
|
-
directory: '/repo',
|
|
347
|
-
sessionID: 'ses_llm',
|
|
348
|
-
},
|
|
349
|
-
});
|
|
350
|
-
expect(fetchMock).not.toHaveBeenCalled();
|
|
351
|
-
expectAllOutletsSilent(outlets);
|
|
352
|
-
});
|
|
353
|
-
|
|
354
|
-
it('does not treat empty llm.purpose as a hidden system session', async () => {
|
|
355
|
-
vi.stubGlobal('fetch', vi.fn(async () => jsonResponse({
|
|
356
|
-
id: 'ses_llm_empty',
|
|
357
|
-
parentID: null,
|
|
358
|
-
title: 'Looks like llm',
|
|
359
|
-
metadata: { openchamber: { llm: { purpose: '' } } },
|
|
360
|
-
})));
|
|
361
|
-
const {
|
|
362
|
-
runtime,
|
|
363
|
-
emitDesktopNotification,
|
|
364
|
-
sendPushToAllUiSessions,
|
|
365
|
-
sendApnsToAllUiSessions,
|
|
366
|
-
sendLiveActivityEnd,
|
|
367
|
-
} = createRuntime();
|
|
368
|
-
await runtime.maybeSendPushForTrigger(completionPayload('ses_llm_empty'));
|
|
369
|
-
expect(emitDesktopNotification).toHaveBeenCalledTimes(1);
|
|
370
|
-
expect(sendPushToAllUiSessions).toHaveBeenCalledTimes(1);
|
|
371
|
-
expect(sendApnsToAllUiSessions).toHaveBeenCalledTimes(1);
|
|
372
|
-
expect(sendLiveActivityEnd).toHaveBeenCalledWith({ sessionId: 'ses_llm_empty', status: 'complete' });
|
|
373
|
-
});
|
|
374
|
-
});
|
|
375
|
-
|
|
376
232
|
const rootSessionResponse = () => jsonResponse({
|
|
377
233
|
id: 'ses_root',
|
|
378
234
|
parentID: null,
|
|
@@ -18,9 +18,8 @@ the index excludes them from every snapshot and clears prior summaries when a
|
|
|
18
18
|
`metadata.openchamber.assistant.assistantID` (unless
|
|
19
19
|
`metadata.openchamber.assigned.from === 'contact'` — those are visible
|
|
20
20
|
coding workers the Assistant subscribed to),
|
|
21
|
-
`metadata.openchamber.scheduledTask.taskID`,
|
|
22
|
-
`metadata.openchamber.smallModel.purpose
|
|
23
|
-
`metadata.openchamber.llm.purpose`. Title prefixes are human labels and
|
|
21
|
+
`metadata.openchamber.scheduledTask.taskID`, or
|
|
22
|
+
`metadata.openchamber.smallModel.purpose`. Title prefixes are human labels and
|
|
24
23
|
never participate in this filter. Metadata is the ownership/isolation signal;
|
|
25
24
|
`time.archived` is archive state; `time.pinned` is OpenChamber-owned pin state
|
|
26
25
|
overlaid from the independent `session_pin` table (also mirrored onto in-window
|
|
@@ -20,7 +20,6 @@ const isSystemSession = (session) => {
|
|
|
20
20
|
if (nonEmptySystemID(openchamber.assistant?.assistantID) && !isContactAssignedSession(openchamber)) return true;
|
|
21
21
|
if (nonEmptySystemID(openchamber.scheduledTask?.taskID)) return true;
|
|
22
22
|
if (nonEmptySystemID(openchamber.smallModel?.purpose)) return true;
|
|
23
|
-
if (nonEmptySystemID(openchamber.llm?.purpose)) return true;
|
|
24
23
|
return false;
|
|
25
24
|
};
|
|
26
25
|
|
|
@@ -68,7 +68,7 @@ describe('Electron session index', () => {
|
|
|
68
68
|
service.close();
|
|
69
69
|
});
|
|
70
70
|
|
|
71
|
-
it('excludes Assistant, Scheduled,
|
|
71
|
+
it('excludes Assistant, Scheduled, and smallModel system sessions from ordinary sidebar summaries', () => {
|
|
72
72
|
const runtimeRef = { value: 'http://runtime-a.test' };
|
|
73
73
|
const service = createService(runtimeRef);
|
|
74
74
|
const assistantSession = {
|
|
@@ -83,15 +83,11 @@ describe('Electron session index', () => {
|
|
|
83
83
|
...session('ses_small_model', 97),
|
|
84
84
|
metadata: { openchamber: { smallModel: { purpose: 'session-title' } } },
|
|
85
85
|
};
|
|
86
|
-
const llmSession = {
|
|
87
|
-
...session('ses_llm', 96),
|
|
88
|
-
metadata: { openchamber: { llm: { purpose: 'chat-completions' } } },
|
|
89
|
-
};
|
|
90
86
|
const ordinary = session('ses_ordinary', 98);
|
|
91
87
|
|
|
92
88
|
service.replaceDirectory({
|
|
93
89
|
directory: '/repo',
|
|
94
|
-
sessions: [assistantSession, scheduledSession, smallModelSession,
|
|
90
|
+
sessions: [assistantSession, scheduledSession, smallModelSession, ordinary],
|
|
95
91
|
cursor: null,
|
|
96
92
|
hasMore: false,
|
|
97
93
|
});
|
|
@@ -100,7 +96,6 @@ describe('Electron session index', () => {
|
|
|
100
96
|
service.upsert(assistantSession);
|
|
101
97
|
service.upsert(scheduledSession);
|
|
102
98
|
service.upsert(smallModelSession);
|
|
103
|
-
service.upsert(llmSession);
|
|
104
99
|
expect(service.snapshot().directories[0].sessions.map((item) => item.id)).toEqual(['ses_ordinary']);
|
|
105
100
|
service.close();
|
|
106
101
|
});
|
|
@@ -35,10 +35,9 @@ throttle (`TITLE_THROTTLE_MS`) when a refresh is armed.
|
|
|
35
35
|
3. On fire:
|
|
36
36
|
- Skip when Settings → Chat → session title refresh is off.
|
|
37
37
|
- Skip system-owned sessions whose metadata carries a non-empty
|
|
38
|
-
`openchamber.assistant.assistantID`, `openchamber.scheduledTask.taskID`,
|
|
39
|
-
`openchamber.smallModel.purpose
|
|
40
|
-
(fixed Assistant / scheduled / small-model
|
|
41
|
-
rewritten). Early
|
|
38
|
+
`openchamber.assistant.assistantID`, `openchamber.scheduledTask.taskID`, or
|
|
39
|
+
`openchamber.smallModel.purpose`
|
|
40
|
+
(fixed Assistant / scheduled / small-model titles must not be rewritten). Early
|
|
42
41
|
`session.created` and smart-title request extraction skip the same
|
|
43
42
|
metadata when present so timers are not armed.
|
|
44
43
|
- Skip sub-agent sessions (`parentID`), multi-run/fusion structural titles,
|
|
@@ -167,7 +167,6 @@ export const isSystemOwnedSession = (sessionOrInfo) => {
|
|
|
167
167
|
if (typeof openchamber.assistant?.assistantID === 'string' && openchamber.assistant.assistantID) return true;
|
|
168
168
|
if (typeof openchamber.scheduledTask?.taskID === 'string' && openchamber.scheduledTask.taskID) return true;
|
|
169
169
|
if (typeof openchamber.smallModel?.purpose === 'string' && openchamber.smallModel.purpose) return true;
|
|
170
|
-
if (typeof openchamber.llm?.purpose === 'string' && openchamber.llm.purpose) return true;
|
|
171
170
|
return false;
|
|
172
171
|
};
|
|
173
172
|
|
|
@@ -235,9 +235,6 @@ describe('session-title helpers', () => {
|
|
|
235
235
|
expect(isSystemOwnedSession({
|
|
236
236
|
metadata: { openchamber: { smallModel: { purpose: 'session-title' } } },
|
|
237
237
|
})).toBe(true);
|
|
238
|
-
expect(isSystemOwnedSession({
|
|
239
|
-
metadata: { openchamber: { llm: { purpose: 'chat-completions' } } },
|
|
240
|
-
})).toBe(true);
|
|
241
238
|
expect(isSystemOwnedSession({
|
|
242
239
|
title: '[Assistant] Looks system',
|
|
243
240
|
metadata: { openchamber: { assistant: { name: 'no-id' } } },
|
|
@@ -245,9 +242,6 @@ describe('session-title helpers', () => {
|
|
|
245
242
|
expect(isSystemOwnedSession({
|
|
246
243
|
metadata: { openchamber: { smallModel: { purpose: '' } } },
|
|
247
244
|
})).toBe(false);
|
|
248
|
-
expect(isSystemOwnedSession({
|
|
249
|
-
metadata: { openchamber: { llm: { purpose: '' } } },
|
|
250
|
-
})).toBe(false);
|
|
251
245
|
expect(isSystemOwnedSession({ title: 'Ordinary' })).toBe(false);
|
|
252
246
|
expect(isSystemOwnedSession({
|
|
253
247
|
metadata: { openchamber: { assigned: { from: 'contact', assistantID: 'assistant_1' } } },
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MarkstreamRendererImpl-CQ9A_Axs.js","assets/rolldown-runtime-C0FnF6B9.js","assets/vendor-base-ui-CnHfUmDN.js","assets/vendor-react-DLPElpoQ.js","assets/vendor-markstream-react-DX55XLGO.js","assets/vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js","assets/vendor-markstream-core-Cm34iPLL.js","assets/vendor-floating-ui-dom-BHhLtF5l.js","assets/vendor-floating-ui-core-Co1I1lFV.js","assets/vendor-reactuses-core-DDoDDyM9.js","assets/vendor-lodash-es-DfLbG5Af.js","assets/vendor-js-cookie-hSOiFTtX.js","assets/useMobileNavigationStore-Dbafrikj.js","assets/useUIStore-CuaA8-Hp.js","assets/vendor-zustand-B4dlGEM2.js","assets/persistence-DdUac14I.js","assets/vendor-pathe-vBmvQE8f.js","assets/vendor-tanstack-query-core-BWz0ose6.js","assets/platform-B4KKLnZ5.js","assets/vendor-opencode-sdk-C07HQypa.js","assets/vendor-tanstack-react-query-D7pys_c9.js","assets/vendor-sonner-DVzioF3d.js","assets/clipboard-DJ4nQEuY.js","assets/store-BDFdnk6l.js","assets/useAssistantUIStore-me6s63b2.js","assets/vendor-fuse.js-DB5wDJbI.js","assets/utils-BiK3tBGM.js","assets/vendor-class-variance-authority-BLUaYARZ.js","assets/vendor-tailwind-merge-BicNWLTg.js","assets/useThemeSystem-DMzWVJaW.js","assets/useRuntimeAPIs-DSLXJybW.js","assets/url-Pk6tQ1EZ.js","assets/useEffectiveDirectory-D1SRQYSV.js","assets/markdownHeightCache-CYDlisxr.js","assets/MarkdownRendererImpl-16-hpTiD.js","assets/vendor-katex--B5dHUyk.js","assets/markdownTheme-DyJ4Gfcj.js","assets/vendor-pierre-diffs-DX7XTPG3.js","assets/vendor-hast-util-to-html-B0p1k5Xa.js","assets/vendor-character-entities-legacy-Wut6vMuj.js","assets/vendor-character-entities-html4-DlN_yAFd.js","assets/vendor-ccount-CyGsA0u7.js","assets/vendor-comma-separated-tokens-B9ouxNNS.js","assets/vendor-oniguruma-to-es-CrHzjjSU.js","assets/vendor-oniguruma-parser-D2DIvhSP.js","assets/vendor-diff-Dq7CZNim.js","assets/vendor-lru_map-DpDied8H.js","assets/markdown-worker-CTsrtpPh.js","assets/FadeInOnReveal-CTlNE4Hg.js","assets/vendor-morphdom-BbKiNDAu.js","assets/vendor-beautiful-mermaid-DykqIK5D.js","assets/vendor-dompurify-CeJNOzik.js","assets/vendor-marked-WVekxjAN.js","assets/vendor-remend-C3cXc-tf.js","assets/MarkstreamRendererImpl-DKhVy3nF.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t}from"./vendor-zustand-B4dlGEM2.js";import{nt as n,rt as r}from"./vendor-base-ui-CnHfUmDN.js";import{o as i}from"./vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js";import{n as a}from"./vendor-react-DLPElpoQ.js";import{t as o}from"./utils-BiK3tBGM.js";import{a as s,n as c,t as l}from"./markdownHeightCache-CYDlisxr.js";var u=a(),d=e(r(),1),f=`openchamber:chunk-import-reload`,p=250,m=3e4,h=[/Importing a module script failed/i,/Failed to fetch dynamically imported module/i,/error loading dynamically imported module/i,/Loading chunk \S+ failed/i,/ChunkLoadError/i];function g(e){if(e instanceof Error)return`${e.name}\n${e.message}\n${e.stack??``}`;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function _(e){let t=g(e);return h.some(e=>e.test(t))}function v(e){return`1.19.8-beta.9:${g(e).slice(0,500)}`}function y(e){if(typeof window>`u`)return;let t=Date.now(),n=v(e),r=null;try{let e=window.sessionStorage.getItem(f);if(e)try{r=JSON.parse(e)}catch{r=null}}catch{return}let i=typeof r?.timestamp==`number`?r.timestamp:0;if(!(r?.signature===n&&t-i<m)){try{window.sessionStorage.setItem(f,JSON.stringify({signature:n,timestamp:t}))}catch{return}console.error(`[refresh-debug] chunk-import-reload`,{error:g(e).slice(0,1e3)}),window.setTimeout(()=>{window.location.reload()},0)}}async function b(e,t={}){let n=t.retries??1,r;for(let t=0;t<=n;t+=1)try{return await e()}catch(e){if(r=e,!_(e)||t>=n)break;await new Promise(e=>setTimeout(e,p*(t+1)))}throw _(r)&&y(r),r}var x=e=>(0,d.lazy)(()=>b(e)),S=(e,t)=>{try{let n=t??(typeof localStorage>`u`?null:localStorage);return n?n.getItem(e)===`1`:!1}catch{return!1}},C=(e,t)=>{try{let n=t??(typeof localStorage>`u`?null:localStorage);return!n||n.getItem(e)!==`0`}catch{return!0}},w=(e,t)=>{try{typeof localStorage<`u`&&localStorage.setItem(e,t?`1`:`0`)}catch{}},T=`oc:legend-timeline`,E=e=>S(T,e),D=`oc:markstream-react`,O=e=>C(D,e),k=t(e=>({legendTimelineEnabled:E(),setLegendTimelineEnabled:t=>{w(T,t),e({legendTimelineEnabled:t})},markstreamReactEnabled:O(),setMarkstreamReactEnabled:t=>{w(D,t),e({markstreamReactEnabled:t})}})),A=null,j=()=>(A??=i(()=>import(`./MarkstreamRendererImpl-CQ9A_Axs.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54])).catch(e=>{throw A=null,e}),A),M=()=>{j().catch(()=>void 0)},N=null,P=()=>(N??=i(()=>import(`./MarkdownRendererImpl-16-hpTiD.js`).then(e=>e.n),__vite__mapDeps([34,1,13,14,2,15,16,3,17,18,19,5,35,9,10,11,22,23,12,20,21,24,25,26,27,28,29,36,37,38,39,40,41,42,43,44,45,46,30,31,47,33,32,48,49,50,51,52,53])).catch(e=>{throw N=null,e}),N),F=()=>{P().catch(()=>void 0),O()&&M()},I=class extends d.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){console.warn(`[markstream-react] falling back to the current Markdown renderer`,e)}render(){return this.state.hasError?this.props.fallback:this.props.children}},L=d.createContext(!0),R=()=>d.useContext(L),z=n(),B=x(()=>P().then(e=>({default:e.MarkdownRenderer}))),V=x(()=>j().then(e=>({default:e.MarkstreamRenderer}))),H=x(()=>P().then(e=>({default:e.SimpleMarkdownRenderer}))),U=e=>e===`tool`?`markdown-content markdown-tool`:e===`reasoning`?`markdown-content markdown-reasoning`:`markdown-content leading-relaxed`,W=e=>{let t=(0,u.c)(15),n=k(q),r=typeof e.content==`string`?e.content:``,i=typeof e.variant==`string`?e.variant:`assistant`,a;t[0]!==r||t[1]!==n||t[2]!==e.reserveMeasuredHeight||t[3]!==i?(a=e.reserveMeasuredHeight?c(l(r,n?`markstream:${i}`:i)):void 0,t[0]=r,t[1]=n,t[2]=e.reserveMeasuredHeight,t[3]=i,t[4]=a):a=t[4];let d=a,f;t[5]!==e.className||t[6]!==e.variant?(f=o(`relative break-words w-full min-w-0`,U(e.variant),typeof e.className==`string`?e.className:void 0),t[5]=e.className,t[6]=e.variant,t[7]=f):f=t[7];let p;t[8]!==r||t[9]!==e.animated||t[10]!==d?(p=(0,z.jsx)(s,{animated:e.animated,content:r,reservedHeight:d}),t[8]=r,t[9]=e.animated,t[10]=d,t[11]=p):p=t[11];let m;return t[12]!==f||t[13]!==p?(m=(0,z.jsx)(`div`,{className:f,"aria-busy":`true`,"data-markdown-hydration":`deferred`,"data-markdown-ready":`false`,children:p}),t[12]=f,t[13]=p,t[14]=m):m=t[14],m},G=e=>{let t=(0,u.c)(9),n=R(),r=k(J);if(!n&&e.isStreaming!==!0){let n;return t[0]===e?n=t[1]:(n=(0,z.jsx)(W,{...e,animated:!1,reserveMeasuredHeight:!0}),t[0]=e,t[1]=n),n}let i;t[2]===e?i=t[3]:(i=(0,z.jsx)(d.Suspense,{fallback:(0,z.jsx)(W,{...e,reserveMeasuredHeight:!0}),children:(0,z.jsx)(B,{...e})}),t[2]=e,t[3]=i);let a=i;if(!r)return a;let o;t[4]===e?o=t[5]:(o=(0,z.jsx)(d.Suspense,{fallback:(0,z.jsx)(W,{...e,reserveMeasuredHeight:!0}),children:(0,z.jsx)(V,{...e})}),t[4]=e,t[5]=o);let s;return t[6]!==a||t[7]!==o?(s=(0,z.jsx)(I,{fallback:a,children:o}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s},K=e=>{let t=(0,u.c)(4);if(!R()){let n;return t[0]===e?n=t[1]:(n=(0,z.jsx)(W,{...e,animated:!1}),t[0]=e,t[1]=n),n}let n;return t[2]===e?n=t[3]:(n=(0,z.jsx)(d.Suspense,{fallback:(0,z.jsx)(W,{...e}),children:(0,z.jsx)(H,{...e})}),t[2]=e,t[3]=n),n};function q(e){return e.markstreamReactEnabled}function J(e){return e.markstreamReactEnabled}export{k as a,F as i,K as n,x as o,L as r,G as t};
|