@ai-matrx/coding-sessions 0.1.87 → 0.1.89

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.
@@ -20,6 +20,7 @@ import {
20
20
  Dialog as Dialog2,
21
21
  DropdownMenu as DropdownMenu3,
22
22
  DropdownMenuContent as DropdownMenuContent3,
23
+ DropdownMenuItem as DropdownMenuItem4,
23
24
  DropdownMenuTrigger as DropdownMenuTrigger3,
24
25
  DialogContent as DialogContent2,
25
26
  DialogDescription,
@@ -2520,8 +2521,14 @@ function useSessionUsage(sessionId, lastRunKey) {
2520
2521
  }
2521
2522
  function HeaderMenu(props) {
2522
2523
  return /* @__PURE__ */ jsxs7(DropdownMenu3, { children: [
2523
- /* @__PURE__ */ jsx7(DropdownMenuTrigger3, { asChild: true, children: /* @__PURE__ */ jsx7("button", { type: "button", className: "cs-icon-button", "aria-label": "More for this chat", title: "More", children: /* @__PURE__ */ jsx7(MoreIcon, { size: 16 }) }) }),
2524
- /* @__PURE__ */ jsx7(DropdownMenuContent3, { align: "end", className: "w-64", onCloseAutoFocus: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx7(ChatMenuItems, { entry: props.entry, variant: "dropdown", onRename: props.onRename }) })
2524
+ /* @__PURE__ */ jsx7(DropdownMenuTrigger3, { asChild: true, children: /* @__PURE__ */ jsx7("button", { type: "button", className: "cs-icon-button shrink-0", "aria-label": "More for this chat", title: "More", children: /* @__PURE__ */ jsx7(MoreIcon, { size: 16 }) }) }),
2525
+ /* @__PURE__ */ jsxs7(DropdownMenuContent3, { align: "end", className: "w-64", onCloseAutoFocus: (e) => e.preventDefault(), children: [
2526
+ props.onChanges ? /* @__PURE__ */ jsxs7(DropdownMenuItem4, { onSelect: props.onChanges, children: [
2527
+ /* @__PURE__ */ jsx7(FileIcon, { size: 14 }),
2528
+ props.changesOpen ? "Hide changed files" : "Files this chat changed"
2529
+ ] }) : null,
2530
+ /* @__PURE__ */ jsx7(ChatMenuItems, { entry: props.entry, variant: "dropdown", onRename: props.onRename })
2531
+ ] })
2525
2532
  ] });
2526
2533
  }
2527
2534
  function HeaderTitle(props) {
@@ -2627,7 +2634,7 @@ function SessionView({ session, changesOpen, setChangesOpen }) {
2627
2634
  const usageTitle = usage ? `${formatCount(usage.tokens)} tokens over ${usage.runs} ${usage.runs === 1 ? "message" : "messages"} sent from here.` + (usage.cost !== null ? usage.billing === "subscription" ? ` ${formatUsd(usage.cost)} is what this would cost at API prices \u2014 it's covered by your ${provider?.plan ?? ""} plan.`.replace(" ", " ") : ` Billed ${formatUsd(usage.cost)} to your API key.` : "") : "";
2628
2635
  return /* @__PURE__ */ jsxs7("div", { className: "flex min-w-0 flex-1", children: [
2629
2636
  /* @__PURE__ */ jsxs7("section", { className: "flex min-w-0 flex-1 flex-col", "aria-label": entry.title, children: [
2630
- /* @__PURE__ */ jsxs7("header", { className: "flex flex-wrap items-center gap-2 border-b border-border px-5 pt-2.5 pb-2.5", children: [
2637
+ /* @__PURE__ */ jsxs7("header", { className: "@container/header flex items-center gap-2 border-b border-border px-5 pt-2.5 pb-2.5", children: [
2631
2638
  /* @__PURE__ */ jsx7(ProviderMark, { provider: session.provider, size: 22 }),
2632
2639
  /* @__PURE__ */ jsxs7("div", { className: "min-w-0 flex-1 overflow-hidden", children: [
2633
2640
  /* @__PURE__ */ jsx7(HeaderTitle, { entry, renaming, setRenaming }),
@@ -2656,7 +2663,7 @@ function SessionView({ session, changesOpen, setChangesOpen }) {
2656
2663
  "button",
2657
2664
  {
2658
2665
  type: "button",
2659
- className: cn5("cs-chip-button", changesOpen && "cs-chip-button--on"),
2666
+ className: cn5("cs-chip-button shrink-0 @max-[620px]/header:hidden", changesOpen && "cs-chip-button--on"),
2660
2667
  onClick: () => setChangesOpen(!changesOpen),
2661
2668
  "aria-pressed": changesOpen,
2662
2669
  title: "Files this chat changed",
@@ -2671,7 +2678,7 @@ function SessionView({ session, changesOpen, setChangesOpen }) {
2671
2678
  stopping ? /* @__PURE__ */ jsx7(SpinnerIcon, { size: 13 }) : /* @__PURE__ */ jsx7(StopIcon, { size: 13 }),
2672
2679
  stopping ? "Stopping\u2026" : "Stop"
2673
2680
  ] }) : null,
2674
- /* @__PURE__ */ jsx7(HeaderMenu, { entry, onRename: () => setRenaming(true) })
2681
+ /* @__PURE__ */ jsx7(HeaderMenu, { entry, onRename: () => setRenaming(true), onChanges: () => setChangesOpen(!changesOpen), changesOpen })
2675
2682
  ] }),
2676
2683
  /* @__PURE__ */ jsx7("div", { className: "mx-chat flex min-h-0 flex-1 flex-col", children: /* @__PURE__ */ jsxs7(ChatProvider, { thread: transcript.thread, ports: { notifier, toolLabel: friendlyToolName }, children: [
2677
2684
  /* @__PURE__ */ jsx7("div", { className: "min-h-0 flex-1 overflow-hidden", children: transcript.state.loading ? /* @__PURE__ */ jsxs7("div", { className: "flex h-full items-center justify-center gap-2 text-[13px] text-muted-foreground", children: [
@@ -2841,7 +2848,7 @@ function DiscoveredView(props) {
2841
2848
  };
2842
2849
  return /* @__PURE__ */ jsxs7("div", { className: "flex min-w-0 flex-1", children: [
2843
2850
  /* @__PURE__ */ jsxs7("section", { className: "flex min-w-0 flex-1 flex-col", "aria-label": entry.title, children: [
2844
- /* @__PURE__ */ jsxs7("header", { className: "flex flex-wrap items-center gap-2 border-b border-border px-5 pt-2.5 pb-2.5", children: [
2851
+ /* @__PURE__ */ jsxs7("header", { className: "@container/header flex items-center gap-2 border-b border-border px-5 pt-2.5 pb-2.5", children: [
2845
2852
  /* @__PURE__ */ jsx7(ProviderMark, { provider: props.provider, size: 22 }),
2846
2853
  /* @__PURE__ */ jsxs7("div", { className: "min-w-0 flex-1", children: [
2847
2854
  /* @__PURE__ */ jsx7(HeaderTitle, { entry, renaming, setRenaming }),
@@ -3277,35 +3284,32 @@ function Home({ onNew }) {
3277
3284
  /* @__PURE__ */ jsx7("kbd", { className: "cs-kbd", children: "\u2318/" }),
3278
3285
  " all shortcuts"
3279
3286
  ] }),
3280
- /* @__PURE__ */ jsx7("div", { className: "mt-6 grid grid-cols-[repeat(auto-fit,minmax(220px,1fr))] gap-1.5 text-left", children: state.providers.data.map((p) => /* @__PURE__ */ jsxs7("div", { className: "flex min-w-[220px] items-start gap-2.5 rounded-lg border border-border px-3 py-2.5", children: [
3281
- /* @__PURE__ */ jsx7(ProviderMark, { provider: p.provider, size: 16 }),
3282
- /* @__PURE__ */ jsxs7("div", { className: "min-w-0 flex-1 text-[12.5px] leading-5", children: [
3283
- /* @__PURE__ */ jsx7("span", { className: "font-medium", children: p.label }),
3284
- p.ready ? /* @__PURE__ */ jsxs7("span", { className: "text-muted-foreground", children: [
3285
- " ",
3286
- "\u2014 ready",
3287
- p.plan ? ` on your ${p.plan} plan` : "",
3288
- p.billing === "api" ? " (API key, billed per use)" : ""
3289
- ] }) : null,
3290
- p.installed && p.version ? /* @__PURE__ */ jsxs7(
3291
- "span",
3292
- {
3293
- className: "block text-[11.5px] text-muted-foreground",
3294
- title: newerWords(p) ?? p.binary?.path ?? void 0,
3295
- children: [
3296
- binaryWords(p),
3287
+ /* @__PURE__ */ jsx7("div", { className: "mt-6 flex flex-wrap justify-center gap-2 text-left", children: state.providers.data.map((p) => /* @__PURE__ */ jsxs7(
3288
+ "div",
3289
+ {
3290
+ "data-provider-card": p.provider,
3291
+ title: p.installed && p.version ? [binaryWords(p), newerWords(p) ?? p.binary?.path].filter(Boolean).join(" \xB7 ") : void 0,
3292
+ className: "flex w-[260px] items-start gap-2.5 rounded-lg border border-border bg-card px-3 py-2.5",
3293
+ children: [
3294
+ /* @__PURE__ */ jsx7(ProviderMark, { provider: p.provider, size: 16 }),
3295
+ /* @__PURE__ */ jsxs7("div", { className: "min-w-0 flex-1 leading-5", children: [
3296
+ /* @__PURE__ */ jsx7("span", { className: "block truncate text-[14px] font-semibold", children: p.label }),
3297
+ p.ready ? /* @__PURE__ */ jsxs7("span", { className: "block truncate text-[12px] text-muted-foreground", children: [
3298
+ "Ready",
3299
+ p.plan ? ` on your ${p.plan} plan` : "",
3300
+ p.billing === "api" ? " (API key, billed per use)" : "",
3297
3301
  p.binary?.newer ? ` \xB7 ${p.binary.newer.version} available` : ""
3298
- ]
3299
- }
3300
- ) : null,
3301
- p.ready ? null : /* @__PURE__ */ jsxs7("span", { className: "block text-muted-foreground", children: [
3302
- p.problem,
3303
- " ",
3304
- p.fix
3305
- ] })
3306
- ] }),
3307
- p.ready ? /* @__PURE__ */ jsx7(CheckIcon, { size: 15, className: "mt-0.5 text-success" }) : /* @__PURE__ */ jsx7(AlertIcon, { size: 15, className: "mt-0.5 text-warning" })
3308
- ] }, p.provider)) })
3302
+ ] }) : /* @__PURE__ */ jsxs7("span", { className: "block text-[12px] text-muted-foreground", children: [
3303
+ p.problem,
3304
+ " ",
3305
+ p.fix
3306
+ ] })
3307
+ ] }),
3308
+ p.ready ? /* @__PURE__ */ jsx7(CheckIcon, { size: 15, className: "mt-0.5 text-success" }) : /* @__PURE__ */ jsx7(AlertIcon, { size: 15, className: "mt-0.5 text-warning" })
3309
+ ]
3310
+ },
3311
+ p.provider
3312
+ )) })
3309
3313
  ] }) });
3310
3314
  }
3311
3315
  function useToast() {