@ai-matrx/coding-sessions 0.1.89 → 0.1.91
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 +38 -16
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +39 -16
- package/dist/react/index.js.map +1 -1
- package/dist/ui/assets/{index-2WVb2jib.css → index-BXhkszQ9.css} +1 -1
- package/dist/ui/assets/index-XnMtG2Es.js +71 -0
- package/dist/ui/index.html +2 -2
- package/package.json +2 -2
- package/dist/ui/assets/index-D1jCqUub.js +0 -71
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-matrx/coding-sessions
|
|
2
2
|
|
|
3
|
+
## 0.1.91
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/coding-sessions/v0.1.90..npm/coding-sessions/v0.1.91 -- apps/shared/coding-sessions`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.1.90
|
|
10
|
+
|
|
11
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
12
|
+
`git diff npm/coding-sessions/v0.1.89..npm/coding-sessions/v0.1.90 -- apps/shared/coding-sessions`).
|
|
13
|
+
No source changes intended and no consumer action required.
|
|
14
|
+
|
|
3
15
|
## 0.1.89
|
|
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: [
|
|
@@ -3253,8 +3253,7 @@ function Home({ onNew }) {
|
|
|
3253
3253
|
p.ready ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "block truncate text-[12px] text-muted-foreground", children: [
|
|
3254
3254
|
"Ready",
|
|
3255
3255
|
p.plan ? ` on your ${p.plan} plan` : "",
|
|
3256
|
-
p.billing === "api" ? " (API key, billed per use)" : ""
|
|
3257
|
-
p.binary?.newer ? ` \xB7 ${p.binary.newer.version} available` : ""
|
|
3256
|
+
p.billing === "api" ? " (API key, billed per use)" : ""
|
|
3258
3257
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "block text-[12px] text-muted-foreground", children: [
|
|
3259
3258
|
p.problem,
|
|
3260
3259
|
" ",
|
|
@@ -3269,21 +3268,34 @@ function Home({ onNew }) {
|
|
|
3269
3268
|
] }) });
|
|
3270
3269
|
}
|
|
3271
3270
|
function useToast() {
|
|
3272
|
-
const [
|
|
3271
|
+
const [current, setCurrent] = (0, import_react8.useState)(null);
|
|
3273
3272
|
const timer = (0, import_react8.useRef)(null);
|
|
3274
3273
|
(0, import_react8.useEffect)(() => () => {
|
|
3275
3274
|
if (timer.current) clearTimeout(timer.current);
|
|
3276
3275
|
}, []);
|
|
3277
|
-
const show = (0, import_react8.useCallback)((next) => {
|
|
3278
|
-
|
|
3276
|
+
const show = (0, import_react8.useCallback)((next, sessionId = null) => {
|
|
3277
|
+
setCurrent({ text: next, sessionId });
|
|
3279
3278
|
if (timer.current) clearTimeout(timer.current);
|
|
3280
|
-
timer.current = setTimeout(() =>
|
|
3279
|
+
timer.current = setTimeout(() => setCurrent(null), 6e3);
|
|
3281
3280
|
}, []);
|
|
3282
|
-
|
|
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 };
|
|
3283
3286
|
}
|
|
3284
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]);
|
|
3285
3297
|
if (!text) return null;
|
|
3286
|
-
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 });
|
|
3287
3299
|
}
|
|
3288
3300
|
var SIDEBAR_DEFAULT = 300;
|
|
3289
3301
|
var SIDEBAR_MIN = 220;
|
|
@@ -3386,7 +3398,14 @@ function ShortcutsDialog(props) {
|
|
|
3386
3398
|
] }) });
|
|
3387
3399
|
}
|
|
3388
3400
|
var BASE_TITLE = "Coding sessions";
|
|
3389
|
-
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]);
|
|
3390
3409
|
const client = useCodingSessionsClient();
|
|
3391
3410
|
const unseen = (0, import_react8.useRef)(0);
|
|
3392
3411
|
const openRef = (0, import_react8.useRef)(openSessionId);
|
|
@@ -3415,7 +3434,7 @@ function useRunFinishedNotices(openSessionId, show) {
|
|
|
3415
3434
|
};
|
|
3416
3435
|
}
|
|
3417
3436
|
} else if (openRef.current !== run.sessionId && run.status !== "stopped") {
|
|
3418
|
-
show(sentence);
|
|
3437
|
+
show(sentence, run.sessionId);
|
|
3419
3438
|
}
|
|
3420
3439
|
});
|
|
3421
3440
|
return () => {
|
|
@@ -3455,7 +3474,8 @@ function Shell() {
|
|
|
3455
3474
|
const [changesOpen, setChangesOpen] = (0, import_react8.useState)(false);
|
|
3456
3475
|
const [found, setFound] = (0, import_react8.useState)({});
|
|
3457
3476
|
const [theme, setTheme] = useTheme();
|
|
3458
|
-
const
|
|
3477
|
+
const toast = useToast();
|
|
3478
|
+
const showToast = toast.show;
|
|
3459
3479
|
const layout = useSidebarLayout();
|
|
3460
3480
|
const searchRef = (0, import_react8.useRef)(null);
|
|
3461
3481
|
const select = (0, import_react8.useCallback)((next) => {
|
|
@@ -3467,7 +3487,7 @@ function Shell() {
|
|
|
3467
3487
|
window.addEventListener("hashchange", onHash);
|
|
3468
3488
|
return () => window.removeEventListener("hashchange", onHash);
|
|
3469
3489
|
}, []);
|
|
3470
|
-
useRunFinishedNotices(selection.kind === "session" ? selection.id : null,
|
|
3490
|
+
useRunFinishedNotices(selection.kind === "session" ? selection.id : null, toast);
|
|
3471
3491
|
const session = selection.kind === "session" ? state.sessions.data.find((s) => s.id === selection.id) ?? null : null;
|
|
3472
3492
|
const discovered = selection.kind === "discovered" ? state.discovered.data.find((d) => d.providerSessionId === selection.id) ?? found[`${selection.provider}:${selection.id}`] ?? null : null;
|
|
3473
3493
|
const run = session ? state.runs[session.id] : void 0;
|
|
@@ -3617,7 +3637,10 @@ function Shell() {
|
|
|
3617
3637
|
),
|
|
3618
3638
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Resizer, { width: layout.width, setWidth: layout.setWidth })
|
|
3619
3639
|
] }),
|
|
3620
|
-
/* @__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
|
+
] })
|
|
3621
3644
|
] }),
|
|
3622
3645
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
3623
3646
|
NewSessionDialog,
|
|
@@ -3630,8 +3653,7 @@ function Shell() {
|
|
|
3630
3653
|
}
|
|
3631
3654
|
}
|
|
3632
3655
|
),
|
|
3633
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ShortcutsDialog, { open: shortcutsOpen, onOpenChange: setShortcutsOpen })
|
|
3634
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Toast, { text: toast })
|
|
3656
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ShortcutsDialog, { open: shortcutsOpen, onOpenChange: setShortcutsOpen })
|
|
3635
3657
|
] }) });
|
|
3636
3658
|
}
|
|
3637
3659
|
function CodingSessionsApp({ transport }) {
|