@ai-matrx/coding-sessions 0.1.88 → 0.1.90
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 +12 -0
- package/dist/react/index.cjs +62 -42
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +63 -42
- package/dist/react/index.js.map +1 -1
- package/dist/ui/assets/{index-Cc8Ab0hC.css → index-BXhkszQ9.css} +1 -1
- package/dist/ui/assets/{index-IJTsEpnF.js → index-CllHWwOQ.js} +1 -1
- package/dist/ui/index.html +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-matrx/coding-sessions
|
|
2
2
|
|
|
3
|
+
## 0.1.90
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/coding-sessions/v0.1.89..npm/coding-sessions/v0.1.90 -- apps/shared/coding-sessions`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.1.89
|
|
10
|
+
|
|
11
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
12
|
+
`git diff npm/coding-sessions/v0.1.88..npm/coding-sessions/v0.1.89 -- apps/shared/coding-sessions`).
|
|
13
|
+
No source changes intended and no consumer action required.
|
|
14
|
+
|
|
3
15
|
## 0.1.88
|
|
4
16
|
|
|
5
17
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/dist/react/index.cjs
CHANGED
|
@@ -2651,7 +2651,7 @@ function SessionView({ session, changesOpen, setChangesOpen }) {
|
|
|
2651
2651
|
) : null,
|
|
2652
2652
|
messages.length === 0 && !live ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-1 items-center justify-center text-[13px] text-muted-foreground", children: session.origin === "takeover" ? "You've taken over this chat. Send a message to continue it." : "Nothing here yet." }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react9.ChatMessageList, { className: "min-h-0 flex-1", label: `Conversation: ${entry.title}` })
|
|
2653
2653
|
] }) }),
|
|
2654
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "mx-auto w-full max-w-[820px] px-4 pb-4", children: [
|
|
2654
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { "data-cs-composer": true, className: "mx-auto w-full max-w-[820px] px-4 pb-4", children: [
|
|
2655
2655
|
limited ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "mb-2 flex items-start gap-2 rounded-lg border border-warning/40 bg-warning/10 px-3 py-2 text-[12.5px]", children: [
|
|
2656
2656
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AlertIcon, { size: 15, className: "mt-0.5 shrink-0 text-warning" }),
|
|
2657
2657
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
|
|
@@ -3240,52 +3240,62 @@ function Home({ onNew }) {
|
|
|
3240
3240
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("kbd", { className: "cs-kbd", children: "\u2318/" }),
|
|
3241
3241
|
" all shortcuts"
|
|
3242
3242
|
] }),
|
|
3243
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "mt-6 flex flex-wrap justify-center gap-2 text-left", children: state.providers.data.map((p) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
p.
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
children: [
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
] }),
|
|
3269
|
-
p.ready ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CheckIcon, { size: 15, className: "mt-0.5 text-success" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AlertIcon, { size: 15, className: "mt-0.5 text-warning" })
|
|
3270
|
-
] }, p.provider)) })
|
|
3243
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "mt-6 flex flex-wrap justify-center gap-2 text-left", children: state.providers.data.map((p) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
3244
|
+
"div",
|
|
3245
|
+
{
|
|
3246
|
+
"data-provider-card": p.provider,
|
|
3247
|
+
title: p.installed && p.version ? [binaryWords(p), newerWords(p) ?? p.binary?.path].filter(Boolean).join(" \xB7 ") : void 0,
|
|
3248
|
+
className: "flex w-[260px] items-start gap-2.5 rounded-lg border border-border bg-card px-3 py-2.5",
|
|
3249
|
+
children: [
|
|
3250
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ProviderMark, { provider: p.provider, size: 16 }),
|
|
3251
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "min-w-0 flex-1 leading-5", children: [
|
|
3252
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "block truncate text-[14px] font-semibold", children: p.label }),
|
|
3253
|
+
p.ready ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "block truncate text-[12px] text-muted-foreground", children: [
|
|
3254
|
+
"Ready",
|
|
3255
|
+
p.plan ? ` on your ${p.plan} plan` : "",
|
|
3256
|
+
p.billing === "api" ? " (API key, billed per use)" : ""
|
|
3257
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "block text-[12px] text-muted-foreground", children: [
|
|
3258
|
+
p.problem,
|
|
3259
|
+
" ",
|
|
3260
|
+
p.fix
|
|
3261
|
+
] })
|
|
3262
|
+
] }),
|
|
3263
|
+
p.ready ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CheckIcon, { size: 15, className: "mt-0.5 text-success" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AlertIcon, { size: 15, className: "mt-0.5 text-warning" })
|
|
3264
|
+
]
|
|
3265
|
+
},
|
|
3266
|
+
p.provider
|
|
3267
|
+
)) })
|
|
3271
3268
|
] }) });
|
|
3272
3269
|
}
|
|
3273
3270
|
function useToast() {
|
|
3274
|
-
const [
|
|
3271
|
+
const [current, setCurrent] = (0, import_react8.useState)(null);
|
|
3275
3272
|
const timer = (0, import_react8.useRef)(null);
|
|
3276
3273
|
(0, import_react8.useEffect)(() => () => {
|
|
3277
3274
|
if (timer.current) clearTimeout(timer.current);
|
|
3278
3275
|
}, []);
|
|
3279
|
-
const show = (0, import_react8.useCallback)((next) => {
|
|
3280
|
-
|
|
3276
|
+
const show = (0, import_react8.useCallback)((next, sessionId = null) => {
|
|
3277
|
+
setCurrent({ text: next, sessionId });
|
|
3281
3278
|
if (timer.current) clearTimeout(timer.current);
|
|
3282
|
-
timer.current = setTimeout(() =>
|
|
3279
|
+
timer.current = setTimeout(() => setCurrent(null), 6e3);
|
|
3283
3280
|
}, []);
|
|
3284
|
-
|
|
3281
|
+
const dismiss = (0, import_react8.useCallback)(() => {
|
|
3282
|
+
if (timer.current) clearTimeout(timer.current);
|
|
3283
|
+
setCurrent(null);
|
|
3284
|
+
}, []);
|
|
3285
|
+
return { text: current?.text ?? null, sessionId: current?.sessionId ?? null, show, dismiss };
|
|
3285
3286
|
}
|
|
3286
3287
|
function Toast({ text }) {
|
|
3288
|
+
const ref = (0, import_react8.useRef)(null);
|
|
3289
|
+
(0, import_react8.useLayoutEffect)(() => {
|
|
3290
|
+
const el = ref.current;
|
|
3291
|
+
const pane = el?.parentElement;
|
|
3292
|
+
if (!el || !pane) return;
|
|
3293
|
+
const composer = pane.querySelector("[data-cs-composer]");
|
|
3294
|
+
const gap = composer ? pane.getBoundingClientRect().bottom - composer.getBoundingClientRect().top + 8 : 20;
|
|
3295
|
+
el.style.setProperty("--cs-toast-bottom", `${Math.max(20, Math.round(gap))}px`);
|
|
3296
|
+
}, [text]);
|
|
3287
3297
|
if (!text) return null;
|
|
3288
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { role: "status", className: "cs-toast", children: text });
|
|
3298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref, role: "status", "data-cs-toast": true, className: "cs-toast", children: text });
|
|
3289
3299
|
}
|
|
3290
3300
|
var SIDEBAR_DEFAULT = 300;
|
|
3291
3301
|
var SIDEBAR_MIN = 220;
|
|
@@ -3388,7 +3398,14 @@ function ShortcutsDialog(props) {
|
|
|
3388
3398
|
] }) });
|
|
3389
3399
|
}
|
|
3390
3400
|
var BASE_TITLE = "Coding sessions";
|
|
3391
|
-
function useRunFinishedNotices(openSessionId,
|
|
3401
|
+
function useRunFinishedNotices(openSessionId, toast) {
|
|
3402
|
+
const { show, dismiss, sessionId: toastSession } = toast;
|
|
3403
|
+
const state = useCodingSessionsState();
|
|
3404
|
+
(0, import_react8.useEffect)(() => {
|
|
3405
|
+
if (!toastSession) return;
|
|
3406
|
+
const run = state.runs[toastSession];
|
|
3407
|
+
if (openSessionId === toastSession || run && (run.status === "starting" || run.status === "running")) dismiss();
|
|
3408
|
+
}, [toastSession, openSessionId, state.runs, dismiss]);
|
|
3392
3409
|
const client = useCodingSessionsClient();
|
|
3393
3410
|
const unseen = (0, import_react8.useRef)(0);
|
|
3394
3411
|
const openRef = (0, import_react8.useRef)(openSessionId);
|
|
@@ -3417,7 +3434,7 @@ function useRunFinishedNotices(openSessionId, show) {
|
|
|
3417
3434
|
};
|
|
3418
3435
|
}
|
|
3419
3436
|
} else if (openRef.current !== run.sessionId && run.status !== "stopped") {
|
|
3420
|
-
show(sentence);
|
|
3437
|
+
show(sentence, run.sessionId);
|
|
3421
3438
|
}
|
|
3422
3439
|
});
|
|
3423
3440
|
return () => {
|
|
@@ -3457,7 +3474,8 @@ function Shell() {
|
|
|
3457
3474
|
const [changesOpen, setChangesOpen] = (0, import_react8.useState)(false);
|
|
3458
3475
|
const [found, setFound] = (0, import_react8.useState)({});
|
|
3459
3476
|
const [theme, setTheme] = useTheme();
|
|
3460
|
-
const
|
|
3477
|
+
const toast = useToast();
|
|
3478
|
+
const showToast = toast.show;
|
|
3461
3479
|
const layout = useSidebarLayout();
|
|
3462
3480
|
const searchRef = (0, import_react8.useRef)(null);
|
|
3463
3481
|
const select = (0, import_react8.useCallback)((next) => {
|
|
@@ -3469,7 +3487,7 @@ function Shell() {
|
|
|
3469
3487
|
window.addEventListener("hashchange", onHash);
|
|
3470
3488
|
return () => window.removeEventListener("hashchange", onHash);
|
|
3471
3489
|
}, []);
|
|
3472
|
-
useRunFinishedNotices(selection.kind === "session" ? selection.id : null,
|
|
3490
|
+
useRunFinishedNotices(selection.kind === "session" ? selection.id : null, toast);
|
|
3473
3491
|
const session = selection.kind === "session" ? state.sessions.data.find((s) => s.id === selection.id) ?? null : null;
|
|
3474
3492
|
const discovered = selection.kind === "discovered" ? state.discovered.data.find((d) => d.providerSessionId === selection.id) ?? found[`${selection.provider}:${selection.id}`] ?? null : null;
|
|
3475
3493
|
const run = session ? state.runs[session.id] : void 0;
|
|
@@ -3619,7 +3637,10 @@ function Shell() {
|
|
|
3619
3637
|
),
|
|
3620
3638
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Resizer, { width: layout.width, setWidth: layout.setWidth })
|
|
3621
3639
|
] }),
|
|
3622
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.
|
|
3640
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("main", { className: "relative flex min-w-0 flex-1", children: [
|
|
3641
|
+
main,
|
|
3642
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Toast, { text: toast.text })
|
|
3643
|
+
] })
|
|
3623
3644
|
] }),
|
|
3624
3645
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
3625
3646
|
NewSessionDialog,
|
|
@@ -3632,8 +3653,7 @@ function Shell() {
|
|
|
3632
3653
|
}
|
|
3633
3654
|
}
|
|
3634
3655
|
),
|
|
3635
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ShortcutsDialog, { open: shortcutsOpen, onOpenChange: setShortcutsOpen })
|
|
3636
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Toast, { text: toast })
|
|
3656
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ShortcutsDialog, { open: shortcutsOpen, onOpenChange: setShortcutsOpen })
|
|
3637
3657
|
] }) });
|
|
3638
3658
|
}
|
|
3639
3659
|
function CodingSessionsApp({ transport }) {
|