@openchambery/web 1.18.2-beta.12 → 1.18.2-beta.14
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/{AgentAvatar-BzRb9sP6.js → AgentAvatar-B4fj9PIe.js} +1 -1
- package/dist/assets/AssistantView-BKlbxZyK.js +1 -0
- package/dist/assets/{ChatContainer-9cw5pRwD.js → ChatContainer-BH5Q0OcG.js} +9 -9
- package/dist/assets/{DiagramView-DmZ4jKmn.js → DiagramView-fK3UrzlE.js} +1 -1
- package/dist/assets/{FadeInOnReveal-oeyB_nIi.js → FadeInOnReveal-CKKU6fKI.js} +1 -1
- package/dist/assets/{Icon-DHaR0peD.js → Icon-DiIuWOuC.js} +1 -1
- package/dist/assets/{MarkdownRendererImpl-B6zceXlX.js → MarkdownRendererImpl-DrRS_Mj-.js} +1 -1
- package/dist/assets/{MobileDetailNavigation-fdO6J2xj.js → MobileDetailNavigation-iyCRQGq6.js} +1 -1
- package/dist/assets/{MobileShareBridge-Czlandhf.js → MobileShareBridge-CEz3kBX3.js} +1 -1
- package/dist/assets/{MobileSurface-DppgVqKs.js → MobileSurface-BW5JgI5O.js} +1 -1
- package/dist/assets/{MultiRunWindow-CvMgGQLj.js → MultiRunWindow-5nJ89UeU.js} +1 -1
- package/dist/assets/{OnboardingScreen-BZHN7C2r.js → OnboardingScreen-CNMknKIz.js} +1 -1
- package/dist/assets/{OverlayScrollbar-DwdKeYSb.js → OverlayScrollbar-C2PKulfj.js} +1 -1
- package/dist/assets/{SettingsView-cfFQW5LJ.js → SettingsView-DlMRauNf.js} +1 -1
- package/dist/assets/{SettingsWindow-DebnkbG9.js → SettingsWindow-BMGjq7sz.js} +1 -1
- package/dist/assets/{TerminalView-CWBmPQJ_.js → TerminalView-CjsjAgBp.js} +1 -1
- package/dist/assets/{ToolOutputDialog-CyKqI69B.js → ToolOutputDialog-CnO6gAC7.js} +1 -1
- package/dist/assets/{appThemeRegistry-CmZlBPov.js → appThemeRegistry-CXo91lud.js} +2 -2
- package/dist/assets/{button-DCUMIXDC.js → button-DaAoVF4X.js} +1 -1
- package/dist/assets/{clipboard-DF5tFLDb.js → clipboard-DDtEAXwp.js} +1 -1
- package/dist/assets/{collapsible-DNg5bLKV.js → collapsible-BmuQu0dq.js} +1 -1
- package/dist/assets/{context-menu-Bbd153RL.js → context-menu-DbYwL067.js} +1 -1
- package/dist/assets/{desktopHosts-DSgGxDpI.js → desktopHosts-ZK_vkdzL.js} +1 -1
- package/dist/assets/{desktopRelayRestore-DVIx7jsz.js → desktopRelayRestore-CewM6-g5.js} +1 -1
- package/dist/assets/{diagram-cjvFqVa8.js → diagram-DAE4CZy2.js} +1 -1
- package/dist/assets/{dialog-DaSIYgrj.js → dialog-CLUnqzNl.js} +1 -1
- package/dist/assets/{fileQueries-DXvhIL_U.js → fileQueries-CmWYnRVz.js} +1 -1
- package/dist/assets/{gitApi-BlInY34O.js → gitApi-DbudVv-1.js} +1 -1
- package/dist/assets/{gitApiHttp-SLrnr8a5.js → gitApiHttp-BxGAFLTf.js} +1 -1
- package/dist/assets/{input-QS3IWgY5.js → input-XiL2-2gG.js} +1 -1
- package/dist/assets/{insertionBoundaries-CiTMpUdk.js → insertionBoundaries-C3LQiAH4.js} +1 -1
- package/dist/assets/{main-DQxV4rh8.js → main-CoT0vDkM.js} +2 -2
- package/dist/assets/{main-CUN5Brht.js → main-DNIq2ApI.js} +12 -12
- package/dist/assets/{markdown-worker-D-OR2e_G.js → markdown-worker-BDyY0vt6.js} +1 -1
- package/dist/assets/{markdownTheme-y_Rf6mLa.js → markdownTheme-D-aLQZaM.js} +1 -1
- package/dist/assets/{miniChat-Bx2cMtJS.js → miniChat-MmffZf1Z.js} +2 -2
- package/dist/assets/mobile-DWXVmge1.js +2 -0
- package/dist/assets/{multirun-DaUWpTWM.js → multirun-CkvHavte.js} +1 -1
- package/dist/assets/{persistence-oSFWyKgV.js → persistence-D1lIuyqO.js} +1 -1
- package/dist/assets/{projectMeta-DtoKE1uJ.js → projectMeta-B493xmWa.js} +1 -1
- package/dist/assets/{radio-BiawVf-W.js → radio-CgKdnGSl.js} +1 -1
- package/dist/assets/{renderElectronMiniChatApp-BPvk5Kd6.js → renderElectronMiniChatApp-KQLIgpz7.js} +2 -2
- package/dist/assets/{renderMobileApp-D7V_905J.js → renderMobileApp-Dv-6ehQM.js} +4 -4
- package/dist/assets/{runtimeConfig-n4QAk1lU.js → runtimeConfig-BXCt7ZsQ.js} +1 -1
- package/dist/assets/runtimeEndpointReset-COE06B3r.js +145 -0
- package/dist/assets/{sortable-tabs-strip-BEalEtjO.js → sortable-tabs-strip-B6nysrlL.js} +1 -1
- package/dist/assets/{terminalApi-_NnfkxgP.js → terminalApi-DpiAJlil.js} +1 -1
- package/dist/assets/{tooltip-xEnco9xY.js → tooltip-BLugzWq-.js} +1 -1
- package/dist/assets/{url-DIZgk80M.js → url-DMs_PgIC.js} +1 -1
- package/dist/assets/{useAppFontEffects-DOb592S6.js → useAppFontEffects-BxqiSjTE.js} +5 -5
- package/dist/assets/{useDesktopWindowControlsLayout-COCcsUGy.js → useDesktopWindowControlsLayout-tw70hQqL.js} +1 -1
- package/dist/assets/{useEffectiveDirectory-DXGFGuv0.js → useEffectiveDirectory-DvMBtKLj.js} +1 -1
- package/dist/assets/{useFontPreferences-B-QHyR3C.js → useFontPreferences-92Qg-98H.js} +1 -1
- package/dist/assets/{useMobileNavigationStore-D5XHlGZB.js → useMobileNavigationStore-Y1jVRW3U.js} +3 -3
- package/dist/assets/{useSessionAutoCleanup-DvK0S9G6.js → useSessionAutoCleanup-C1joiK7e.js} +1 -1
- package/dist/assets/{useWorkerHighlightedLines-BTFe-rdw.js → useWorkerHighlightedLines-BsIvNEvi.js} +1 -1
- package/dist/assets/{utils-Dxsi3J3l.js → utils-BxJEIWv5.js} +1 -1
- package/dist/index.html +7 -7
- package/dist/mini-chat.html +7 -7
- package/dist/mobile.html +7 -7
- package/package.json +1 -1
- package/server/lib/event-stream/DOCUMENTATION.md +2 -2
- package/server/lib/event-stream/diff-summary.js +28 -19
- package/server/lib/event-stream/diff-summary.test.js +37 -10
- package/server/lib/event-stream/protocol.test.js +66 -3
- package/server/lib/opencode/DOCUMENTATION.md +1 -1
- package/server/lib/session-turn-pages/DOCUMENTATION.md +3 -3
- package/server/lib/session-turn-pages/reconcile.routes.test.js +6 -2
- package/server/lib/session-turn-pages/reconcile.service.test.js +6 -2
- package/server/lib/session-turn-pages/routes.js +3 -3
- package/server/lib/session-turn-pages/routes.test.js +41 -13
- package/server/lib/session-turn-pages/service.js +4 -2
- package/server/lib/session-turn-pages/service.test.js +13 -3
- package/dist/assets/AssistantView-De54yQXX.js +0 -1
- package/dist/assets/mobile-BvWi_rq9.js +0 -2
- package/dist/assets/runtimeEndpointReset-DpaiHzaP.js +0 -145
|
@@ -223,7 +223,7 @@ describe('event stream protocol helpers', () => {
|
|
|
223
223
|
expect(rawPayload.length).toBeLessThan(64 * 1024);
|
|
224
224
|
});
|
|
225
225
|
|
|
226
|
-
it('projects message.updated summary.diffs to L1
|
|
226
|
+
it('projects message.updated summary.diffs to L1 slim list + markers on outbound frames', () => {
|
|
227
227
|
let rawPayload = null;
|
|
228
228
|
const socket = {
|
|
229
229
|
readyState: 1,
|
|
@@ -246,6 +246,8 @@ describe('event stream protocol helpers', () => {
|
|
|
246
246
|
additions: 2,
|
|
247
247
|
deletions: 1,
|
|
248
248
|
patch: '@@ heavy patch body @@\n' + 'y'.repeat(1000),
|
|
249
|
+
before: 'old',
|
|
250
|
+
after: 'new',
|
|
249
251
|
}],
|
|
250
252
|
},
|
|
251
253
|
},
|
|
@@ -255,12 +257,73 @@ describe('event stream protocol helpers', () => {
|
|
|
255
257
|
expect(sent).toBe(true);
|
|
256
258
|
const frame = JSON.parse(rawPayload);
|
|
257
259
|
expect(frame.payload.properties.info.summary).toEqual({
|
|
260
|
+
diffs: [{
|
|
261
|
+
file: 'a.ts',
|
|
262
|
+
status: 'modified',
|
|
263
|
+
additions: 2,
|
|
264
|
+
deletions: 1,
|
|
265
|
+
}],
|
|
258
266
|
diffCount: 1,
|
|
259
267
|
hasDiffs: true,
|
|
260
268
|
});
|
|
261
|
-
expect(frame.payload.properties.info.summary.diffs).toBeUndefined();
|
|
262
269
|
expect(JSON.stringify(frame)).not.toContain('patch');
|
|
263
|
-
expect(JSON.stringify(frame)).not.toContain('
|
|
270
|
+
expect(JSON.stringify(frame)).not.toContain('"before"');
|
|
271
|
+
expect(JSON.stringify(frame)).not.toContain('"after"');
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
it('keeps L1 message.updated serialization under 256KiB for a 463-file / ~14MB patch summary', () => {
|
|
275
|
+
let rawPayload = null;
|
|
276
|
+
const socket = {
|
|
277
|
+
readyState: 1,
|
|
278
|
+
send(payload) {
|
|
279
|
+
rawPayload = payload;
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
const patchBody = 'P'.repeat(Math.floor((14 * 1024 * 1024) / 463));
|
|
284
|
+
const diffs = Array.from({ length: 463 }, (_, i) => ({
|
|
285
|
+
file: `src/generated/file-${i}.ts`,
|
|
286
|
+
status: 'modified',
|
|
287
|
+
additions: i % 7,
|
|
288
|
+
deletions: i % 3,
|
|
289
|
+
patch: `${patchBody}-${i}`,
|
|
290
|
+
before: `before-${i}`,
|
|
291
|
+
after: `after-${i}`,
|
|
292
|
+
from: `from-${i}`,
|
|
293
|
+
to: `to-${i}`,
|
|
294
|
+
}));
|
|
295
|
+
|
|
296
|
+
const sent = sendMessageStreamWsEvent(socket, {
|
|
297
|
+
type: 'message.updated',
|
|
298
|
+
properties: {
|
|
299
|
+
info: {
|
|
300
|
+
id: 'msg_huge',
|
|
301
|
+
sessionID: 'ses_huge',
|
|
302
|
+
role: 'assistant',
|
|
303
|
+
summary: { title: 'huge', diffs },
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
expect(sent).toBe(true);
|
|
309
|
+
const frame = JSON.parse(rawPayload);
|
|
310
|
+
const summary = frame.payload.properties.info.summary;
|
|
311
|
+
expect(summary.diffCount).toBe(463);
|
|
312
|
+
expect(summary.hasDiffs).toBe(true);
|
|
313
|
+
expect(summary.diffs).toHaveLength(463);
|
|
314
|
+
expect(summary.diffs[0]).toEqual({
|
|
315
|
+
file: 'src/generated/file-0.ts',
|
|
316
|
+
status: 'modified',
|
|
317
|
+
additions: 0,
|
|
318
|
+
deletions: 0,
|
|
319
|
+
});
|
|
320
|
+
expect(rawPayload).not.toContain(patchBody.slice(0, 64));
|
|
321
|
+
expect(rawPayload).not.toContain('"patch"');
|
|
322
|
+
expect(rawPayload).not.toContain('"before"');
|
|
323
|
+
expect(rawPayload).not.toContain('"after"');
|
|
324
|
+
expect(rawPayload).not.toContain('"from"');
|
|
325
|
+
expect(rawPayload).not.toContain('"to"');
|
|
326
|
+
expect(Buffer.byteLength(rawPayload, 'utf8')).toBeLessThan(256 * 1024);
|
|
264
327
|
});
|
|
265
328
|
|
|
266
329
|
it('leaves ordinary session.status events unchanged', () => {
|
|
@@ -28,7 +28,7 @@ This module provides OpenCode server integration utilities for the web server ru
|
|
|
28
28
|
- `packages/web/server/lib/opencode/static-routes-runtime.js`: static asset/SPA fallback route registration and manifest route wiring.
|
|
29
29
|
- `packages/web/server/lib/opencode/feature-routes-runtime.js`: feature route composition runtime for dynamic import-backed config/skill/provider route registration.
|
|
30
30
|
- `packages/web/server/lib/conversations/`: combined create-session-and-prompt orchestration (OpenChamber-owned, registered before generic proxy).
|
|
31
|
-
- `packages/web/server/lib/session-turn-pages/`: turn-window session message pagination (`GET /api/openchamber/sessions/:sessionID/messages`), anchor reconcile (`GET .../messages/reconcile`), Changes L2/L3 (`GET .../changes`), and exact message L1 projection (`GET /api/session/:sessionID/message/:messageID`); loops official OpenCode `session.messages` for turn pages and head→anchor gap recovery with continuation/budgets/`resetRequired`; all registered before generic proxy. L1 first-packet / SSE / exact-message paths
|
|
31
|
+
- `packages/web/server/lib/session-turn-pages/`: turn-window session message pagination (`GET /api/openchamber/sessions/:sessionID/messages`), anchor reconcile (`GET .../messages/reconcile`), Changes L2/L3 (`GET .../changes`), and exact message L1 projection (`GET /api/session/:sessionID/message/:messageID`); loops official OpenCode `session.messages` for turn pages and head→anchor gap recovery with continuation/budgets/`resetRequired`; all registered before generic proxy. L1 first-packet / SSE / exact-message paths keep `summary.diffs` as a slim `{ file, status?, additions, deletions }` list plus additive `diffCount`/`hasDiffs` (patch bodies stay on L3). See `session-turn-pages/DOCUMENTATION.md`.
|
|
32
32
|
- `packages/web/server/lib/opencode/opencode-resolution-runtime.js`: OpenCode binary resolution snapshot runtime for settings routes and diagnostics.
|
|
33
33
|
- `packages/web/server/lib/opencode/tunnel-wiring-runtime.js`: active loopback-port wiring shared by pairing/LAN URLs and the private relay host.
|
|
34
34
|
- `packages/web/server/lib/opencode/startup-pipeline-runtime.js`: server startup tail orchestration runtime for terminal/proxy/static/start-listen flow.
|
|
@@ -79,11 +79,11 @@ Every turn-page response summarizes `tool`, `reasoning`, and `file` parts plus m
|
|
|
79
79
|
|
|
80
80
|
| Layer | Surface | Payload |
|
|
81
81
|
|---|---|---|
|
|
82
|
-
| **L1** | Turn pages, reconcile response pages, message/session SSE fan-out, exact `GET /api/session/:sessionID/message/:messageID` | Any `info.summary.diffs` **array** is projected to `summary.diffCount: number`
|
|
82
|
+
| **L1** | Turn pages, reconcile response pages, message/session SSE fan-out, exact `GET /api/session/:sessionID/message/:messageID` | Any `info.summary.diffs` **array** is projected to a **slim file list** `[{ file, status?, additions, deletions }]` plus additive markers `summary.diffCount: number` and `summary.hasDiffs: boolean`. Patch/before/after/from/to and other heavy bodies are stripped. Other lightweight summary fields are preserved. `diffCount` equals the slim array length; `hasDiffs === diffCount > 0`. Consumers may use either the slim array or the markers. |
|
|
83
83
|
| **L2** | `GET /api/openchamber/sessions/:sessionID/changes?messageID=` (no `file`) | Host reads official `session.message` locally, returns only `{ files: [{ file, status?, additions, deletions }] }`. Never returns patch/before/after/from/to or the full message envelope. |
|
|
84
84
|
| **L3** | Same route with `file=` | Host calls official `session.diff({ sessionID, messageID, directory })`, returns `{ diff: SnapshotFileDiff }` for the exact `file` string match (includes that file's patch). No match → HTTP 404 `{ error: 'change file not found', code: 'change_not_found' }`. |
|
|
85
85
|
|
|
86
|
-
Exact message GET keeps the official `{ info, parts }` response shape and only applies L1 summary projection so materialize/recovery never relays
|
|
86
|
+
Exact message GET keeps the official `{ info, parts }` response shape and only applies L1 summary projection so materialize/recovery never relays raw multi-megabyte patch bodies through the generic proxy. Abort/45s timeout semantics match the turn-page routes. Global `/api` auth still applies.
|
|
87
87
|
|
|
88
88
|
Changes query guards: `sessionID` / `messageID` length `1..512`; optional `file` length `1..4096` and rejects control characters / NUL. Failures: invalid params → 400, abort → 499, upstream/malformed → 502. Logs carry only safe flags and ids — never paths, patch bodies, or tokens.
|
|
89
89
|
|
|
@@ -100,7 +100,7 @@ Rules:
|
|
|
100
100
|
- Slim tool input keeps only short locator and task-identity fields (path, pattern, query, command, `subagent_type`, `description`, skill `name` / `id`). Slim metadata keeps `sessionId`, skill `name`, plus edit `additions`/`deletions`. Projection still drops result bodies, task prompts, patches, and large write payloads.
|
|
101
101
|
- Assistant `text` stays intact. User rows are no longer wholesale pass-through: their `file` parts are projected; other user parts stay as-is.
|
|
102
102
|
- `file` projection keeps already-present size/width/height (top-level or `metadata`). `byteSize` is derived from a data URL when present. PNG/GIF/JPEG/WebP headers may fill missing `width`/`height`. Unknown dimensions omit those fields.
|
|
103
|
-
- Message `info.summary.diffs` is L1-projected to `diffCount` / `hasDiffs` (
|
|
103
|
+
- Message `info.summary.diffs` is L1-projected to a slim file list plus `diffCount` / `hasDiffs` (never patch bodies). Reconcile preserves full parts and applies this same L1 summary projection to response-page byte budgeting and serialization; raw upstream scan budgets retain raw bytes. Clients that need a dedicated file-list envelope or per-file patches use the Changes L2/L3 API.
|
|
104
104
|
- A slim `file` part is a reference, not renderable content. Clients must hydrate the full message (`session.message` by `messageID`) before painting or editing the attachment. Do not treat slim file metadata as a complete part.
|
|
105
105
|
- Records that gain nothing from projection keep their original object reference, so identity-based change detection downstream still works.
|
|
106
106
|
- Projection applies to every turn-page response, including first packet, prepend, and explicit cursors (`before` present). Reconcile routes return full parts, unchanged.
|
|
@@ -244,17 +244,21 @@ describe('registerSessionTurnPageRoutes — reconcile', () => {
|
|
|
244
244
|
|
|
245
245
|
expect(res.statusCode).toBe(200);
|
|
246
246
|
expect(res.body.records[0].info.summary).toEqual({
|
|
247
|
+
diffs: [{
|
|
248
|
+
file: 'src/large.ts',
|
|
249
|
+
status: 'modified',
|
|
250
|
+
additions: 5,
|
|
251
|
+
deletions: 1,
|
|
252
|
+
}],
|
|
247
253
|
diffCount: 1,
|
|
248
254
|
hasDiffs: true,
|
|
249
255
|
});
|
|
250
|
-
expect(res.body.records[0].info.summary.diffs).toBeUndefined();
|
|
251
256
|
expect(res.body.records[0].parts[0]).toEqual({
|
|
252
257
|
id: 'prt_1',
|
|
253
258
|
type: 'text',
|
|
254
259
|
text: 'full recovery text',
|
|
255
260
|
});
|
|
256
261
|
expect(JSON.stringify(res.body)).not.toContain(patch);
|
|
257
|
-
expect(JSON.stringify(res.body)).not.toContain('src/large.ts');
|
|
258
262
|
});
|
|
259
263
|
|
|
260
264
|
it('returns HTTP 200 for resetRequired (anchor lost / budget rebuild)', async () => {
|
|
@@ -512,13 +512,17 @@ describe('createSessionReconcileService', () => {
|
|
|
512
512
|
|
|
513
513
|
expect(result.ok).toBe(true);
|
|
514
514
|
expect(result.records[0].info.summary).toEqual({
|
|
515
|
+
diffs: [{
|
|
516
|
+
file: 'src/large.ts',
|
|
517
|
+
status: 'modified',
|
|
518
|
+
additions: 7,
|
|
519
|
+
deletions: 2,
|
|
520
|
+
}],
|
|
515
521
|
diffCount: 1,
|
|
516
522
|
hasDiffs: true,
|
|
517
523
|
});
|
|
518
|
-
expect(result.records[0].info.summary.diffs).toBeUndefined();
|
|
519
524
|
expect(result.responseBytes).toBeLessThanOrEqual(1024);
|
|
520
525
|
expect(JSON.stringify(result.records)).not.toContain(patch);
|
|
521
|
-
expect(JSON.stringify(result.records)).not.toContain('src/large.ts');
|
|
522
526
|
});
|
|
523
527
|
|
|
524
528
|
it('rejects continuation that does not bind runtime/directory/session/anchor/head', async () => {
|
|
@@ -307,7 +307,7 @@ const createSdkFetchDiff = ({ buildOpenCodeUrl, getOpenCodeAuthHeaders, logger }
|
|
|
307
307
|
|
|
308
308
|
/**
|
|
309
309
|
* Project exact message GET payload: keep original `{ info, parts }` shape,
|
|
310
|
-
* only L1-project `info.summary.diffs` → diffCount/hasDiffs.
|
|
310
|
+
* only L1-project `info.summary.diffs` → slim file list + diffCount/hasDiffs.
|
|
311
311
|
*/
|
|
312
312
|
export const projectExactMessagePayload = (payload) => {
|
|
313
313
|
if (!payload || typeof payload !== 'object' || Array.isArray(payload)) {
|
|
@@ -625,8 +625,8 @@ export const registerSessionTurnPageRoutes = (app, dependencies = {}) => {
|
|
|
625
625
|
|
|
626
626
|
/**
|
|
627
627
|
* Exact message GET — registered before generic `/api` proxy so materialize /
|
|
628
|
-
* recovery never relay
|
|
629
|
-
* `{ info, parts }` shape with L1
|
|
628
|
+
* recovery never relay raw multi-megabyte patch bodies in `summary.diffs`.
|
|
629
|
+
* Returns the official `{ info, parts }` shape with L1 slim-list projection.
|
|
630
630
|
*/
|
|
631
631
|
app.get('/api/session/:sessionID/message/:messageID', async (req, res) => {
|
|
632
632
|
const sessionID = req.params?.sessionID;
|
|
@@ -320,7 +320,7 @@ describe('registerSessionTurnPageRoutes', () => {
|
|
|
320
320
|
expect(part.state.output).toBeUndefined();
|
|
321
321
|
});
|
|
322
322
|
|
|
323
|
-
it('projects message summary.diffs to L1
|
|
323
|
+
it('projects message summary.diffs to L1 slim list + markers before serializing a turn-page response', async () => {
|
|
324
324
|
const patch = 'diff-body-'.repeat(20_000);
|
|
325
325
|
const loadPage = vi.fn(async () => ({
|
|
326
326
|
ok: true,
|
|
@@ -335,6 +335,8 @@ describe('registerSessionTurnPageRoutes', () => {
|
|
|
335
335
|
additions: 9,
|
|
336
336
|
deletions: 3,
|
|
337
337
|
patch,
|
|
338
|
+
before: 'old',
|
|
339
|
+
after: 'new',
|
|
338
340
|
}],
|
|
339
341
|
},
|
|
340
342
|
},
|
|
@@ -356,15 +358,21 @@ describe('registerSessionTurnPageRoutes', () => {
|
|
|
356
358
|
|
|
357
359
|
expect(res.statusCode).toBe(200);
|
|
358
360
|
expect(res.body.records[0].info.summary).toEqual({
|
|
361
|
+
diffs: [{
|
|
362
|
+
file: 'src/large.ts',
|
|
363
|
+
status: 'modified',
|
|
364
|
+
additions: 9,
|
|
365
|
+
deletions: 3,
|
|
366
|
+
}],
|
|
359
367
|
diffCount: 1,
|
|
360
368
|
hasDiffs: true,
|
|
361
369
|
});
|
|
362
|
-
expect(res.body.records[0].info.summary.diffs).toBeUndefined();
|
|
363
370
|
expect(JSON.stringify(res.body)).not.toContain(patch);
|
|
364
|
-
expect(JSON.stringify(res.body)).not.toContain('
|
|
371
|
+
expect(JSON.stringify(res.body)).not.toContain('"before"');
|
|
372
|
+
expect(JSON.stringify(res.body)).not.toContain('"after"');
|
|
365
373
|
});
|
|
366
374
|
|
|
367
|
-
it('keeps L1 turn-page serialization under
|
|
375
|
+
it('keeps L1 turn-page serialization under 256KiB for a 463-file / ~14MB patch summary', async () => {
|
|
368
376
|
const patchBody = 'P'.repeat(Math.floor((14 * 1024 * 1024) / 463));
|
|
369
377
|
const diffs = Array.from({ length: 463 }, (_, i) => ({
|
|
370
378
|
file: `src/generated/file-${i}.ts`,
|
|
@@ -374,6 +382,8 @@ describe('registerSessionTurnPageRoutes', () => {
|
|
|
374
382
|
patch: `${patchBody}-${i}`,
|
|
375
383
|
before: `before-${i}`,
|
|
376
384
|
after: `after-${i}`,
|
|
385
|
+
from: `from-${i}`,
|
|
386
|
+
to: `to-${i}`,
|
|
377
387
|
}));
|
|
378
388
|
const loadPage = vi.fn(async () => ({
|
|
379
389
|
ok: true,
|
|
@@ -401,16 +411,29 @@ describe('registerSessionTurnPageRoutes', () => {
|
|
|
401
411
|
|
|
402
412
|
expect(res.statusCode).toBe(200);
|
|
403
413
|
const serialized = JSON.stringify(res.body);
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
414
|
+
const summary = res.body.records[0].info.summary;
|
|
415
|
+
expect(summary.diffCount).toBe(463);
|
|
416
|
+
expect(summary.hasDiffs).toBe(true);
|
|
417
|
+
expect(summary.diffs).toHaveLength(463);
|
|
418
|
+
expect(summary.diffs[0]).toEqual({
|
|
419
|
+
file: 'src/generated/file-0.ts',
|
|
420
|
+
status: 'modified',
|
|
421
|
+
additions: 0,
|
|
422
|
+
deletions: 0,
|
|
423
|
+
});
|
|
424
|
+
expect(summary.diffs[462]).toEqual({
|
|
425
|
+
file: 'src/generated/file-462.ts',
|
|
426
|
+
status: 'modified',
|
|
427
|
+
additions: 462 % 7,
|
|
428
|
+
deletions: 462 % 3,
|
|
408
429
|
});
|
|
409
|
-
expect(res.body.records[0].info.summary.diffs).toBeUndefined();
|
|
410
|
-
expect(serialized).not.toContain('"diffs"');
|
|
411
430
|
expect(serialized).not.toContain(patchBody.slice(0, 64));
|
|
412
|
-
expect(serialized).not.toContain('
|
|
413
|
-
expect(
|
|
431
|
+
expect(serialized).not.toContain('"patch"');
|
|
432
|
+
expect(serialized).not.toContain('"before"');
|
|
433
|
+
expect(serialized).not.toContain('"after"');
|
|
434
|
+
expect(serialized).not.toContain('"from"');
|
|
435
|
+
expect(serialized).not.toContain('"to"');
|
|
436
|
+
expect(Buffer.byteLength(serialized, 'utf8')).toBeLessThan(256 * 1024);
|
|
414
437
|
});
|
|
415
438
|
|
|
416
439
|
it('projects file parts on first packet and prepend the same way', async () => {
|
|
@@ -630,6 +653,12 @@ describe('registerSessionTurnPageRoutes — exact message GET', () => {
|
|
|
630
653
|
role: 'user',
|
|
631
654
|
summary: {
|
|
632
655
|
title: 'turn',
|
|
656
|
+
diffs: [{
|
|
657
|
+
file: 'a.ts',
|
|
658
|
+
status: 'modified',
|
|
659
|
+
additions: 2,
|
|
660
|
+
deletions: 1,
|
|
661
|
+
}],
|
|
633
662
|
diffCount: 1,
|
|
634
663
|
hasDiffs: true,
|
|
635
664
|
},
|
|
@@ -637,7 +666,6 @@ describe('registerSessionTurnPageRoutes — exact message GET', () => {
|
|
|
637
666
|
parts: [{ id: 'prt_1', type: 'text', text: 'hello' }],
|
|
638
667
|
});
|
|
639
668
|
expect(JSON.stringify(res.body)).not.toContain(patch);
|
|
640
|
-
expect(JSON.stringify(res.body)).not.toContain('a.ts');
|
|
641
669
|
});
|
|
642
670
|
|
|
643
671
|
it('rejects oversize messageID / sessionID with 400', async () => {
|
|
@@ -459,8 +459,10 @@ const isUserRecord = (record) => {
|
|
|
459
459
|
};
|
|
460
460
|
|
|
461
461
|
/**
|
|
462
|
-
* L1: project message `summary.diffs`
|
|
463
|
-
*
|
|
462
|
+
* L1: project message `summary.diffs` to a slim file list
|
|
463
|
+
* `{ file, status?, additions, deletions }` plus additive `diffCount` /
|
|
464
|
+
* `hasDiffs`. Never retains patch/before/after/from/to. Preserves every other
|
|
465
|
+
* message / summary field.
|
|
464
466
|
*/
|
|
465
467
|
export const projectMessageDiffSummaries = (records) => {
|
|
466
468
|
if (!Array.isArray(records) || records.length === 0) return records;
|
|
@@ -172,7 +172,7 @@ describe('projectSlimParts', () => {
|
|
|
172
172
|
},
|
|
173
173
|
});
|
|
174
174
|
|
|
175
|
-
it('projects message summary.diffs to L1
|
|
175
|
+
it('projects message summary.diffs to L1 slim list + markers even when parts are empty', () => {
|
|
176
176
|
const patch = 'diff-body-'.repeat(20_000);
|
|
177
177
|
const [projected] = projectSlimParts([{
|
|
178
178
|
info: {
|
|
@@ -186,6 +186,10 @@ describe('projectSlimParts', () => {
|
|
|
186
186
|
additions: 12,
|
|
187
187
|
deletions: 4,
|
|
188
188
|
patch,
|
|
189
|
+
before: 'old-body',
|
|
190
|
+
after: 'new-body',
|
|
191
|
+
from: 'from-blob',
|
|
192
|
+
to: 'to-blob',
|
|
189
193
|
}],
|
|
190
194
|
},
|
|
191
195
|
},
|
|
@@ -194,12 +198,18 @@ describe('projectSlimParts', () => {
|
|
|
194
198
|
|
|
195
199
|
expect(projected.info.summary).toEqual({
|
|
196
200
|
title: 'kept',
|
|
201
|
+
diffs: [{
|
|
202
|
+
file: 'src/large.ts',
|
|
203
|
+
status: 'modified',
|
|
204
|
+
additions: 12,
|
|
205
|
+
deletions: 4,
|
|
206
|
+
}],
|
|
197
207
|
diffCount: 1,
|
|
198
208
|
hasDiffs: true,
|
|
199
209
|
});
|
|
200
|
-
expect(projected.info.summary.diffs).toBeUndefined();
|
|
201
210
|
expect(JSON.stringify(projected)).not.toContain(patch);
|
|
202
|
-
expect(JSON.stringify(projected)).not.toContain('
|
|
211
|
+
expect(JSON.stringify(projected)).not.toContain('old-body');
|
|
212
|
+
expect(JSON.stringify(projected)).not.toContain('from-blob');
|
|
203
213
|
});
|
|
204
214
|
|
|
205
215
|
it('drops tool output and metadata but keeps identity and status', () => {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e,r as t}from"./rolldown-runtime-C0FnF6B9.js";import{D as n,T as r,j as i,t as a}from"./useUIStore-5agS8bsW.js";import{Ot as o,et as s,rt as c,yt as l}from"./persistence-oSFWyKgV.js";import{nt as u,rt as d}from"./vendor-base-ui-CnHfUmDN.js";import{n as f}from"./vendor-react-DLPElpoQ.js";import{r as p}from"./vendor-sonner-DVzioF3d.js";import{n as m}from"./vendor-reactuses-core-DDoDDyM9.js";import{n as h}from"./clipboard-DF5tFLDb.js";import{Ao as g,Co as _,Gr as v,Ia as y,Qi as b,Yr as x,_i as S,an as C,co as w,en as T,fn as E,ki as D,lo as O,mn as k,o as A,pn as j,za as M}from"./useMobileNavigationStore-D5XHlGZB.js";import{a as N,n as P,s as F}from"./MobileShareBridge-Czlandhf.js";import{_ as I,a as L,c as R,d as ee,f as te,g as ne,l as re,n as ie,o as ae,p as oe,r as se,t as z,v as ce,x as B,y as le}from"./MobileDetailNavigation-fdO6J2xj.js";import{i as ue,r as de}from"./useAssistantUIStore-Bq3cPj2x.js";import{t as fe}from"./AgentAvatar-BzRb9sP6.js";import{t as pe}from"./utils-Dxsi3J3l.js";import{n as me}from"./Icon-DHaR0peD.js";import{a as V,i as he,n as ge,o as H,r as U,t as W}from"./dialog-DaSIYgrj.js";import{t as _e}from"./button-DCUMIXDC.js";import{i as ve}from"./OverlayScrollbar-DwdKeYSb.js";import{F as G,P as ye,R as be,Y as xe,t as K,z as Se}from"./ChatContainer-9cw5pRwD.js";import{a as Ce,i as we,n as Te,r as Ee,t as De}from"./context-menu-Bbd153RL.js";var q=f(),J=e(d(),1),Y=u(),Oe=e=>{let t=(0,q.c)(46),{assistant:n,sessionID:r,warning:i,surface:a,onRevertMessage:o,onEditMessage:s,pendingUserMessages:c,onPendingUserMessagesMaterialized:l}=e,u=n.effectiveWorkspacePath,d;t[0]!==n.sessionGeneration||t[1]!==r?(d={sessionID:r,sessionGeneration:n.sessionGeneration},t[0]=n.sessionGeneration,t[1]=r,t[2]=d):d=t[2];let f=ce(n.id,d,a.active);f.data?.pages;let p;t[3]===f.data?.pages?p=t[4]:(p=f.data?.pages??[],t[3]=f.data?.pages,t[4]=p);let h;t[5]===p?h=t[6]:(h=S(p),t[5]=p,t[6]=h);let _=h,v;if(t[7]!==_){v=new Map;for(let e of _){let t=v.get(e.sessionID);v.set(e.sessionID,t===void 0||t===e.directory?e.directory:null)}t[7]=_,t[8]=v}else v=t[8];let y=v,b;t[9]===f?b=t[10]:(b=async()=>{(f.hasNextPage||f.isFetchNextPageError)&&await f.fetchNextPage()},t[9]=f,t[10]=b);let x=m(b),C=n.mode===`continuous`,w=ye(),T;t[11]!==u||t[12]!==y||t[13]!==w||t[14]!==r?(T=(e,t)=>{let n=e===r?u:y.get(e);if(!n||n!==t){j(e,`missing-directory`);return}k(e,t,{phoneShell:!!(w&&!g()),switchToChat:!0})},t[11]=u,t[12]=y,t[13]=w,t[14]=r,t[15]=T):T=t[15];let E=m(T),D;t[16]===C?D=t[17]:(D={...G,forkSession:!1,navigateNestedSession:!1,mutateSession:C},t[16]=C,t[17]=D);let O;t[18]===s?O=t[19]:(O=s?{onEditMessage:s}:{},t[18]=s,t[19]=O);let A;t[20]!==u||t[21]!==o||t[22]!==E||t[23]!==r||t[24]!==a.active||t[25]!==a.surfaceID||t[26]!==D||t[27]!==O?(A={kind:`embedded`,surfaceId:a.surfaceID,sessionId:r,directory:u,active:a.active,capabilities:D,onRevertMessage:o,...O,openSourceSession:E},t[20]=u,t[21]=o,t[22]=E,t[23]=r,t[24]=a.active,t[25]=a.surfaceID,t[26]=D,t[27]=O,t[28]=A):A=t[28];let M=A,N=f.isError||f.isSuccess&&!f.hasNextPage,P=f.isLoading||f.isFetchingNextPage,F;t[29]!==x||t[30]!==N||t[31]!==_||t[32]!==P?(F={entries:_,complete:N,loading:P,fetchPrevious:x},t[29]=x,t[30]=N,t[31]=_,t[32]=P,t[33]=F):F=t[33];let I;t[34]!==u||t[35]!==l||t[36]!==o||t[37]!==c||t[38]!==r||t[39]!==M||t[40]!==a||t[41]!==F||t[42]!==i?(I={sessionId:r,directory:u,composerSurface:a,sessionSurface:M,warning:i,pendingUserMessages:c,onPendingUserMessagesMaterialized:l,assistantHistory:F,onRevertMessage:o},t[34]=u,t[35]=l,t[36]=o,t[37]=c,t[38]=r,t[39]=M,t[40]=a,t[41]=F,t[42]=i,t[43]=I):I=t[43];let L=I,R;return t[44]===L?R=t[45]:(R=(0,Y.jsx)(K,{autoOpenDraft:!1,host:L}),t[44]=L,t[45]=R),R},ke=class extends Error{constructor(){super(`assistant_selection_stale`)}},Ae=(e,t)=>e.assistantID===t.assistantID&&e.transportIdentity===t.transportIdentity&&e.runtimeGeneration===t.runtimeGeneration,je=class{onBusyChange;onError;flight=null;authoritativeIdentity=null;constructor(e,t){this.onBusyChange=e,this.onError=t}activate(e){this.authoritativeIdentity&&!Ae(this.authoritativeIdentity,e)&&this.flight&&this.retire(this.flight),this.authoritativeIdentity=e}enqueue(e,t,n){if(!this.isAuthoritative(e))return Promise.reject(new ke);let r=this.flight;r||(r={identity:e,controller:new AbortController,running:!1,desired:null,waiters:[],activeWaiters:[],idleWaiters:[],retired:!1},this.flight=r),r.desired=t;let i=new Promise((e,t)=>{r.waiters.push({resolve:e,reject:t})});return r.running||(r.running=!0,this.onBusyChange(!0),this.run(r,n)),i}async flush(e){if(!this.isAuthoritative(e))throw new ke;let t=this.flight;t?.running&&await new Promise((e,n)=>t.idleWaiters.push({resolve:e,reject:n}))}assertAuthoritative(e){if(!this.isAuthoritative(e))throw new ke}dispose(){this.flight&&this.retire(this.flight),this.authoritativeIdentity=null}async run(e,t){for(;!e.retired&&e.desired;){let n=e.desired;e.desired=null;let r=e.waiters.splice(0);e.activeWaiters=r;try{if(await t({identity:e.identity,selection:n,signal:e.controller.signal}),!e.retired)for(let e of r)e.resolve()}catch(t){if(!e.retired){this.onError(t);for(let e of r)e.reject(t)}}e.activeWaiters=[]}e.running=!1;for(let t of e.idleWaiters.splice(0))t.resolve();this.flight===e&&this.onBusyChange(!1)}retire(e){e.retired=!0,e.controller.abort();let t=new ke;for(let n of e.activeWaiters.splice(0))n.reject(t);for(let n of e.waiters.splice(0))n.reject(t);for(let n of e.idleWaiters.splice(0))n.reject(t);this.flight===e&&(this.flight=null,this.onBusyChange(!1))}isAuthoritative(e){return this.authoritativeIdentity!==null&&Ae(this.authoritativeIdentity,e)}},X=(e,t)=>{let n=t.providerID??e.providerID,r=t.modelID??e.modelID,i=n!==e.providerID||r!==e.modelID;return{enabled:e.enabled,name:e.name,defaultPrompt:e.defaultPrompt,workspacePath:e.workspacePath,providerID:n,modelID:r,agent:t.agent??null,variant:i?null:t.variant??null,mode:e.mode}},Me=async(e,t,n)=>{n.assertAuthoritative();let r=n.readSnapshot()?.assistants.find(t=>t.id===e.assistantID);if(!r)throw Error(`assistant_unavailable`);try{n.assertAuthoritative(),await n.updateAssistant(r,X(r,t)),n.assertAuthoritative()}catch(i){if(n.assertAuthoritative(),n.signal.aborted)throw new ke;if(!(i instanceof B)||i.code!==`revision_conflict`)throw i;if(n.assertAuthoritative(),r=(await n.ensureSnapshot(n.signal)).assistants.find(t=>t.id===e.assistantID),n.assertAuthoritative(),!r)throw new B(`revision_conflict`,409);n.assertAuthoritative(),await n.updateAssistant(r,X(r,t)),n.assertAuthoritative()}};async function Z(e){await L(e);let t=ue.getState().defaultShareAssistant;if(t?.assistantID!==e.id)return;let n=await R();n.serverInstanceID&&t.serverInstanceID===n.serverInstanceID&&ue.getState().setDefaultShareAssistant(null)}function Ne({assistant:e,open:t,onOpenChange:n,onDeleted:r}){let{t:i}=h(),[a,o]=J.useState(!1),s=e?N(e.name).displayName||e.name:``,c=m(e=>{a&&!e||n(e)}),l=m(()=>{a||n(!1)}),u=m(async()=>{if(!(!e||a)){o(!0);try{await Z(e),r?.(e.id),n(!1),p.success(i(`assistants.settings.toast.deleted`))}catch{p.error(i(`assistants.settings.toast.deleteFailed`))}finally{o(!1)}}});return(0,Y.jsx)(W,{open:t&&e!==null,onOpenChange:c,children:(0,Y.jsxs)(ge,{className:`max-w-md`,children:[(0,Y.jsxs)(V,{children:[(0,Y.jsx)(H,{children:i(`assistants.settings.delete`)}),(0,Y.jsx)(U,{children:i(`assistants.settings.deleteConfirm`,{name:s})})]}),(0,Y.jsxs)(he,{children:[(0,Y.jsx)(_e,{size:`sm`,variant:`ghost`,onClick:l,disabled:a,children:i(`settings.common.actions.cancel`)}),(0,Y.jsx)(_e,{size:`sm`,variant:`destructive`,onClick:u,disabled:a,children:i(`settings.common.actions.delete`)})]})]})})}var Pe=[0,500,1500,4e3],Fe=(e,t,n)=>{let r=!1,i=e.map(e=>e.info.id!==t||e.info.sessionID===n?e:(r=!0,{...e,info:{...e.info,sessionID:n}}));return r?i:e},Ie=e=>{let t=e.refreshDelaysMs??Pe,n=e.sleep??(e=>new Promise(t=>setTimeout(t,e)));(async()=>{for(let r of t){if(r>0&&await n(r),!e.isCurrent())return;try{await e.refresh(e.binding);break}catch{}}})()},Le=e=>`${e.transport}\u0000${e.assistantID}`,Re=e=>({transport:e.transport,assistantID:e.assistantID}),ze=(e,t)=>e.assistantID===t.assistantID&&e.sessionID===t.sessionID&&e.directory===t.directory&&e.sessionGeneration===t.sessionGeneration&&e.transport===t.transport&&e.runtimeGeneration===t.runtimeGeneration,Be=(e,t)=>e.assistantID===t.assistantID&&e.sessionID===t.sessionID&&e.directory===t.directory&&e.sessionGeneration===t.sessionGeneration&&e.messageID===t.messageID&&e.transport===t.transport&&e.runtimeGeneration===t.runtimeGeneration,Ve=()=>{let e=new Map,t=new Map,n=1,r=e=>Le(e),i=async(e,n)=>{let i=r(e),a=t.get(i)??Promise.resolve(),o,s=new Promise(e=>{o=e}),c=a.catch(()=>void 0).then(()=>s);t.set(i,c),await a.catch(()=>void 0);try{return await n()}finally{o(),t.get(i)===c&&t.delete(i)}},a=(t,i)=>{let a=r(Re(t)),o=n++;return e.set(a,{identity:t,rollback:i,token:o}),o},o=t=>e.get(r(t))?.identity,s=t=>e.delete(r(t)),c=async e=>i(e,()=>s(e)),l=async t=>{let n=r(t),i=e.get(n);if(!i)return{kind:`none`};let a=i.token,o=i.identity,s;try{s=await i.rollback()}catch{return{kind:`blocked`,status:`failed`}}let c=e.get(n);return!c||c.token!==a||!Be(c.identity,o)?{kind:`superseded`}:s.status===`rolled-back`||s.status===`conflict`?(e.delete(n),{kind:`cleared`,status:s.status}):{kind:`blocked`,status:s.status}},u=async(t,n)=>{let i=r(t),a=e.get(i);if(!a)return{kind:`none`};if(ze(a.identity,n))return{kind:`match`};let o=a.token,s=a.identity,c=await a.rollback(),l=e.get(i);return!l||l.token!==o||!Be(l.identity,s)?{kind:`superseded`}:c.status===`rolled-back`||c.status===`conflict`?(e.delete(i),{kind:`cleared`,status:c.status}):{kind:`rollback_failed`,retained:!0,status:c.status}};return{register:a,read:o,clear:s,clearExclusive:c,retireCurrent:l,rollbackAndClearIfBindingMismatch:async(e,t)=>i(e,()=>u(e,t)),rollbackAllBestEffort:async t=>{let n=[...e.entries()];await Promise.all(n.map(async([,n])=>{if(t?.excludeTransport!==void 0&&n.identity.transport===t.excludeTransport)return;let a=Re(n.identity);await i(a,async()=>{let t=r(a),i=e.get(t);if(!i||i.token!==n.token)return;let o=i.token,s=i.identity;try{let n=await i.rollback(),r=e.get(t);if(!r||r.token!==o||!Be(r.identity,s))return;(n.status===`rolled-back`||n.status===`conflict`)&&e.delete(t)}catch{}})}))},stageExclusive:async(e,t)=>i(e,async()=>{let n=await l(e);if(n.kind===`blocked`)return{kind:`blocked`,status:n.status};let r=await t();if(!r)return{kind:`skipped`};let i=a(r.identity,r.rollback);return r.protectOnStale?{kind:`stale_protected`,token:i,identity:r.identity}:{kind:`registered`,token:i,identity:r.identity}})}},He=(e,t)=>!e?.attachments?.length||!t?[]:e.attachments.flatMap(e=>{let n=t[e.attachmentRefID];return n?[n]:[]}),Ue=(e,t)=>{let n=t??{};return e.map(e=>({partID:e.partID,text:e.text,...e.synthetic===!0?{synthetic:!0}:{},attachments:e.attachments.flatMap(e=>n[e.attachmentRefID]?[n[e.attachmentRefID]]:[])}))},We=(e,t)=>{if(t.length===0)return[...e];let n=new Map;for(let t of e)n.set(t.partID,t);for(let e of t)n.set(e.partID,e);let r=new Set,i=[];for(let t of e){let e=n.get(t.partID);e&&(i.push(e),r.add(t.partID))}for(let e of t)r.has(e.partID)||(i.push(e),r.add(e.partID));return i},Ge=t({AssistantView:()=>Qe}),Ke={},qe=[],Je=[],Ye=(e,t,n)=>[...e===void 0?[]:[{type:`text`,text:e}],...(t??[]).flatMap(e=>[{type:`text`,text:e.text,...e.synthetic===!0?{synthetic:!0}:{}},...(e.attachments??[]).map(e=>({type:`file`,mime:e.mimeType,url:e.dataUrl}))]),...(n??[]).map(e=>({type:`file`,mime:e.mimeType,url:e.dataUrl}))],Xe=e=>{let t=(0,q.c)(11),{assistant:n,onBack:r}=e,{t:i}=h(),a;t[0]===n?a=t[1]:(a=n?N(n.name):null,t[0]=n,t[1]=a);let o=a,s=n&&o?o.displayName||n.name:``,c;t[2]!==s||t[3]!==i?(c=s||i(`assistants.title`),t[2]=s,t[3]=i,t[4]=c):c=t[4];let l;t[5]===i?l=t[6]:(l=i(`assistants.actions.backToChat`),t[5]=i,t[6]=l);let u;return t[7]!==r||t[8]!==c||t[9]!==l?(u=(0,Y.jsx)(z,{title:c,backAriaLabel:l,onBack:r}),t[7]=r,t[8]=c,t[9]=l,t[10]=u):u=t[10],u},Ze=e=>{let t=(0,q.c)(45),{assistantID:n,displayName:r,avatarEmoji:i,modeLabel:a,selected:o,enabled:s,editLabel:c,deleteLabel:l,onSelect:u,onEdit:d,onDelete:f}=e,[p,h]=J.useState(!1),g;t[0]===u?g=t[1]:(g=()=>u(),t[0]=u,t[1]=g);let _=m(g),v;t[2]===d?v=t[3]:(v=()=>{h(!1),d()},t[2]=d,t[3]=v);let y=m(v),b;t[4]===f?b=t[5]:(b=()=>{h(!1),f()},t[4]=f,t[5]=b);let x=m(b),S;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(S=e=>{e.preventDefault(),h(!0)},t[6]=S):S=t[6];let C=o?`border-border/50 bg-[var(--surface-elevated)]`:`border-transparent hover:bg-interactive-hover`,w=!s&&`opacity-65`,T;t[7]!==C||t[8]!==w?(T=pe(`flex w-full min-h-11 items-center gap-3 rounded-xl border px-3 py-3 text-left outline-none transition-[background-color,border-color,transform,opacity] duration-150 ease-out active:scale-[0.995] focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)] motion-reduce:transition-none`,C,w),t[7]=C,t[8]=w,t[9]=T):T=t[9];let E;t[10]!==_||t[11]!==o||t[12]!==T?(E=(0,Y.jsx)(`button`,{type:`button`,role:`option`,"aria-selected":o,onClick:_,onContextMenu:S,className:T}),t[10]=_,t[11]=o,t[12]=T,t[13]=E):E=t[13];let D;t[14]!==n||t[15]!==i||t[16]!==r?(D=(0,Y.jsx)(fe,{name:n,emoji:i,size:24,label:r}),t[14]=n,t[15]=i,t[16]=r,t[17]=D):D=t[17];let O;t[18]===r?O=t[19]:(O=(0,Y.jsx)(`span`,{className:`block truncate typography-ui-label font-medium`,children:r}),t[18]=r,t[19]=O);let k;t[20]===a?k=t[21]:(k=(0,Y.jsx)(`span`,{className:`mt-0.5 block truncate typography-micro text-muted-foreground`,children:a}),t[20]=a,t[21]=k);let A;t[22]!==O||t[23]!==k?(A=(0,Y.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[O,k]}),t[22]=O,t[23]=k,t[24]=A):A=t[24];let j;t[25]!==A||t[26]!==E||t[27]!==D?(j=(0,Y.jsxs)(Ce,{render:E,children:[D,A]}),t[25]=A,t[26]=E,t[27]=D,t[28]=j):j=t[28];let M;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Y.jsx)(me,{name:`edit`,className:`size-4`}),t[29]=M):M=t[29];let N;t[30]!==c||t[31]!==y?(N=(0,Y.jsxs)(Ee,{onClick:y,children:[M,c]}),t[30]=c,t[31]=y,t[32]=N):N=t[32];let P;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Y.jsx)(we,{}),t[33]=P):P=t[33];let F;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Y.jsx)(me,{name:`delete-bin`,className:`size-4`}),t[34]=F):F=t[34];let I;t[35]!==l||t[36]!==x?(I=(0,Y.jsxs)(Ee,{onClick:x,className:`text-[var(--status-error)] focus:text-[var(--status-error)] data-[highlighted]:text-[var(--status-error)] [&_svg]:text-[var(--status-error)]`,children:[F,l]}),t[35]=l,t[36]=x,t[37]=I):I=t[37];let L;t[38]!==N||t[39]!==I?(L=(0,Y.jsxs)(Te,{className:`min-w-[10rem]`,children:[N,P,I]}),t[38]=N,t[39]=I,t[40]=L):L=t[40];let R;return t[41]!==p||t[42]!==j||t[43]!==L?(R=(0,Y.jsxs)(De,{open:p,onOpenChange:h,children:[j,L]}),t[41]=p,t[42]=j,t[43]=L,t[44]=R):R=t[44],R},Qe=({activeOverride:e,onMobileBack:t})=>{let{t:u}=h(),{isMobile:d}=ve(),f=ye(),g=J.useSyncExternalStore(i,n,n),S=r(),k=a(e=>e.activeMainTab===`assistant`),j=e??k,L=a(e=>e.isMobile),R=d||L,z=I(),ce=le(),B=ce.data,V=ue(e=>e.assistantByTransport[g]??null),he=ue(e=>e.selectAssistant),ge=ue(e=>e.requestCreate),H=B?.assistants.find(e=>e.id===V)??null,U=H?.id??``,W=H?.sessionID??``,G=H?.effectiveWorkspacePath??``,K=J.useMemo(()=>o({transportIdentity:g},`assistant:${U}`),[U,g]),Ce=l(K),we=_(e=>e.draftAttachmentViews[Ce]??Ke),Te=_(e=>e.drafts[Ce]),Ee=J.useMemo(()=>{let e=He(Te,we);return e.length===0?qe:e},[we,Te]),De=Te?.attachments,q=Te?.syntheticParts,Ae=J.useMemo(()=>!De||!q?``:`${De.map(e=>e.attachmentRefID).join(``)}\u0004${q.map(e=>`${e.partID}\u0002${e.attachments.map(e=>e.attachmentRefID).join(``)}`).join(``)}`,[De,q]);J.useEffect(()=>{U&&_.getState().hydrateDraftAttachments(K)},[U,K,Ae]);let X=O(G||null,{enabled:!!G&&j}),Z=w(G||null,{enabled:!!G&&j}),Pe=T(W,G||void 0),Le=C(W,G||void 0),ze=E(W),Be=xe(),[Ge,Qe]=J.useState(()=>new Map),$e=J.useRef(0),et=J.useRef(Ve()),tt=Ge.get(U)??Je,[,nt]=J.useState(!1),rt=J.useRef(()=>{});rt.current=()=>{p.error(u(`assistants.composer.selectionSaveFailed`))};let it=J.useRef(null);it.current||=new je(nt,e=>rt.current(e));let at=J.useMemo(()=>({assistantID:U,transportIdentity:g,runtimeGeneration:S}),[U,S,g]),Q=it.current,ot=J.useMemo(()=>({transport:g,assistantID:U}),[U,g]),st=m(async(e,t=g)=>{await et.current.clearExclusive({transport:t,assistantID:e})}),ct=m(e=>{et.current.rollbackAllBestEffort(e).catch(()=>void 0)});J.useEffect(()=>{!V&&B?.assistants[0]&&he(B.assistants[0].id)},[he,V,B?.assistants]),J.useEffect(()=>{ce.isSuccess&&V&&!H&&he(B?.assistants[0]?.id??null)},[H,he,V,B?.assistants,ce.isSuccess]),J.useEffect(()=>{j&&U&&!W&&ae(U)},[j,U,W]),J.useEffect(()=>{$e.current++,Qe(new Map),ct({excludeTransport:g})},[g,S,ct]),J.useEffect(()=>()=>{$e.current++,ct()},[ct]),J.useEffect(()=>{Q.activate(at)},[Q,at]),J.useEffect(()=>()=>{Q.dispose()},[Q]),J.useEffect(()=>{U&&et.current.rollbackAndClearIfBindingMismatch(ot,{assistantID:U,sessionID:W,directory:G,sessionGeneration:H?.sessionGeneration??-1,transport:g,runtimeGeneration:S}).catch(()=>void 0)},[H?.sessionGeneration,U,G,S,W,ot,g]);let lt=m(e=>at.assistantID?Q.enqueue(at,e,async({identity:e,selection:t,signal:i})=>{await Me(e,t,{readSnapshot:()=>te(void 0,e.transportIdentity),ensureSnapshot:e=>re(e),updateAssistant:ne,signal:i,assertAuthoritative:()=>{if(Q.assertAuthoritative(e),n()!==e.transportIdentity||r()!==e.runtimeGeneration)throw new ke}})}):Promise.reject(Error(`assistant_unavailable`))),ut=J.useMemo(()=>Se(Z.data),[Z.data]),dt=m(e=>{if(!H)return;let t=y(ut,H.agent??void 0,e);if(t){let e=M({providerID:H.providerID,modelID:H.modelID,agent:H.agent},t,ut,X.data??[]),n=e.providerID===H.providerID&&e.modelID===H.modelID;lt({...e,agent:e.agent??void 0,variant:n?H.variant??void 0:void 0})}}),$=m(async(e,t)=>{e.sessionID&&await Be.ensureSessionRenderable(e.sessionID,{directory:e.directory,...t?.force?{force:!0}:{}})}),ft=H?.sessionGeneration;J.useEffect(()=>{!j||!U||!W||!G||ft===void 0||$({sessionID:W,directory:G,sessionGeneration:ft},{force:!0})},[j,U,G,$,ft,W]);let pt=m((e,t)=>{if(t.length===0)return;let n=new Set(t);Qe(t=>{let r=t.get(e);if(!r?.some(e=>n.has(e.info.id)))return t;let i=new Map(t),a=r.filter(e=>!n.has(e.info.id));return a.length>0?i.set(e,a):i.delete(e),i})}),mt=m((e,t,n)=>{Qe(r=>{let i=r.get(e);if(!i)return r;let a=Fe(i,t,n);if(a===i)return r;let o=new Map(r);return o.set(e,a),o})}),ht=m(e=>{pt(U,e)}),gt=m(async e=>{if(!W||!G)throw Error(`assistant_unavailable`);b(W,G).some(t=>t?.id===e)&&(await v(W,e,{directory:G,draftKey:K,restorePrimaryInput:!1}),await st(U))}),_t=m(async(e,t)=>{if(!H||H.mode!==`continuous`)return;if(!W||!G)throw Error(`assistant_unavailable`);if(!b(W,G).some(t=>t?.id===e))return;if(t.info.id!==e||t.info.sessionID!==W||t.info.role!==`user`)throw Error(`The selected user message is unavailable`);let i={assistantID:H.id,sessionID:W,directory:G,sessionGeneration:H.sessionGeneration,messageID:e,transport:g,runtimeGeneration:S},a=Re(i),o=await et.current.stageExclusive(a,async()=>{let a=await x(W,e,t,{directory:G,draftKey:K}),o=n()===i.transport&&r()===i.runtimeGeneration,s=o?te(void 0,i.transport)?.assistants.find(e=>e.id===i.assistantID):void 0,c=!!(s&&s.mode===`continuous`&&s.sessionID===i.sessionID&&s.sessionGeneration===i.sessionGeneration&&(s.effectiveWorkspacePath??``)===i.directory);if(o&&c)return{identity:i,rollback:()=>a.rollback()};let l=await a.rollback();return l.status===`failed`||l.status===`skipped`?{identity:i,rollback:()=>a.rollback(),protectOnStale:!0}:null});if(o.kind===`blocked`)throw Error(`assistant_stage_message_edit_prior_blocked`);if(o.kind===`stale_protected`)throw Error(`assistant_stage_message_edit_rollback_failed`)}),vt=J.useMemo(()=>{let e=D(K,()=>_.getState());return{busy:!1,attachments:Ee,addAttachment:t=>e.addLocal(t),removeAttachment:t=>e.removeByAttachmentID(t),clearAttachments:()=>e.clearRootAttachments(),restoreAttachments:t=>e.restoreRootAttachments(t),pendingInput:null,consumePendingInput:()=>null,pendingPreset:null,consumePendingPreset:()=>null,consumeSyntheticParts:()=>{let e=_.getState(),t=e.draftAttachmentViews[l(K)]??Ke,n=e.consumeDraftSyntheticParts(K,F);return n?Ue(n,t):null},restoreSyntheticParts:e=>{(async()=>{let t=_.getState(),n=e.map(e=>({partID:e.partID??s(),text:e.text,attachments:[],...e.synthetic===!0?{synthetic:!0}:{}})),r=We(t.getDraft(K)?.syntheticParts??[],n);t.setDraftSyntheticParts(K,r);for(let r=0;r<n.length;r++){let i=n[r].partID;for(let n of e[r]?.attachments??[])n.source===`server`&&n.dataUrl?t.addDraftDurableAttachment(K,{attachmentID:n.id,filename:n.filename,mimeType:n.mimeType,size:n.size,source:`server`,url:n.dataUrl,serverPath:n.serverPath,partID:i}):await t.addDraftLocalAttachment(K,n.file,{attachmentID:n.id,filename:n.filename,source:n.source===`vscode`?`vscode`:`local`,vscodePath:n.vscodePath,vscodeSource:n.vscodeSource===`selection`?`selection`:void 0,partID:i})}})()},inlineDrafts:[],removeInlineDraft:()=>{},restoreInlineDrafts:()=>{},history:ze,captureRuntime:()=>_.getState().captureDraftRuntime(),getDraft:e=>_.getState().getDraft(e),abortPrompt:{sessionID:null,clear:()=>{}}}},[Ee,K,ze]),yt=J.useMemo(()=>{let e=(X.data??[]).find(e=>e.id===H?.providerID)?.models?.find(e=>e.id===H?.modelID);return be(e)},[H?.modelID,H?.providerID,X.data]),bt=Pe.length>0,xt=J.useMemo(()=>{if(!H||!W||!G)return null;let e={sessionID:W,directory:G,sessionGeneration:H.sessionGeneration};return{kind:`secondary`,surfaceID:`assistant:${H.id}`,active:j,sessionID:W,directory:G,draftKey:K,transportIdentity:g,runtimeGeneration:S,deliveryTarget:{kind:`assistant`,assistantID:H.id},resources:vt,...H.mode===`stateless`?{queueSessionID:`assistant:${H.id}`}:{},selection:{value:{providerID:H.providerID,modelID:H.modelID,agent:H.agent??void 0,variant:H.variant??void 0},catalog:{providers:X.data??[],agents:ut,variants:yt,variantsReady:X.isSuccess,ready:X.isSuccess&&Z.isSuccess,loading:X.isPending||Z.isPending,error:X.isError||Z.isError},change:lt,flush:()=>Q.flush(at)},activity:{phase:Le?.type===`busy`?`busy`:Le?.type===`retry`?`retry`:`idle`,canAbort:Le?.type===`busy`||Le?.type===`retry`},commands:{sessionID:W,hasMessages:bt,hasNewDraft:!1},commandPolicy:e=>e.name!==`fork`&&e.name!==`thread`,backend:{send:async t=>{let n;for(let t of b(e.sessionID,e.directory)){let e=typeof t?.id==`string`?t.id:``;/^msg_[0-9a-f]{12}[0-9A-Za-z]{14}$/.test(e)&&(!n||e>n)&&(n=e)}let r=c(`msg`,n);t.options?.commitStagedMessageEdit&&et.current.clear({transport:g,assistantID:H.id});let i=A({messageID:r,sessionID:e.sessionID,providerID:t.providerID??H.providerID,modelID:t.modelID??H.modelID,agent:t.agent??H.agent??void 0,text:t.text,attachments:t.attachments,additionalParts:t.parts});Qe(e=>{let t=new Map(e);return t.set(H.id,[...e.get(H.id)??[],i]),t});let a;try{a=await oe(H.id,e,r,Ye(t.text,t.parts,t.attachments))}catch(e){throw pt(H.id,[r]),e}if(z.data?.serverInstanceID){let e=N(H.name);P({serverInstanceID:z.data.serverInstanceID,assistantID:H.id,name:e.displayName||H.name,avatarSeed:H.id,...e.avatarEmoji?{avatarEmoji:e.avatarEmoji}:{}}).catch(()=>void 0)}a.binding.sessionID&&mt(H.id,r,a.binding.sessionID);let o=$e.current;Ie({binding:a.binding,refresh:t=>$(t,{force:t.sessionID!==e.sessionID||t.sessionGeneration!==e.sessionGeneration}),isCurrent:()=>$e.current===o})},sendQueued:async()=>{throw Error(`assistant-server-queue-required`)},create:async()=>{let e=await ee(H.id);await st(H.id),await $(e,{force:!0})},compact:async()=>{let t=await se(H.id,e);await st(H.id),await $(t.binding,{force:!0})},abort:async()=>{await ie(H.id,e)}},shortcuts:{cycle:dt,new:async()=>{let e=await ee(H.id);await st(H.id),await $(e,{force:!0})},abort:async()=>{await ie(H.id,e)},submit:()=>{}}}},[j,H,z.data?.serverInstanceID,lt,st,dt,G,K,bt,X.data,X.isError,X.isPending,X.isSuccess,Z.isError,Z.isPending,Z.isSuccess,$,mt,pt,vt,S,Q,at,W,Le,g,yt,ut]),St=m(()=>{if(ge(),f){f.openSettings();return}let e=a.getState();e.setSettingsPage(`assistants`),e.setSettingsDialogOpen(!0)}),Ct=m(e=>{de(e,f?{openMobileSettings:f.openSettings}:void 0)}),[wt,Tt]=J.useState(null),Et=m(e=>{Tt(e)}),Dt=m(e=>{e||Tt(null)}),Ot=m(()=>{a.getState().setActiveMainTab(`chat`)}),kt=m(()=>{if(t){t();return}Ot()}),At=(e,t,n,r)=>(0,Y.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[R?(0,Y.jsx)(Xe,{assistant:H,onBack:kt}):null,(0,Y.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center px-6 text-center`,children:[(0,Y.jsx)(me,{name:e,className:`size-6 text-muted-foreground`}),(0,Y.jsx)(`h1`,{className:`mt-4 typography-ui-header font-semibold`,children:t}),n?(0,Y.jsx)(`p`,{className:`mt-2 max-w-md typography-ui text-muted-foreground`,children:n}):null,r?(0,Y.jsx)(`div`,{className:`mt-5`,children:r}):null]})]});if(z.isPending||ce.isPending)return At(`ai-agent`,u(`assistants.state.unavailable`));if(z.isError||!z.data?.supported||!z.data.enabled||!B?.enabled)return At(`cloud-off`,u(`assistants.state.unavailable`));if(!B.assistants.length)return At(`ai-agent`,u(`assistants.onboarding.title`),u(`assistants.onboarding.description`),(0,Y.jsx)(_e,{onClick:St,children:u(`assistants.onboarding.action`)}));if(!H)return At(`ai-agent`,u(`assistants.state.unavailable`));if(!xt)return(0,Y.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-background`,children:[R?(0,Y.jsx)(Xe,{assistant:H,onBack:kt}):null,(0,Y.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center gap-3 px-6`,"aria-busy":`true`,"aria-label":u(`assistants.state.unavailable`),children:[(0,Y.jsx)(`div`,{className:`size-10 animate-pulse rounded-xl bg-[var(--surface-muted)] motion-reduce:animate-none`}),(0,Y.jsx)(`div`,{className:`h-3.5 w-36 animate-pulse rounded-md bg-[var(--surface-muted)] motion-reduce:animate-none`})]})]});let jt=N(H.name),Mt=H.enabled?ce.isError?u(`assistants.state.staleSnapshot`):null:u(`assistants.state.assistantDisabled`);return(0,Y.jsxs)(`div`,{className:`relative flex h-full min-h-0 overflow-hidden bg-background`,"data-presentation":`workspace`,children:[R?null:(0,Y.jsxs)(`section`,{className:`flex h-full min-h-0 w-[clamp(16rem,22vw,20rem)] shrink-0 flex-col overflow-hidden`,children:[(0,Y.jsx)(`header`,{className:`shrink-0 px-4 pb-3 pt-4 sm:px-5`,children:(0,Y.jsx)(`h1`,{className:`truncate typography-ui-label font-semibold text-foreground`,children:u(`assistants.title`)})}),(0,Y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 pb-4 sm:px-4`,role:`listbox`,"aria-label":u(`assistants.listAria`),children:(0,Y.jsx)(`div`,{className:`flex flex-col gap-1 border-t border-border/40 pt-3`,children:B.assistants.map(e=>{let t=e.id===V,n=N(e.name);return(0,Y.jsx)(Ze,{assistantID:e.id,displayName:n.displayName,avatarEmoji:n.avatarEmoji??void 0,modeLabel:e.mode===`stateless`?u(`assistants.mode.stateless`):u(`assistants.mode.continuous`),selected:t,enabled:e.enabled,editLabel:u(`assistants.menu.edit`),deleteLabel:u(`assistants.settings.delete`),onSelect:()=>he(e.id),onEdit:()=>Ct(e.id),onDelete:()=>Et(e)},e.id)})})})]}),(0,Y.jsx)(Ne,{assistant:wt,open:wt!==null,onOpenChange:Dt}),(0,Y.jsxs)(`div`,{className:pe(`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background`,!R&&`border-l border-border/60`),children:[R?(0,Y.jsx)(Xe,{assistant:H,onBack:kt}):(0,Y.jsxs)(`header`,{className:`flex h-14 shrink-0 items-center gap-3 border-b border-border/40 px-4 sm:px-5`,children:[(0,Y.jsx)(fe,{name:H.id,emoji:jt.avatarEmoji,size:24,label:jt.displayName||H.name}),(0,Y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Y.jsx)(`div`,{className:`truncate typography-ui-label font-medium`,children:jt.displayName}),(0,Y.jsx)(`div`,{className:`mt-0.5 truncate typography-micro leading-none text-muted-foreground/70`,children:H.mode===`stateless`?u(`assistants.conversation.statelessHint`):u(`assistants.conversation.continuousHint`)})]})]}),(0,Y.jsx)(Oe,{onRevertMessage:gt,onEditMessage:H.mode===`continuous`?_t:void 0,assistant:H,sessionID:W,warning:Mt,surface:xt,pendingUserMessages:tt,onPendingUserMessagesMaterialized:ht})]})]})};export{Ge as n,Ne as r,Qe as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/renderMobileApp-D7V_905J.js","assets/rolldown-runtime-C0FnF6B9.js","assets/useUIStore-5agS8bsW.js","assets/vendor-zustand-B4dlGEM2.js","assets/vendor-base-ui-CnHfUmDN.js","assets/persistence-oSFWyKgV.js","assets/vendor-pathe-vBmvQE8f.js","assets/vendor-react-DLPElpoQ.js","assets/vendor-tanstack-query-core-BWz0ose6.js","assets/gitApiHttp-SLrnr8a5.js","assets/vendor-opencode-sdk-C07HQypa.js","assets/vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js","assets/vendor-sonner-DVzioF3d.js","assets/vendor-reactuses-core-DDoDDyM9.js","assets/vendor-lodash-es-DfLbG5Af.js","assets/vendor-js-cookie-hSOiFTtX.js","assets/clipboard-DF5tFLDb.js","assets/store-OURVnLSN.js","assets/useMobileNavigationStore-D5XHlGZB.js","assets/vendor-tanstack-react-query-D7pys_c9.js","assets/useAssistantUIStore-Bq3cPj2x.js","assets/vendor-fuse.js-DB5wDJbI.js","assets/MobileShareBridge-Czlandhf.js","assets/desktopHosts-DSgGxDpI.js","assets/desktopRelayRestore-DVIx7jsz.js","assets/MobileDetailNavigation-fdO6J2xj.js","assets/utils-Dxsi3J3l.js","assets/vendor-class-variance-authority-BLUaYARZ.js","assets/vendor-tailwind-merge-BicNWLTg.js","assets/Icon-DHaR0peD.js","assets/button-DCUMIXDC.js","assets/AgentAvatar-BzRb9sP6.js","assets/dialog-DaSIYgrj.js","assets/gitApi-BlInY34O.js","assets/useAppFontEffects-DOb592S6.js","assets/vendor-simplewebauthn-browser-Dwhcdg_5.js","assets/projectMeta-DtoKE1uJ.js","assets/input-QS3IWgY5.js","assets/tooltip-xEnco9xY.js","assets/OverlayScrollbar-DwdKeYSb.js","assets/vendor-dnd-kit-core-CvWxUPdb.js","assets/vendor-dnd-kit-accessibility-BY5LhhUB.js","assets/vendor-dnd-kit-sortable-hHdP9lLb.js","assets/useSessionAutoCleanup-DvK0S9G6.js","assets/radio-BiawVf-W.js","assets/vendor-codemirror-autocomplete-DHomsvW7.js","assets/vendor-codemirror-lang-angular-DShkBD6m.js","assets/vendor-codemirror-lang-json-CYJRHck9.js","assets/vendor-codemirror-lang-markdown-WORgx6ZD.js","assets/vendor-codemirror-lang-python-Du6XQ8Zw.js","assets/vendor-codemirror-legacy-modes-DuRAjNvB.js","assets/useThemeSystem-DMzWVJaW.js","assets/vendor-codemirror-language-data-BfYFhIH1.js","assets/markdownTheme-y_Rf6mLa.js","assets/vendor-pierre-diffs-BenIz2TM.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/ChatContainer-9cw5pRwD.js","assets/useRuntimeAPIs-DSLXJybW.js","assets/appThemeRegistry-CmZlBPov.js","assets/markdown-worker-D-OR2e_G.js","assets/url-DIZgk80M.js","assets/useEffectiveDirectory-DXGFGuv0.js","assets/FadeInOnReveal-oeyB_nIi.js","assets/insertionBoundaries-CiTMpUdk.js","assets/useWorkerHighlightedLines-BTFe-rdw.js","assets/vendor-tanstack-react-virtual-tlDgH6PG.js","assets/vendor-cmdk-CeAGfrLo.js","assets/vendor-aria-hidden-BbL3cEyI.js","assets/sortable-tabs-strip-BEalEtjO.js","assets/vendor-framer-motion-DFy_BSVd.js","assets/useFontPreferences-B-QHyR3C.js","assets/terminalApi-_NnfkxgP.js","assets/MobileSurface-DppgVqKs.js","assets/collapsible-DNg5bLKV.js","assets/vendor-codemirror-commands-C9DCaJ0C.js","assets/vendor-codemirror-search-D2SOgzph.js","assets/vendor-replit-codemirror-vim-CEibx3EP.js","assets/projectActions-CWvNGKfA.js","assets/runtimeEndpointReset-DpaiHzaP.js","assets/context-menu-Bbd153RL.js","assets/vendor-cron-parser-CCD11YFT.js","assets/SettingsView-cfFQW5LJ.js","assets/vendor-yaml-DIcAK3EC.js","assets/vendor-qrcode-DAuVxiQR.js","assets/vendor-dijkstrajs-DztKuCwY.js","assets/AssistantView-De54yQXX.js","assets/fileQueries-DXvhIL_U.js","assets/src-C8jn0x69.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{t as e}from"./runtimeConfig-n4QAk1lU.js";import{o as t}from"./vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js";/* empty css */window.__OPENCHAMBER_RUNTIME_APIS__=e(),t(async()=>{let{renderMobileApp:e}=await import(`./renderMobileApp-D7V_905J.js`);return{renderMobileApp:e}},__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,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95])).then(({renderMobileApp:t})=>{t(window.__OPENCHAMBER_RUNTIME_APIS__??e())});
|