@hienlh/ppm 0.17.55 → 0.17.56
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/CHANGELOG.md +7 -0
- package/assets/skills/ppm/SKILL.md +1 -1
- package/assets/skills/ppm/references/http-api.md +1 -1
- package/dist/web/assets/{ai-resource-editor-2h4gRHil.js → ai-resource-editor-DL011EDu.js} +1 -1
- package/dist/web/assets/{audio-preview-Duhsn8R0.js → audio-preview-H16VO99g.js} +1 -1
- package/dist/web/assets/{chat-tab-CdS8pzow.js → chat-tab-D2nZCpAo.js} +3 -3
- package/dist/web/assets/{code-editor-Bq5OC1R8.js → code-editor-DqQy2Qm8.js} +2 -2
- package/dist/web/assets/{conflict-editor-DdX0vWbq.js → conflict-editor-B_wAb0Kb.js} +1 -1
- package/dist/web/assets/{csv-preview-DzCzp1eI.js → csv-preview-BL0I3CKz.js} +1 -1
- package/dist/web/assets/{database-viewer-Bc0SxzHp.js → database-viewer-awmnuDCt.js} +1 -1
- package/dist/web/assets/{diff-viewer-D1_p6x3B.js → diff-viewer-_yQtutHR.js} +1 -1
- package/dist/web/assets/{docx-preview-DwMr29B9.js → docx-preview-DDw3duw9.js} +1 -1
- package/dist/web/assets/{extension-webview-DekZ27i8.js → extension-webview-DkTI51P3.js} +1 -1
- package/dist/web/assets/{git-log-panel-BfND10PZ.js → git-log-panel-NkghB_rO.js} +1 -1
- package/dist/web/assets/{glide-data-grid-CR7uGT3d.js → glide-data-grid-Bpgp72Hg.js} +1 -1
- package/dist/web/assets/{group-chat-tab-DtnJcJnm.js → group-chat-tab-CQOVBmVp.js} +1 -1
- package/dist/web/assets/{image-preview-IL6Io7vM.js → image-preview-Dwg0EuJ2.js} +1 -1
- package/dist/web/assets/{index-oAxj66VZ.js → index-CJ0Wp_rW.js} +3 -3
- package/dist/web/assets/{keybindings-store-Dq7MhLxP.js → keybindings-store-ClNYe9vD.js} +1 -1
- package/dist/web/assets/{markdown-renderer-BWY-49fv.js → markdown-renderer-C7dlPs2S.js} +1 -1
- package/dist/web/assets/{markdown-renderer-SKo8Onun.js → markdown-renderer-CwpP5Ola.js} +1 -1
- package/dist/web/assets/{notification-store-U1Rbcui7.js → notification-store-DwAhNzTy.js} +1 -1
- package/dist/web/assets/{pdf-preview-Dl5cTIGt.js → pdf-preview-CEWYMxdp.js} +1 -1
- package/dist/web/assets/{postgres-viewer-DR_shYSN.js → postgres-viewer-D7PggslU.js} +1 -1
- package/dist/web/assets/{settings-tab-DI2q_Qj3.js → settings-tab-CeSJQIfF.js} +1 -1
- package/dist/web/assets/{sql-query-editor-BFnHUYW2.js → sql-query-editor-ZnKcxCyj.js} +1 -1
- package/dist/web/assets/{sqlite-viewer-DZAF9v9K.js → sqlite-viewer-8fk_wut8.js} +1 -1
- package/dist/web/assets/{system-monitor-tab-BIn4ZRWr.js → system-monitor-tab-Ck3REHUg.js} +1 -1
- package/dist/web/assets/{terminal-tab-BI4jMhtL.js → terminal-tab-D6tYDFSF.js} +1 -1
- package/dist/web/assets/{tool-cards-DooXE9m_.js → tool-cards-C3ka1Y7I.js} +2 -2
- package/dist/web/assets/{use-monaco-theme-rmEGn72e.js → use-monaco-theme-wKbyNwIn.js} +1 -1
- package/dist/web/assets/{video-preview-DDrh4ENk.js → video-preview-DwrfenNA.js} +1 -1
- package/dist/web/index.html +1 -1
- package/dist/web/monacoeditorwork/css.worker.bundle.js +122 -122
- package/dist/web/monacoeditorwork/editor.worker.bundle.js +78 -78
- package/dist/web/monacoeditorwork/html.worker.bundle.js +110 -110
- package/dist/web/monacoeditorwork/json.worker.bundle.js +108 -108
- package/dist/web/monacoeditorwork/ts.worker.bundle.js +81 -81
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/src/providers/mock-provider.ts +10 -0
- package/src/server/index.ts +41 -15
- package/src/server/ws/chat.ts +8 -1
- package/src/services/autostart-generator.ts +24 -0
- package/src/services/autostart-register.ts +33 -4
- package/src/web/app.tsx +1 -16
- package/src/web/hooks/use-chat.ts +3 -2
- package/src/web/hooks/use-global-events.ts +8 -2
- package/src/web/lib/sync-running-sessions.ts +27 -0
- package/src/web/stores/streaming-store.ts +29 -7
|
@@ -2,21 +2,43 @@ import { create } from "zustand";
|
|
|
2
2
|
|
|
3
3
|
/** Tracks which chat sessions are currently streaming AI responses */
|
|
4
4
|
interface StreamingStore {
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/** sessionId → projectName ("" when unknown) for sessions actively streaming.
|
|
6
|
+
* The project is recorded so a project-scoped sync can drop stale entries
|
|
7
|
+
* without touching sessions that belong to another project. */
|
|
8
|
+
sessions: Map<string, string>;
|
|
7
9
|
/** Mark a session as streaming or idle */
|
|
8
|
-
setStreaming: (sessionId: string, streaming: boolean) => void;
|
|
10
|
+
setStreaming: (sessionId: string, streaming: boolean, projectName?: string) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Reconcile one project's streaming set against the server's registry, which
|
|
13
|
+
* is authoritative. Needed because an `idle` broadcast missed while
|
|
14
|
+
* `/ws/global` was down would otherwise leave a spinner running forever —
|
|
15
|
+
* nothing else ever clears it. Scoped per project: the running list only
|
|
16
|
+
* covers one project, so entries from other projects must survive.
|
|
17
|
+
*/
|
|
18
|
+
replaceProjectStreaming: (projectName: string, sessionIds: string[]) => void;
|
|
9
19
|
}
|
|
10
20
|
|
|
11
21
|
export const useStreamingStore = create<StreamingStore>((set) => ({
|
|
12
|
-
sessions: new
|
|
13
|
-
setStreaming: (sessionId, streaming) =>
|
|
22
|
+
sessions: new Map(),
|
|
23
|
+
setStreaming: (sessionId, streaming, projectName) =>
|
|
14
24
|
set((state) => {
|
|
15
|
-
const next = new
|
|
16
|
-
|
|
25
|
+
const next = new Map(state.sessions);
|
|
26
|
+
// Keep a previously recorded project when a caller omits it, so the entry
|
|
27
|
+
// stays reconcilable.
|
|
28
|
+
if (streaming) next.set(sessionId, projectName ?? next.get(sessionId) ?? "");
|
|
17
29
|
else next.delete(sessionId);
|
|
18
30
|
return { sessions: next };
|
|
19
31
|
}),
|
|
32
|
+
replaceProjectStreaming: (projectName, sessionIds) =>
|
|
33
|
+
set((state) => {
|
|
34
|
+
const running = new Set(sessionIds);
|
|
35
|
+
const next = new Map(state.sessions);
|
|
36
|
+
for (const [id, project] of state.sessions) {
|
|
37
|
+
if (project === projectName && !running.has(id)) next.delete(id);
|
|
38
|
+
}
|
|
39
|
+
for (const id of sessionIds) next.set(id, projectName);
|
|
40
|
+
return { sessions: next };
|
|
41
|
+
}),
|
|
20
42
|
}));
|
|
21
43
|
|
|
22
44
|
/** Selector: true if any session is streaming */
|