@hienlh/ppm 0.13.5 → 0.13.6

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.
Files changed (28) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/assets/skills/ppm/SKILL.md +1 -1
  3. package/assets/skills/ppm/references/http-api.md +1 -1
  4. package/dist/web/assets/{audio-preview-BdRw2cYi.js → audio-preview-DEJiSXcO.js} +1 -1
  5. package/dist/web/assets/{chat-tab-C2NBEXEX.js → chat-tab-DQBl8oq4.js} +3 -3
  6. package/dist/web/assets/{code-editor-BhmUC3pD.js → code-editor-JxVGEgWY.js} +2 -2
  7. package/dist/web/assets/{conflict-editor-Br_CSQdA.js → conflict-editor-BZ4mdQJX.js} +1 -1
  8. package/dist/web/assets/{database-viewer-CbIMjroK.js → database-viewer-CBfw4hkk.js} +1 -1
  9. package/dist/web/assets/{diff-viewer-oq0RiOpV.js → diff-viewer-4hobWs-B.js} +1 -1
  10. package/dist/web/assets/{extension-webview-DxP22X_y.js → extension-webview-DEOG3sef.js} +1 -1
  11. package/dist/web/assets/{image-preview-yX0yZtyd.js → image-preview-YNpn3xj7.js} +1 -1
  12. package/dist/web/assets/index-C7gvr4Xo.js +27 -0
  13. package/dist/web/assets/keybindings-store-BhvgfX51.js +1 -0
  14. package/dist/web/assets/{markdown-renderer-DHD3HPwK.js → markdown-renderer-B7yiCjpQ.js} +1 -1
  15. package/dist/web/assets/{pdf-preview-BlRtar7G.js → pdf-preview-D3u3Hr2R.js} +1 -1
  16. package/dist/web/assets/{port-forwarding-tab-DOYZIXHo.js → port-forwarding-tab-CSGpa5Bk.js} +1 -1
  17. package/dist/web/assets/{postgres-viewer-DM6b5mZl.js → postgres-viewer-Cf4sjXxY.js} +1 -1
  18. package/dist/web/assets/{settings-tab-JzeC-QC7.js → settings-tab-BLlfwRRc.js} +1 -1
  19. package/dist/web/assets/{sqlite-viewer-IvosQxK2.js → sqlite-viewer-WAA8mf_X.js} +1 -1
  20. package/dist/web/assets/{terminal-tab-D4xxia2I.js → terminal-tab-Bn8wLy9d.js} +1 -1
  21. package/dist/web/assets/{video-preview-ClY8ALGJ.js → video-preview-CRDjNIVX.js} +1 -1
  22. package/dist/web/index.html +1 -1
  23. package/dist/web/sw.js +1 -1
  24. package/package.json +1 -1
  25. package/src/server/routes/chat.ts +25 -16
  26. package/src/web/components/layout/mobile-nav.tsx +39 -4
  27. package/dist/web/assets/index-DJQJu6Ef.js +0 -27
  28. package/dist/web/assets/keybindings-store-zxSQXdFL.js +0 -1
@@ -15,9 +15,11 @@ import type { Tab, TabType } from "@/stores/tab-store";
15
15
  import { cn } from "@/lib/utils";
16
16
  import { openCommandPalette } from "@/hooks/use-global-keybindings";
17
17
  import { useNotificationStore, notificationColor } from "@/stores/notification-store";
18
+ import { useStreamingStore } from "@/stores/streaming-store";
18
19
  import { useTabOverflow, getHiddenUnreadDirection } from "@/hooks/use-tab-overflow";
19
20
  import { downloadFile } from "@/lib/file-download";
20
21
  import { FileActions } from "@/components/explorer/file-actions";
22
+ import { api, projectUrl } from "@/lib/api-client";
21
23
 
22
24
  const NEW_TAB_OPTIONS: { type: TabType; label: string }[] = [
23
25
  { type: "terminal", label: "Terminal" },
@@ -63,6 +65,9 @@ export function MobileNav({ onMenuPress, onProjectsPress }: MobileNavProps) {
63
65
  const mobileScrollRef = useRef<HTMLDivElement>(null);
64
66
  const prevTabCount = useRef(tabs.length);
65
67
  const notifications = useNotificationStore((s) => s.notifications);
68
+ const streamingSessions = useStreamingStore((s) => s.sessions);
69
+ const [sessionTagMap, setSessionTagMap] = useState<Record<string, { id: number; name: string; color: string }>>({});
70
+
66
71
  const { canScrollLeft, canScrollRight, scrollRight: doScrollRight } =
67
72
  useTabOverflow(mobileScrollRef);
68
73
  const hiddenUnread = getHiddenUnreadDirection(mobileScrollRef.current, tabRefs.current as Map<string, HTMLElement>, tabs, notifications);
@@ -154,6 +159,19 @@ export function MobileNav({ onMenuPress, onProjectsPress }: MobileNavProps) {
154
159
 
155
160
  // Active project avatar for the Projects button
156
161
  const { activeProject, projects, customOrder } = useProjectStore(useShallow((s) => ({ activeProject: s.activeProject, projects: s.projects, customOrder: s.customOrder })));
162
+
163
+ // Session tag map — same fetch pattern as desktop tab-bar so mobile tabs can show tag bar
164
+ const chatSessionIds = tabs.filter((t) => t.type === "chat" && t.metadata?.sessionId).map((t) => t.metadata!.sessionId as string);
165
+ useEffect(() => {
166
+ if (!activeProject?.name || chatSessionIds.length === 0) return;
167
+ api.get<{ sessions: { id: string; tag?: { id: number; name: string; color: string } | null }[] }>(
168
+ `${projectUrl(activeProject.name)}/chat/sessions?limit=50`,
169
+ ).then((data) => {
170
+ const map: Record<string, { id: number; name: string; color: string }> = {};
171
+ for (const s of data.sessions) { if (s.tag) map[s.id] = s.tag; }
172
+ setSessionTagMap(map);
173
+ }).catch(() => {});
174
+ }, [activeProject?.name, chatSessionIds.join(",")]); // eslint-disable-line react-hooks/exhaustive-deps
157
175
  const ordered = resolveOrder(projects, customOrder ?? null);
158
176
  const allNames = ordered.map((p) => p.name);
159
177
  const activeIdx = ordered.findIndex((p) => p.name === activeProject?.name);
@@ -218,6 +236,8 @@ export function MobileNav({ onMenuPress, onProjectsPress }: MobileNavProps) {
218
236
  const sessionId = tab.type === "chat" ? (tab.metadata?.sessionId as string) : undefined;
219
237
  const entry = sessionId ? notifications.get(sessionId) : undefined;
220
238
  const notiType = entry && entry.count > 0 ? entry.type : null;
239
+ const tagColor = sessionId ? sessionTagMap[sessionId]?.color : undefined;
240
+ const isStreaming = sessionId ? streamingSessions.has(sessionId) : false;
221
241
  return (
222
242
  <button
223
243
  key={tab.id}
@@ -231,15 +251,30 @@ export function MobileNav({ onMenuPress, onProjectsPress }: MobileNavProps) {
231
251
  onTouchMove={cancelLongPress}
232
252
  onContextMenu={(e) => e.preventDefault()}
233
253
  className={cn(
234
- "flex items-center gap-1 px-3 h-12 whitespace-nowrap text-xs shrink-0 border-t-2 transition-colors",
254
+ "relative flex items-center gap-1 px-3 h-12 whitespace-nowrap text-xs shrink-0 border-t-2 transition-colors",
235
255
  isActive ? "border-primary bg-surface text-primary" : "border-transparent text-text-secondary",
236
256
  )}
237
257
  >
238
- <span className="relative">
258
+ {tagColor && (
259
+ // Tag identity marker — VS Code-style vertical bar on left edge, matches desktop tab
260
+ <span
261
+ aria-hidden
262
+ className="absolute left-0 top-2 bottom-2 w-[3px] rounded-r-full pointer-events-none"
263
+ style={{ backgroundColor: tagColor }}
264
+ />
265
+ )}
266
+ <span className={cn("relative", isStreaming && "text-amber-500")}>
239
267
  <Icon className="size-4" />
240
- {notiType && !isActive && (
268
+ {isStreaming ? (
269
+ // Messenger-style typing dots inside chat bubble — inherits amber via bg-current
270
+ <span aria-hidden className="absolute inset-0 flex items-center justify-center gap-[1.5px]">
271
+ <span className="tab-typing-dot size-[2px] rounded-full bg-current" />
272
+ <span className="tab-typing-dot size-[2px] rounded-full bg-current" style={{ animationDelay: "0.15s" }} />
273
+ <span className="tab-typing-dot size-[2px] rounded-full bg-current" style={{ animationDelay: "0.3s" }} />
274
+ </span>
275
+ ) : notiType && !isActive ? (
241
276
  <span className={cn("absolute -top-1 -right-1 size-2 rounded-full", notificationColor(notiType))} />
242
- )}
277
+ ) : null}
243
278
  </span>
244
279
  <span className="max-w-[80px] truncate">{tab.title}</span>
245
280
  {tab.closable && (