@alwith/module-chat 0.5.1 → 0.5.3
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/README.md +52 -10
- package/dist/activity-host.d.ts +1 -0
- package/dist/activity-host.js +1 -1
- package/dist/approval/choice-elicitation-form.js +1 -1
- package/dist/approval/choice-schema.js +1 -1
- package/dist/approval/permission-options.js +1 -1
- package/dist/approval/permission-view.js +1 -1
- package/dist/approval/schema-elicitation-form.js +1 -1
- package/dist/approval/url-elicitation-card.js +1 -1
- package/dist/chunk-0j15twx6.js +2 -0
- package/dist/chunk-0n82kdek.js +2 -0
- package/dist/chunk-0pa5t12s.js +2 -0
- package/dist/chunk-0vvn08gg.js +2 -0
- package/dist/chunk-14a9wet3.js +2 -0
- package/dist/chunk-1dp50khb.js +2 -0
- package/dist/{chunk-wmsdg5fb.js → chunk-1hy64ewz.js} +1 -1
- package/dist/chunk-1wc83vxg.js +2 -0
- package/dist/chunk-20bww40d.js +2 -0
- package/dist/chunk-20gtemb9.js +2 -0
- package/dist/chunk-20re64ta.js +2 -0
- package/dist/{chunk-ahcmeqvb.js → chunk-23wzpgbs.js} +2 -2
- package/dist/{chunk-jaf9msp7.js → chunk-2b185a0a.js} +2 -2
- package/dist/chunk-2snmjnz9.js +2 -0
- package/dist/chunk-2sy8cs84.js +2 -0
- package/dist/chunk-30g0y24x.js +2 -0
- package/dist/chunk-33mgpcnd.js +2 -0
- package/dist/chunk-3jcxkpvs.js +2 -0
- package/dist/chunk-3m06tqqk.js +2 -0
- package/dist/{chunk-2v9kbth7.js → chunk-3nmqebb6.js} +3 -3
- package/dist/chunk-4d8q9bpy.js +2 -0
- package/dist/chunk-4dcagj01.js +1 -0
- package/dist/chunk-4mnf89r3.js +1 -0
- package/dist/{chunk-6q8b8aww.js → chunk-51qsyrd6.js} +1 -1
- package/dist/chunk-543v9eke.js +2 -0
- package/dist/chunk-61vxy6yd.js +1 -0
- package/dist/chunk-67txww0x.js +2 -0
- package/dist/chunk-691gxr2e.js +2 -0
- package/dist/chunk-6fht8rx9.js +2 -0
- package/dist/chunk-6ndz2pf9.js +2 -0
- package/dist/chunk-7gaper2w.js +2 -0
- package/dist/chunk-802bgza1.js +2 -0
- package/dist/chunk-86kkb0z4.js +2 -0
- package/dist/chunk-87t0qtkr.js +7 -0
- package/dist/{chunk-38skakaz.js → chunk-8kjsqjy6.js} +1 -1
- package/dist/chunk-8mvg9a32.js +2 -0
- package/dist/chunk-8r010kvn.js +1 -0
- package/dist/chunk-9bjywaze.js +1 -0
- package/dist/chunk-9hqz5fbc.js +2 -0
- package/dist/chunk-9v2gk9ex.js +2 -0
- package/dist/chunk-9x4et210.js +2 -0
- package/dist/{chunk-vk39871j.js → chunk-a7mr12yc.js} +1 -1
- package/dist/chunk-aaqk0jrt.js +2 -0
- package/dist/{chunk-rgy601b7.js → chunk-acrrwrzy.js} +2 -2
- package/dist/chunk-asxwsg2p.js +2 -0
- package/dist/chunk-awrzpp7x.js +2 -0
- package/dist/chunk-aygzz2yg.js +2 -0
- package/dist/chunk-b5g1j1zv.js +2 -0
- package/dist/chunk-bycbj1aq.js +2 -0
- package/dist/chunk-cgxcxfh1.js +3 -0
- package/dist/chunk-cj5pkg2y.js +4 -0
- package/dist/chunk-ckp6661s.js +2 -0
- package/dist/chunk-cr294svm.js +1 -0
- package/dist/chunk-ctedwb0a.js +3 -0
- package/dist/chunk-cw68hvkc.js +1 -0
- package/dist/chunk-czahfwp7.js +2 -0
- package/dist/chunk-d25r0vq3.js +2 -0
- package/dist/chunk-d4yhdesy.js +2 -0
- package/dist/{chunk-2sgxwycp.js → chunk-d6nxypzc.js} +1 -1
- package/dist/{chunk-3z0y9amd.js → chunk-dfengqjx.js} +2 -2
- package/dist/chunk-dnn8064m.js +2 -0
- package/dist/chunk-dqw30cz4.js +2 -0
- package/dist/chunk-dzydvx7r.js +4 -0
- package/dist/{chunk-fmxt5ysw.js → chunk-e3mkvx24.js} +1 -1
- package/dist/chunk-e43pfcrt.js +2 -0
- package/dist/{chunk-bwzjm3g8.js → chunk-ek06eyp4.js} +1 -1
- package/dist/chunk-eyre28p1.js +2 -0
- package/dist/chunk-fqj76wq8.js +2 -0
- package/dist/chunk-h4sw0pez.js +2 -0
- package/dist/chunk-h80g3eme.js +2 -0
- package/dist/{chunk-dp4g5y18.js → chunk-hesyytcd.js} +2 -2
- package/dist/chunk-hmtgx7fw.js +2 -0
- package/dist/chunk-hr9d9zpb.js +2 -0
- package/dist/chunk-hwwhxb3x.js +1 -0
- package/dist/chunk-j4teycge.js +2 -0
- package/dist/{chunk-1vxrdkew.js → chunk-jdv29apq.js} +2 -2
- package/dist/chunk-jf5651fz.js +2 -0
- package/dist/chunk-jmx0awnf.js +2 -0
- package/dist/{chunk-tcqf45rf.js → chunk-jnfp7j32.js} +2 -2
- package/dist/{chunk-9f42d428.js → chunk-k50475tn.js} +1 -1
- package/dist/{chunk-6ynartgd.js → chunk-kbvkr5mr.js} +2 -2
- package/dist/chunk-maepz12p.js +3 -0
- package/dist/chunk-maj7m5s7.js +4 -0
- package/dist/chunk-mgakm5yv.js +2 -0
- package/dist/chunk-mk10tgjk.js +2 -0
- package/dist/{chunk-g13txkf0.js → chunk-mmdpwbef.js} +2 -2
- package/dist/chunk-n3raktzz.js +2 -0
- package/dist/{chunk-d0ptk8x8.js → chunk-ncekagm6.js} +1 -1
- package/dist/chunk-npjw8dm5.js +2 -0
- package/dist/chunk-p0cc67an.js +2 -0
- package/dist/{chunk-r125b0z5.js → chunk-pb6xtb3n.js} +2 -2
- package/dist/chunk-pcngn73n.js +2 -0
- package/dist/chunk-ptt7q7za.js +3 -0
- package/dist/chunk-px7xxz3v.js +2 -0
- package/dist/{chunk-gnthx1zg.js → chunk-qbdqh38y.js} +1 -1
- package/dist/chunk-qf3a35g4.js +2 -0
- package/dist/chunk-qpz97p1m.js +1 -0
- package/dist/chunk-r41p7378.js +2 -0
- package/dist/chunk-r6e2abj6.js +2 -0
- package/dist/{chunk-h96s3j1e.js → chunk-rkqe8p8n.js} +2 -2
- package/dist/chunk-rqbbb37p.js +2 -0
- package/dist/chunk-rzajhyrq.js +2 -0
- package/dist/chunk-sc746nr6.js +2 -0
- package/dist/chunk-sgbde4dv.js +2 -0
- package/dist/{chunk-3abwky4a.js → chunk-st90r31c.js} +1 -1
- package/dist/{chunk-8md0gr7j.js → chunk-t2ceq16d.js} +2 -2
- package/dist/chunk-t9vvcy09.js +3 -0
- package/dist/chunk-tgb70x2n.js +2 -0
- package/dist/chunk-tj44vjyv.js +2 -0
- package/dist/chunk-tptnjbrd.js +2 -0
- package/dist/chunk-tre0r8qm.js +2 -0
- package/dist/chunk-vxnjsga5.js +2 -0
- package/dist/chunk-vyzzs0nc.js +7 -0
- package/dist/chunk-w0y1svj7.js +3 -0
- package/dist/chunk-w2tmm1va.js +2 -0
- package/dist/chunk-w92s8704.js +5 -0
- package/dist/chunk-w99ah6qt.js +3 -0
- package/dist/chunk-wf4tq3fn.js +1 -0
- package/dist/chunk-wqwqx3hc.js +2 -0
- package/dist/chunk-wtk721nx.js +2 -0
- package/dist/chunk-x3b4dpac.js +2 -0
- package/dist/chunk-x71x2atx.js +2 -0
- package/dist/chunk-xem94nq0.js +4 -0
- package/dist/chunk-yx02h2ja.js +2 -0
- package/dist/chunk-z8fdvq3v.js +2 -0
- package/dist/{chunk-nfd274y3.js → chunk-zcrct67v.js} +1 -1
- package/dist/chunk-zjg9n6zj.js +2 -0
- package/dist/chunk-zwvyfjj8.js +2 -0
- package/dist/chunk-zy6338m6.js +2 -0
- package/dist/{chunk-en6qem8e.js → chunk-zzwnpk4q.js} +2 -2
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/assistant-message.js +1 -2
- package/dist/codex/async-question-card.js +1 -3
- package/dist/codex/disclosure-state.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -6
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -2
- package/dist/codex/plan.js +1 -1
- package/dist/codex/styles.css +176 -0
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -3
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/menu-radio.js +1 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.js +1 -1
- package/dist/composer/prompt-input-attachments.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-context.js +1 -1
- package/dist/composer/prompt-input-textarea.js +1 -3
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.d.ts +20 -0
- package/dist/conversation/action-card.js +1 -0
- package/dist/conversation/composer/composer.d.ts +21 -0
- package/dist/conversation/composer/composer.js +1 -0
- package/dist/conversation/composer/config-options.d.ts +6 -0
- package/dist/conversation/composer/config-options.js +1 -0
- package/dist/conversation/composer/context.d.ts +32 -0
- package/dist/conversation/composer/context.js +1 -0
- package/dist/conversation/composer/drafts.d.ts +15 -0
- package/dist/conversation/composer/drafts.js +1 -0
- package/dist/conversation/composer/file-items.d.ts +3 -0
- package/dist/conversation/composer/file-items.js +1 -0
- package/dist/conversation/composer/long-text.d.ts +14 -0
- package/dist/conversation/composer/long-text.js +1 -0
- package/dist/conversation/composer/mention-chips.d.ts +4 -0
- package/dist/conversation/composer/mention-chips.js +1 -0
- package/dist/conversation/composer/mention-uri.d.ts +7 -0
- package/dist/conversation/composer/mention-uri.js +1 -0
- package/dist/conversation/composer/model-menu.d.ts +26 -0
- package/dist/conversation/composer/model-menu.js +1 -0
- package/dist/conversation/composer/pasted-text-attachment.d.ts +5 -0
- package/dist/conversation/composer/pasted-text-attachment.js +1 -0
- package/dist/conversation/composer/permission-mode-menu.d.ts +8 -0
- package/dist/conversation/composer/permission-mode-menu.js +1 -0
- package/dist/conversation/composer/prediction.d.ts +6 -0
- package/dist/conversation/composer/prediction.js +1 -0
- package/dist/conversation/composer/slash-command-button.d.ts +8 -0
- package/dist/conversation/composer/slash-command-button.js +1 -0
- package/dist/conversation/composer/submit-button.d.ts +7 -0
- package/dist/conversation/composer/submit-button.js +1 -0
- package/dist/conversation/composer/usage-meter.d.ts +7 -0
- package/dist/conversation/composer/usage-meter.js +1 -0
- package/dist/conversation/context.d.ts +14 -0
- package/dist/conversation/context.js +1 -0
- package/dist/conversation/conversation-body.d.ts +7 -0
- package/dist/conversation/conversation-body.js +1 -0
- package/dist/conversation/conversation-view.d.ts +17 -0
- package/dist/conversation/conversation-view.js +1 -0
- package/dist/conversation/conversation.d.ts +18 -0
- package/dist/conversation/conversation.js +1 -0
- package/dist/conversation/diff-modal.d.ts +7 -0
- package/dist/conversation/diff-modal.js +1 -0
- package/dist/conversation/session-actions.d.ts +3 -0
- package/dist/conversation/session-actions.js +1 -0
- package/dist/conversation/types.d.ts +21 -0
- package/dist/conversation/types.js +0 -0
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/pointer-centered-zoom.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/locales.d.ts +1432 -0
- package/dist/locales.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/find-bar.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/archived-sessions.d.ts +7 -0
- package/dist/session-list/archived-sessions.js +1 -0
- package/dist/session-list/highlight.d.ts +2 -0
- package/dist/session-list/highlight.js +1 -0
- package/dist/session-list/host.d.ts +43 -0
- package/dist/session-list/host.js +1 -0
- package/dist/session-list/hover-info-card.d.ts +21 -0
- package/dist/session-list/hover-info-card.js +1 -0
- package/dist/session-list/locales.d.ts +247 -0
- package/dist/session-list/locales.js +1 -0
- package/dist/session-list/navigation.d.ts +50 -0
- package/dist/session-list/navigation.js +1 -0
- package/dist/session-list/overflow-marquee.d.ts +2 -0
- package/dist/session-list/overflow-marquee.js +1 -0
- package/dist/session-list/row-stop-button.d.ts +4 -0
- package/dist/session-list/row-stop-button.js +1 -0
- package/dist/session-list/session-groups.d.ts +5 -0
- package/dist/session-list/session-groups.js +1 -0
- package/dist/session-list/session-info-card.d.ts +10 -0
- package/dist/session-list/session-info-card.js +1 -0
- package/dist/session-list/session-list.css +95 -0
- package/dist/session-list/session-list.d.ts +37 -0
- package/dist/session-list/session-list.js +1 -0
- package/dist/session-list/session-row.d.ts +10 -0
- package/dist/session-list/session-row.js +1 -0
- package/dist/session-list/session-state-dot.d.ts +10 -0
- package/dist/session-list/session-state-dot.js +1 -0
- package/dist/session-list/sidebar-overlay.d.ts +2 -0
- package/dist/session-list/sidebar-overlay.js +1 -0
- package/dist/session-list/trailing-swap.d.ts +11 -0
- package/dist/session-list/trailing-swap.js +1 -0
- package/dist/session-list/use-activity-preview.d.ts +2 -0
- package/dist/session-list/use-activity-preview.js +1 -0
- package/dist/session-list/use-project-sessions.d.ts +16 -0
- package/dist/session-list/use-project-sessions.js +1 -0
- package/dist/session-list/virtual-session-rows.d.ts +9 -0
- package/dist/session-list/virtual-session-rows.js +1 -0
- package/dist/session-timeline/activity-group.d.ts +7 -0
- package/dist/session-timeline/activity-group.js +1 -0
- package/dist/session-timeline/activity-projection.d.ts +3 -0
- package/dist/session-timeline/activity-projection.js +1 -0
- package/dist/session-timeline/assistant-content.d.ts +7 -0
- package/dist/session-timeline/assistant-content.js +1 -0
- package/dist/session-timeline/assistant-turn.d.ts +28 -0
- package/dist/session-timeline/assistant-turn.js +1 -0
- package/dist/session-timeline/async-questions.d.ts +5 -0
- package/dist/session-timeline/async-questions.js +1 -0
- package/dist/session-timeline/edited-files-card.d.ts +18 -0
- package/dist/session-timeline/edited-files-card.js +1 -0
- package/dist/session-timeline/history-timeline.d.ts +12 -0
- package/dist/session-timeline/history-timeline.js +1 -0
- package/dist/session-timeline/host.d.ts +14 -0
- package/dist/session-timeline/host.js +1 -0
- package/dist/session-timeline/navigation-rail.d.ts +10 -0
- package/dist/session-timeline/navigation-rail.js +1 -0
- package/dist/session-timeline/plan.d.ts +4 -0
- package/dist/session-timeline/plan.js +1 -0
- package/dist/session-timeline/question-reply.d.ts +8 -0
- package/dist/session-timeline/question-reply.js +1 -0
- package/dist/session-timeline/resource-content.d.ts +7 -0
- package/dist/session-timeline/resource-content.js +1 -0
- package/dist/session-timeline/session-timeline.d.ts +40 -0
- package/dist/session-timeline/session-timeline.js +1 -0
- package/dist/session-timeline/timeline-registry.d.ts +12 -0
- package/dist/session-timeline/timeline-registry.js +1 -0
- package/dist/session-timeline/turn-error.d.ts +14 -0
- package/dist/session-timeline/turn-error.js +1 -0
- package/dist/session-timeline/turn-retry.d.ts +2 -0
- package/dist/session-timeline/turn-retry.js +1 -0
- package/dist/session-timeline/turn-time.d.ts +5 -0
- package/dist/session-timeline/turn-time.js +1 -0
- package/dist/session-timeline/turns.d.ts +51 -0
- package/dist/session-timeline/turns.js +1 -0
- package/dist/session-timeline/types.d.ts +31 -0
- package/dist/session-timeline/types.js +0 -0
- package/dist/session-timeline/use-timeline-scroll.d.ts +12 -0
- package/dist/session-timeline/use-timeline-scroll.js +1 -0
- package/dist/session-timeline/user-message.d.ts +8 -0
- package/dist/session-timeline/user-message.js +1 -0
- package/dist/ui/alert.d.ts +10 -0
- package/dist/ui/alert.js +1 -0
- package/dist/ui/badge.js +1 -1
- package/dist/ui/button.js +1 -1
- package/dist/ui/card.js +1 -1
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/dialog.js +1 -1
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/empty.d.ts +11 -0
- package/dist/ui/empty.js +1 -0
- package/dist/ui/field.js +1 -1
- package/dist/ui/hover-card.js +1 -1
- package/dist/ui/input-group-textarea.js +1 -1
- package/dist/ui/input-group.js +1 -1
- package/dist/ui/input.js +1 -1
- package/dist/ui/kbd.d.ts +3 -0
- package/dist/ui/kbd.js +1 -0
- package/dist/ui/label.js +1 -1
- package/dist/ui/radio-group.js +1 -1
- package/dist/ui/select.d.ts +15 -0
- package/dist/ui/select.js +1 -0
- package/dist/ui/separator.js +1 -1
- package/dist/ui/skeleton.d.ts +2 -0
- package/dist/ui/skeleton.js +1 -0
- package/dist/ui/spinner.d.ts +2 -0
- package/dist/ui/spinner.js +1 -0
- package/dist/ui/switch.js +1 -1
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/tooltip.js +1 -1
- package/package.json +47 -6
- package/dist/chunk-35j3t609.js +0 -2
- package/dist/chunk-3t2c4zky.js +0 -2
- package/dist/chunk-6mhdcz0h.js +0 -2
- package/dist/chunk-6pmsbx1j.js +0 -2
- package/dist/chunk-7ar540cc.js +0 -2
- package/dist/chunk-7ex6r8ja.js +0 -3
- package/dist/chunk-7xdvwjxh.js +0 -2
- package/dist/chunk-98g6kwj5.js +0 -2
- package/dist/chunk-bbw2zg1a.js +0 -2
- package/dist/chunk-c4ps9628.js +0 -2
- package/dist/chunk-c8dr4btd.js +0 -2
- package/dist/chunk-d4e74rv1.js +0 -2
- package/dist/chunk-dj8v2w6n.js +0 -1
- package/dist/chunk-fk1z4bmr.js +0 -2
- package/dist/chunk-fk5nvz2s.js +0 -2
- package/dist/chunk-j3my6gn8.js +0 -1
- package/dist/chunk-k0mayxgs.js +0 -2
- package/dist/chunk-k4w61adv.js +0 -2
- package/dist/chunk-kk9q6wtq.js +0 -2
- package/dist/chunk-p141s624.js +0 -2
- package/dist/chunk-s2n85pks.js +0 -1
- package/dist/chunk-sdv6vdhr.js +0 -7
- package/dist/chunk-sptvg9xh.js +0 -2
- package/dist/chunk-wnq8g0kp.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Io}from"../chunk-hmtgx7fw.js";export{Io as capacityRetryDelay};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ze}from"../chunk-zwvyfjj8.js";export{ze as formatTurnTime};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { CompactionItem, MessageItem, PlanItem, ToolItem } from "@alwith/api";
|
|
2
|
+
import { type Item, type Session } from "@alwith/api";
|
|
3
|
+
import { type HistoryTurnSummary } from "@nyssance/codex-acp-v2/client";
|
|
4
|
+
export type WorkEntry = {
|
|
5
|
+
kind: "activity";
|
|
6
|
+
key: string;
|
|
7
|
+
items: Array<MessageItem | ToolItem>;
|
|
8
|
+
} | {
|
|
9
|
+
kind: "text";
|
|
10
|
+
key: string;
|
|
11
|
+
item: MessageItem;
|
|
12
|
+
} | {
|
|
13
|
+
kind: "plan";
|
|
14
|
+
key: string;
|
|
15
|
+
item: PlanItem;
|
|
16
|
+
} | {
|
|
17
|
+
kind: "compaction";
|
|
18
|
+
key: string;
|
|
19
|
+
item: CompactionItem;
|
|
20
|
+
};
|
|
21
|
+
export type Turn = {
|
|
22
|
+
key: string;
|
|
23
|
+
user: MessageItem | null;
|
|
24
|
+
work: WorkEntry[];
|
|
25
|
+
final: MessageItem[];
|
|
26
|
+
errors: MessageItem[];
|
|
27
|
+
edits: ToolItem[];
|
|
28
|
+
startedAt: number;
|
|
29
|
+
endedAt: number;
|
|
30
|
+
replayed: boolean;
|
|
31
|
+
items: Item[];
|
|
32
|
+
};
|
|
33
|
+
export declare function isMcpStartup(item: Item): item is ToolItem;
|
|
34
|
+
export declare function isSessionStatus(turn: Turn): boolean;
|
|
35
|
+
export declare function groupTurns(session: Session, previous?: Turn[], historyOrder?: HistoryTurnSummary[]): Turn[];
|
|
36
|
+
export declare function messageText(item: MessageItem): string;
|
|
37
|
+
export declare function isHistoryInterrupted(turn: Turn): boolean;
|
|
38
|
+
export declare function isTurnInterrupted(turn: Turn): boolean;
|
|
39
|
+
export declare function turnTiming(turn: Turn): {
|
|
40
|
+
durationMs?: number;
|
|
41
|
+
durationKind: "work" | "total";
|
|
42
|
+
startedAt?: number;
|
|
43
|
+
};
|
|
44
|
+
export declare function continuesTurn(session: Session, turn: Turn, next: Turn | undefined): boolean;
|
|
45
|
+
export declare function activeTurnKey(session: Session, turns: Turn[]): string | undefined;
|
|
46
|
+
export declare function turnPresentation(session: Session, turns: Turn[], index: number): {
|
|
47
|
+
continued: boolean;
|
|
48
|
+
items: Item[];
|
|
49
|
+
edits: ToolItem[];
|
|
50
|
+
startedAt: number;
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Br,jo,Ko,q,Ue,on,Qo,Xo,Yo,Zo}from"../chunk-dqw30cz4.js";import"../chunk-cj5pkg2y.js";import"../chunk-ek06eyp4.js";import"../chunk-zcrct67v.js";import"../chunk-ncekagm6.js";import"../chunk-a7mr12yc.js";export{Yo as activeTurnKey,Xo as continuesTurn,Ko as groupTurns,Ue as isHistoryInterrupted,Br as isMcpStartup,jo as isSessionStatus,on as isTurnInterrupted,q as messageText,Zo as turnPresentation,Qo as turnTiming};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type * as acp from "@agentclientprotocol/sdk/experimental/v2/unstable";
|
|
2
|
+
import type { ToolItem } from "@alwith/api";
|
|
3
|
+
import type { Store } from "@alwith/api/client";
|
|
4
|
+
import type { CodexClientState } from "@nyssance/codex-acp-v2/client";
|
|
5
|
+
import type { ComponentType } from "react";
|
|
6
|
+
import type { ActivityHost } from "../activity-host";
|
|
7
|
+
import type { ToolUseBlock } from "../lib/group-blocks";
|
|
8
|
+
export interface SessionTimelineHost extends ActivityHost {
|
|
9
|
+
theme: "dark" | "light";
|
|
10
|
+
toolBlock?: (block: ToolUseBlock, item: ToolItem) => ToolUseBlock;
|
|
11
|
+
saveFile?: (name: string, data: string) => Promise<void>;
|
|
12
|
+
openDiff?: (file: {
|
|
13
|
+
path: string;
|
|
14
|
+
patch: string;
|
|
15
|
+
}) => void;
|
|
16
|
+
FileIcon?: ComponentType<{
|
|
17
|
+
path: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
}>;
|
|
20
|
+
reportError?: (error: unknown) => void;
|
|
21
|
+
}
|
|
22
|
+
export interface SessionTimelineClient {
|
|
23
|
+
readonly store: Store<CodexClientState>;
|
|
24
|
+
readonly state: CodexClientState;
|
|
25
|
+
prompt(id: string, prompt: acp.ContentBlock[]): Promise<string>;
|
|
26
|
+
loadHistoryTurn(id: string, turnId: string): Promise<void>;
|
|
27
|
+
previewHistoryTurn(id: string, turnId: string): Promise<void>;
|
|
28
|
+
loadHistoryNavigation(id: string): Promise<void>;
|
|
29
|
+
loadOlderHistory(id: string): Promise<void>;
|
|
30
|
+
retrySession(id: string, turnId: string, trigger: "manual" | "automatic"): Promise<void>;
|
|
31
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function useTimelineScroll(root: HTMLElement | null, running: boolean, releaseTurnAnchor?: () => void): {
|
|
2
|
+
isFollowing: boolean;
|
|
3
|
+
scrollToBottom: () => void;
|
|
4
|
+
stopFollowing: () => void;
|
|
5
|
+
schedulePin: () => void;
|
|
6
|
+
contentResized: (anchorTop?: number | null) => void;
|
|
7
|
+
beginLocate: (followAfter: boolean) => {
|
|
8
|
+
isCurrent: () => boolean;
|
|
9
|
+
finish: (top: number) => void;
|
|
10
|
+
};
|
|
11
|
+
cancelLocation: () => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_o}from"../chunk-aygzz2yg.js";export{_o as useTimelineScroll};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type MessageItem } from "@alwith/api";
|
|
2
|
+
export declare const UserMessage: import("react").MemoExoticComponent<({ item, messageTime }: {
|
|
3
|
+
item: MessageItem;
|
|
4
|
+
messageTime: {
|
|
5
|
+
short: string;
|
|
6
|
+
full: string;
|
|
7
|
+
} | null;
|
|
8
|
+
}) => import("react").JSX.Element | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ko}from"../chunk-xem94nq0.js";import"../chunk-2b185a0a.js";import"../chunk-zzwnpk4q.js";import"../chunk-h80g3eme.js";import"../chunk-543v9eke.js";import"../chunk-dqw30cz4.js";import"../chunk-cj5pkg2y.js";import"../chunk-ek06eyp4.js";import"../chunk-zcrct67v.js";import"../chunk-ncekagm6.js";import"../chunk-yx02h2ja.js";import"../chunk-a7mr12yc.js";import"../chunk-1wc83vxg.js";export{ko as UserMessage};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
|
|
7
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function AlertAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
export { Alert, AlertTitle, AlertDescription, AlertAction };
|
package/dist/ui/alert.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{O,$t,F,ai}from"../chunk-4dcagj01.js";export{O as Alert,ai as AlertAction,F as AlertDescription,$t as AlertTitle};
|
package/dist/ui/badge.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Pr,Re}from"../chunk-51qsyrd6.js";export{Re as Badge,Pr as badgeVariants};
|
package/dist/ui/button.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{zr,e}from"../chunk-a7mr12yc.js";export{e as Button,zr as buttonVariants};
|
package/dist/ui/card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{zn,Un,$n,qn,Xr,Vn,Gn}from"../chunk-d6nxypzc.js";export{zn as Card,Xr as CardAction,Vn as CardContent,qn as CardDescription,Gn as CardFooter,Un as CardHeader,$n as CardTitle};
|
package/dist/ui/checkbox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ge}from"../chunk-9bjywaze.js";export{ge as Checkbox};
|
package/dist/ui/dialog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{d,di,Nr,io,Mr,u,b,z,m,w}from"../chunk-cw68hvkc.js";import"../chunk-a7mr12yc.js";export{d as Dialog,io as DialogClose,u as DialogContent,w as DialogDescription,z as DialogFooter,b as DialogHeader,Mr as DialogOverlay,Nr as DialogPortal,m as DialogTitle,di as DialogTrigger};
|
package/dist/ui/dropdown-menu.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{de,ri,ue,W,me,ut,pe,Ae,Le,De,Ot,Xn,Yn,I,ii}from"../chunk-8r010kvn.js";export{de as DropdownMenu,Ot as DropdownMenuCheckboxItem,W as DropdownMenuContent,me as DropdownMenuGroup,pe as DropdownMenuItem,ut as DropdownMenuLabel,ri as DropdownMenuPortal,Xn as DropdownMenuRadioGroup,Yn as DropdownMenuRadioItem,I as DropdownMenuSeparator,ii as DropdownMenuShortcut,Ae as DropdownMenuSub,De as DropdownMenuSubContent,Le as DropdownMenuSubTrigger,ue as DropdownMenuTrigger};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
declare function Empty({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
3
|
+
declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
4
|
+
declare const emptyMediaVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "icon" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): import("react").JSX.Element;
|
|
8
|
+
declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
9
|
+
declare function EmptyDescription({ className, ...props }: React.ComponentProps<"p">): import("react").JSX.Element;
|
|
10
|
+
declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
11
|
+
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, };
|
package/dist/ui/empty.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ae,se,ti,le,ce,ni}from"../chunk-qpz97p1m.js";export{ae as Empty,ni as EmptyContent,ce as EmptyDescription,se as EmptyHeader,ti as EmptyMedia,le as EmptyTitle};
|
package/dist/ui/field.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{At,Lt,Wn,jn,Yr,Kn,Zr,dt,Jr,ei}from"../chunk-st90r31c.js";import"../chunk-qbdqh38y.js";import"../chunk-ek06eyp4.js";export{jn as Field,Yr as FieldContent,dt as FieldDescription,ei as FieldError,Wn as FieldGroup,Kn as FieldLabel,Lt as FieldLegend,Jr as FieldSeparator,At as FieldSet,Zr as FieldTitle};
|
package/dist/ui/hover-card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Se,Ne,Me}from"../chunk-8kjsqjy6.js";export{Se as HoverCard,Me as HoverCardContent,Ne as HoverCardTrigger};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ht}from"../chunk-wqwqx3hc.js";import"../chunk-ncekagm6.js";export{Ht as InputGroupTextarea};
|
package/dist/ui/input-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Qn,Dt,_t,oi}from"../chunk-e3mkvx24.js";import{Ht}from"../chunk-wqwqx3hc.js";import"../chunk-ncekagm6.js";import"../chunk-a7mr12yc.js";export{Qn as InputGroup,Dt as InputGroupAddon,_t as InputGroupButton,oi as InputGroupText,Ht as InputGroupTextarea};
|
package/dist/ui/input.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{l}from"../chunk-1hy64ewz.js";export{l as Input};
|
package/dist/ui/kbd.d.ts
ADDED
package/dist/ui/kbd.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{On,Wr}from"../chunk-cr294svm.js";export{On as Kbd,Wr as KbdGroup};
|
package/dist/ui/label.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{f}from"../chunk-ek06eyp4.js";export{f as Label};
|
package/dist/ui/radio-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{V,M}from"../chunk-zcrct67v.js";export{V as RadioGroup,M as RadioGroupItem};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const Select: typeof SelectPrimitive.Root;
|
|
4
|
+
declare function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props): React.JSX.Element;
|
|
5
|
+
declare function SelectValue({ className, ...props }: SelectPrimitive.Value.Props): React.JSX.Element;
|
|
6
|
+
declare function SelectTrigger({ className, size, children, ...props }: SelectPrimitive.Trigger.Props & {
|
|
7
|
+
size?: "sm" | "default";
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
declare function SelectContent({ className, children, side, sideOffset, align, alignOffset, alignItemWithTrigger, ...props }: SelectPrimitive.Popup.Props & Pick<SelectPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger">): React.JSX.Element;
|
|
10
|
+
declare function SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props): React.JSX.Element;
|
|
11
|
+
declare function SelectItem({ className, children, ...props }: SelectPrimitive.Item.Props): React.JSX.Element;
|
|
12
|
+
declare function SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props): React.JSX.Element;
|
|
13
|
+
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>): React.JSX.Element;
|
|
14
|
+
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>): React.JSX.Element;
|
|
15
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{qt,si,Vt,Gt,oo,li,K,ci,Ir,Sr}from"../chunk-hwwhxb3x.js";export{qt as Select,oo as SelectContent,si as SelectGroup,K as SelectItem,li as SelectLabel,Sr as SelectScrollDownButton,Ir as SelectScrollUpButton,ci as SelectSeparator,Gt as SelectTrigger,Vt as SelectValue};
|
package/dist/ui/separator.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{_}from"../chunk-qbdqh38y.js";export{_ as Separator};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ft}from"../chunk-wf4tq3fn.js";export{Ft as Skeleton};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ve}from"../chunk-61vxy6yd.js";export{ve as Spinner};
|
package/dist/ui/switch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ee}from"../chunk-4mnf89r3.js";export{Ee as Switch};
|
package/dist/ui/textarea.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{k}from"../chunk-ncekagm6.js";export{k as Textarea};
|
package/dist/ui/tooltip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jr,ne,oe,re}from"../chunk-k50475tn.js";export{ne as Tooltip,re as TooltipContent,jr as TooltipProvider,oe as TooltipTrigger};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwith/module-chat",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -271,13 +271,50 @@
|
|
|
271
271
|
"types": "./dist/codex/timeline-virtualizer.d.ts",
|
|
272
272
|
"import": "./dist/codex/timeline-virtualizer.js",
|
|
273
273
|
"default": "./dist/codex/timeline-virtualizer.js"
|
|
274
|
-
}
|
|
274
|
+
},
|
|
275
|
+
"./session-timeline": {
|
|
276
|
+
"types": "./dist/session-timeline/session-timeline.d.ts",
|
|
277
|
+
"import": "./dist/session-timeline/session-timeline.js",
|
|
278
|
+
"default": "./dist/session-timeline/session-timeline.js"
|
|
279
|
+
},
|
|
280
|
+
"./turns": {
|
|
281
|
+
"types": "./dist/session-timeline/turns.d.ts",
|
|
282
|
+
"import": "./dist/session-timeline/turns.js",
|
|
283
|
+
"default": "./dist/session-timeline/turns.js"
|
|
284
|
+
},
|
|
285
|
+
"./resource-content": {
|
|
286
|
+
"types": "./dist/session-timeline/resource-content.d.ts",
|
|
287
|
+
"import": "./dist/session-timeline/resource-content.js",
|
|
288
|
+
"default": "./dist/session-timeline/resource-content.js"
|
|
289
|
+
},
|
|
290
|
+
"./timeline-registry": {
|
|
291
|
+
"types": "./dist/session-timeline/timeline-registry.d.ts",
|
|
292
|
+
"import": "./dist/session-timeline/timeline-registry.js",
|
|
293
|
+
"default": "./dist/session-timeline/timeline-registry.js"
|
|
294
|
+
},
|
|
295
|
+
"./conversation": {
|
|
296
|
+
"types": "./dist/conversation/conversation.d.ts",
|
|
297
|
+
"import": "./dist/conversation/conversation.js",
|
|
298
|
+
"default": "./dist/conversation/conversation.js"
|
|
299
|
+
},
|
|
300
|
+
"./session-list": {
|
|
301
|
+
"types": "./dist/session-list/session-list.d.ts",
|
|
302
|
+
"import": "./dist/session-list/session-list.js",
|
|
303
|
+
"default": "./dist/session-list/session-list.js"
|
|
304
|
+
},
|
|
305
|
+
"./session-list.css": "./dist/session-list/session-list.css"
|
|
275
306
|
},
|
|
276
307
|
"peerDependencies": {
|
|
277
308
|
"@agentclientprotocol/sdk": "^2.0.2",
|
|
278
|
-
"@alwith/api": "^0.
|
|
309
|
+
"@alwith/api": "^0.5.1",
|
|
279
310
|
"react": "^19.3.1",
|
|
280
|
-
"react-dom": "^19.3.1"
|
|
311
|
+
"react-dom": "^19.3.1",
|
|
312
|
+
"@nyssance/codex-acp-v2": "^0.7.39"
|
|
313
|
+
},
|
|
314
|
+
"peerDependenciesMeta": {
|
|
315
|
+
"@nyssance/codex-acp-v2": {
|
|
316
|
+
"optional": true
|
|
317
|
+
}
|
|
281
318
|
},
|
|
282
319
|
"files": [
|
|
283
320
|
"dist",
|
|
@@ -299,9 +336,11 @@
|
|
|
299
336
|
},
|
|
300
337
|
"devDependencies": {
|
|
301
338
|
"@agentclientprotocol/sdk": "^2.0.2",
|
|
302
|
-
"@alwith/api": "^0.
|
|
339
|
+
"@alwith/api": "^0.5.1",
|
|
303
340
|
"@happy-dom/global-registrator": "^21.0.4",
|
|
341
|
+
"@nyssance/codex-acp-v2": "^0.7.39",
|
|
304
342
|
"@testing-library/dom": "^10.4.2",
|
|
343
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
305
344
|
"@testing-library/react": "^16.3.3",
|
|
306
345
|
"@types/react": "^19.3.0",
|
|
307
346
|
"@types/react-dom": "^19.3.0",
|
|
@@ -322,7 +361,9 @@
|
|
|
322
361
|
"@base-ui/react": "^1.9.0",
|
|
323
362
|
"class-variance-authority": "^0.7.1",
|
|
324
363
|
"@floating-ui/dom": "^1.8.0",
|
|
325
|
-
"smplr": "^1.1.0"
|
|
364
|
+
"smplr": "^1.1.0",
|
|
365
|
+
"date-fns": "^4.4.0",
|
|
366
|
+
"ldrs": "^1.1.9"
|
|
326
367
|
},
|
|
327
368
|
"license": "SEE LICENSE IN LICENSE",
|
|
328
369
|
"publishConfig": {
|
package/dist/chunk-35j3t609.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var t=new Map;var a=0;function Z(e,n){let r=n?void 0:t.get(e);if(r===void 0)return null;return t.delete(e),t.set(e,r),{...r,tokens:structuredClone(r.tokens)}}function c(e){if(e.isStreaming||e.text.length>1048576)return;if(t.delete(e.text))a-=e.text.length;t.set(e.text,{...e,tokens:structuredClone(e.tokens)}),a+=e.text.length;while(a>2097152||t.size>200){let n=t.keys().next().value;a-=n.length,t.delete(n)}}class l{worker=new Worker(new URL("@alwith/module-chat/markdown-parser.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(e)=>{let n=e.data,r=this.active;if(n.clientId!==r?.clientId||n.revision!==r.revision){this.fail(Error("Markdown worker returned an unexpected request"));return}if(this.active=null,!n.ok){this.fail(Error(n.error));return}let i={...r.input,tokens:n.tokens};c(i);let s=this.clients.get(r.clientId),o=this.pending.get(r.clientId),u=o!==void 0&&r.input.isStreaming&&o.input.isStreaming&&o.input.text.startsWith(r.input.text);if(s!==void 0&&(s.revision===r.revision||u))s.onResult(i);this.dispatch()},this.worker.onerror=(e)=>this.fail(Error(e.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize Markdown parsing result"))}fail(e){this.failure=e,this.worker.terminate(),this.pending.clear(),this.active=null;for(let n of this.clients.values())n.onError(e)}send(e){try{this.worker.postMessage(e)}catch(n){this.fail(n instanceof Error?n:Error(String(n)))}}dispatch(){if(this.active!==null||this.pending.size===0)return;let e=this.pending.values().next().value;this.pending.delete(e.clientId),this.active=e,this.send({type:"parse",clientId:e.clientId,revision:e.revision,source:e.input.source})}connect(e,n){if(this.failure!==null)throw this.failure;let r=++this.nextClientId,i={revision:0,onResult:e,onError:n};return this.clients.set(r,i),{update:(s)=>{if(this.failure!==null)throw this.failure;i.revision+=1;let o=Z(s.text,s.isStreaming);if(o!==null){this.pending.delete(r),i.onResult(o);return}this.pending.set(r,{clientId:r,revision:i.revision,input:s}),this.dispatch()},dispose:()=>{if(!this.clients.delete(r))return;if(this.pending.delete(r),this.clients.size===0)this.worker.terminate(),d=void 0;else if(this.failure===null)this.send({type:"dispose",clientId:r})}}}}var d;function _e(e,n){return d??=new l,d.connect(e,n)}
|
|
2
|
-
export{Z,_e};
|
package/dist/chunk-3t2c4zky.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-vk39871j.js";import{d}from"./chunk-wmsdg5fb.js";import{cn as v}from"cn";import{ChevronDownIcon as g,ChevronUpIcon as b,XIcon as z}from"lucide-react";import{useEffect as B,useImperativeHandle as N,useRef as E}from"react";import{jsx as n,jsxs as k}from"react/jsx-runtime";function ue({ref:f,value:i,onChange:p,onFind:o,onClose:s,placeholder:m,autoFocusOpen:a=!0,prevTitle:l,nextTitle:c,className:h}){let r=E(null);N(f,()=>{if(r.current===null)throw Error("FindBar input is not mounted");return r.current},[]),B(()=>{if(!a)return;let t=r.current;if(t===null)throw Error("FindBar input is not mounted");t.focus(),t.select()},[a]);let u=!i;return k("div",{className:v("border-border flex h-9 shrink-0 items-center gap-1 border-b px-2",h),children:[n(d,{ref:r,value:i,onChange:(t)=>p(t.target.value),placeholder:m,className:"h-7 text-xs",onKeyDown:(t)=>{if(t.key==="Escape"){t.preventDefault(),s();return}if(t.key==="Enter"){if(t.preventDefault(),i)o(t.shiftKey)}}}),n(e,{size:"icon",variant:"ghost",className:"size-6",disabled:u,onClick:()=>o(!0),title:l?`${l} (⇧↵)`:"⇧↵",children:n(b,{className:"size-3.5"})}),n(e,{size:"icon",variant:"ghost",className:"size-6",disabled:u,onClick:()=>o(!1),title:c?`${c} (↵)`:"↵",children:n(g,{className:"size-3.5"})}),n(e,{size:"icon",variant:"ghost",className:"size-6",onClick:s,title:"Esc",children:n(z,{className:"size-3.5"})})]})}
|
|
2
|
-
export{ue};
|
package/dist/chunk-6mhdcz0h.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Y,De}from"./chunk-c4ps9628.js";function c(t){return{key:t.name,label:t.name,description:t.description??void 0,payload:t.name}}function U(t,s,o=50){let i=new Set,r=t.filter((n)=>{if(i.has(n.name))return!1;return i.add(n.name),!0});if(!s)return r.slice(0,o).map(c);let l=s.toLowerCase(),e=[];for(let n of r){let a=Y(n.name,s);if(a)e.push({c:n,score:a.score});else if(n.description?.toLowerCase().includes(l))e.push({c:n,score:-1})}return e.sort((n,a)=>a.score-n.score),e.slice(0,o).map((n)=>c(n.c))}function ht(t,s,o,i=50){let r=o?`${o.replace(/\/$/,"")}/`:"",l=t.map((e)=>({abs:e,rel:r&&e.startsWith(r)?e.slice(r.length):e}));return De(l,s,(e)=>e.rel,i).map(({item:e})=>({key:e.abs,label:e.rel,payload:e.abs}))}
|
|
2
|
-
export{U,ht};
|
package/dist/chunk-6pmsbx1j.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var ft=280;function fe({entries:i,gapPx:t,measuredHeightsByKey:o,leadingInsetPx:e=0}){let n=[],r=[],d=new Map,s=[],u=e;for(let[x,a]of i.entries()){d.set(a.turnKey,x);for(let h of a.aliases??[])d.set(h,x);s.push(a.turnKey),r.push(u);let f=a.aliases?.map((h)=>o[h]).find((h)=>h!==void 0),m=o[a.turnKey]??f??a.estimatedHeightPx??280;if(n.push(m),u+=m,x<i.length-1)u+=t}return{bottomOffsetsPx:r.map((x,a)=>{let f=n[a];if(f===void 0)throw Error(`Codex turn height is missing at index ${a}`);return u-x-f}),heightsPx:n,topOffsetsPx:r,totalHeightPx:u,turnIndexByKey:d,turnKeys:s}}function g({distanceFromBottomPx:i,layout:t,overscanCount:o,viewportHeightPx:e}){if(t.turnKeys.length===0)return{startIndex:0,endIndex:0};let n=Math.min(Math.max(0,i),t.totalHeightPx),r=Math.min(n+Math.max(0,e),t.totalHeightPx),d=l(t.bottomOffsetsPx,r),s=c(t.bottomOffsetsPx,t.heightsPx,n);return{startIndex:Math.max(0,d-o),endIndex:Math.min(t.turnKeys.length,Math.max(s,d+1)+o)}}function z({anchorKey:i,layout:t,previousRange:o}){let e=t.turnIndexByKey.get(i);if(e===void 0)return null;return{startIndex:e,endIndex:Math.min(t.turnKeys.length,e+o.endIndex-o.startIndex)}}function he({anchorKey:i,distanceFromBottomPx:t,nextLayout:o,previousLayout:e}){let n=e.turnIndexByKey.get(i),r=o.turnIndexByKey.get(i);if(n===void 0||r===void 0)return null;let d=e.bottomOffsetsPx[n],s=e.heightsPx[n],u=o.bottomOffsetsPx[r],x=o.heightsPx[r];if(d===void 0||s===void 0||u===void 0||x===void 0)throw Error(`Codex turn geometry is missing: ${i}`);return Math.max(0,t+u+x-d-s)}function ve({layout:i,turnKey:t,viewportHeightPx:o}){let e=i.turnIndexByKey.get(t);if(e===void 0)return null;let n=i.bottomOffsetsPx[e],r=i.heightsPx[e];if(n===void 0||r===void 0)throw Error(`Codex turn geometry is missing: ${t}`);return Math.max(0,n-o/2+r/2)}function xe({align:i,layout:t,targetHeightPx:o,targetOffsetPx:e,turnKey:n,viewportHeightPx:r}){let d=t.turnIndexByKey.get(n);if(d===void 0)return null;let s=t.bottomOffsetsPx[d],u=t.heightsPx[d];if(s===void 0||u===void 0)throw Error(`Codex turn geometry is missing: ${n}`);let x=s+u-e;return i==="top"?Math.max(0,x-r+10):Math.max(0,x-o/2-r/2)}function l(i,t){let o=0,e=i.length;while(o<e){let n=Math.floor((o+e)/2),r=i[n];if(r===void 0)throw Error(`Codex bottom offset is missing at index ${n}`);if(r<t)e=n;else o=n+1}return o}function c(i,t,o){let e=0,n=i.length;while(e<n){let r=Math.floor((e+n)/2),d=i[r],s=t[r];if(d===void 0||s===void 0)throw Error(`Codex turn geometry is missing at index ${r}`);if(d+s<=o)n=r;else e=r+1}return e}
|
|
2
|
-
export{ft,fe,g,z,he,ve,xe};
|
package/dist/chunk-7ar540cc.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t}from"./chunk-sptvg9xh.js";import{i}from"./chunk-rgy601b7.js";import{isContentEntry as N,isImage as w,isResourceLink as C}from"@alwith/api";import{ChevronRightIcon as S,ImageIcon as A,LoaderCircleIcon as R,RefreshCwIcon as B}from"lucide-react";import{useEffect as T,useState as x}from"react";import{jsx as r,jsxs as h}from"react/jsx-runtime";function p(e){return e.type==="tool_use"&&e.name==="view_image"&&e.status==="completed"}function E(e){let c=[];for(let[l,u]of e.content.entries()){if(!N(u))continue;let s=u.content;if(w(s))c.push({key:`${e.id}:${l}`,src:`data:${s.mimeType};base64,${s.data}`,alt:e.title??""});if(C(s))c.push({key:`${e.id}:${l}`,path:s.uri,alt:s.name})}if(c.length)return c;let o=e.rawInput;if(o!==null&&typeof o==="object"&&"path"in o&&typeof o.path==="string")return[{key:e.id,path:o.path,alt:o.path.split(/[\\/]/).at(-1)??o.path}];throw Error(`Image view ${e.id} has no image source`)}function U({images:e}){let{loadImage:c,openImageGallery:o,openImage:l,t:u}=t(),[s,f]=x({}),[I,k]=x(0),v=JSON.stringify(e);T(()=>{let a=!0,d=JSON.parse(v);f({});for(let n of d)(n.src!==void 0?Promise.resolve(n.src):n.path!==void 0&&c?c(n.path):Promise.reject(Error("Image loading is unavailable"))).then((m)=>{if(a)f((y)=>({...y,[n.key]:{src:m}}))},()=>{if(a)f((m)=>({...m,[n.key]:{error:!0}}))});return()=>{a=!1}},[v,c,I]);let b=e.flatMap((a)=>{let d=s[a.key];return d&&"src"in d?[{src:d.src,alt:a.alt}]:[]});return r("div",{className:"codex-image-thumbnails",children:e.map((a,d)=>{let n=s[a.key];if(!n)return r("div",{className:"codex-image-thumbnail",role:"status","aria-label":u("stream.codex.imageLoading"),children:r(R,{className:"motion-safe:animate-spin","aria-hidden":"true"})},a.key);if("error"in n)return r("button",{type:"button",className:"codex-image-thumbnail",title:a.alt,"aria-label":u("stream.codex.imageFailed"),onClick:()=>k((g)=>g+1),children:r(B,{"aria-hidden":"true"})},a.key);return r("button",{type:"button",className:"codex-image-thumbnail",title:a.alt,onClick:()=>{let g=e.slice(0,d).filter((m)=>{let y=s[m.key];return y&&"src"in y}).length;if(o)o(b,g);else l?.(n.src)},children:r("img",{src:n.src,alt:a.alt,draggable:!1})},a.key)})})}function pe({blocks:e}){let{t:c}=t(),o=e.flatMap(E),[l,u]=i(`image-view:${e[0].id}`,!1);return h("div",{className:"codex-activity-item",children:[h("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":l,onClick:()=>u((s)=>!s),children:[h("span",{className:"codex-activity-label",children:[r(A,{className:"codex-activity-icon","aria-hidden":"true"}),r("span",{className:"codex-activity-leading",children:c("stream.codex.viewedImages",{count:o.length})})]}),r(S,{className:l?"codex-image-chevron codex-image-chevron-open":"codex-image-chevron","aria-hidden":"true"})]}),l&&r(U,{images:o})]})}
|
|
2
|
-
export{p,pe};
|
package/dist/chunk-7ex6r8ja.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{t}from"./chunk-sptvg9xh.js";import{ChevronDownIcon as v,ChevronUpIcon as b,FileDiffIcon as C}from"lucide-react";import{useState as m}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";function x(e){if(e===null||e.length===0)return 0;return e.split(`
|
|
2
|
-
`).length}function ot(e){let l=new Map;for(let u of e)for(let a of u.content){if(a.type!=="diff")continue;let f=a,r=f._meta?.alwith?.hunks??[],h=r.reduce((i,s)=>i+x(s.newText),0),c=r.reduce((i,s)=>i+x(s.oldText),0);for(let i of f.changes){let s=l.get(i.path);if(s)s.additions+=h,s.deletions+=c;else l.set(i.path,{path:i.path,additions:h,deletions:c})}}return[...l.values()]}function le({blocks:e}){return d(it,{files:ot(e)})}function it({files:e,onOpen:l,renderPath:u}){let{t:a,openLink:f}=t(),[r,h]=m(!0),[c,i]=m(!1);if(e.length===0)return null;let s=e.reduce((n,p)=>n+p.additions,0),g=e.reduce((n,p)=>n+p.deletions,0);return o("section",{className:"codex-edited-files-card",children:[o("div",{className:"codex-edited-files-header",children:[d("div",{className:"codex-edited-files-icon","aria-hidden":"true",children:d(C,{})}),o("div",{className:"codex-edited-files-summary",children:[d("strong",{children:a("stream.codex.editedFilesCount",{count:e.length})}),d("button",{type:"button","data-codex-disclosure":"",onClick:()=>{h((n)=>!n),i(!1)},"aria-expanded":r,children:a(r?"stream.codex.hideChanges":"stream.codex.viewChanges")})]}),o("div",{className:"codex-edited-files-total",title:a("stream.codex.changedLines"),children:[o("span",{className:"codex-diff-additions",children:["+",s]}),o("span",{className:"codex-diff-deletions",children:["-",g]})]})]}),r&&o("div",{className:"codex-edited-files-list",children:[(c?e:e.slice(0,3)).map((n)=>o("div",{className:"codex-edited-file-row",children:[d("button",{type:"button",className:"codex-edited-file-path",title:n.path,onClick:()=>l===void 0?f(n.path):l(n),children:u===void 0?n.path:u(n)}),o("span",{className:"codex-edited-file-counts",children:[o("span",{className:"codex-diff-additions",children:["+",n.additions]}),o("span",{className:"codex-diff-deletions",children:["-",n.deletions]})]})]},n.path)),e.length>3&&o("button",{type:"button",className:"codex-edited-files-more","aria-expanded":c,onClick:()=>i((n)=>!n),children:[a(c?"stream.codex.showFewerFiles":"stream.codex.showMoreFiles",{count:e.length-3}),c?d(b,{size:16,"aria-hidden":"true"}):d(v,{size:16,"aria-hidden":"true"})]})]})]})}
|
|
3
|
-
export{ot,le,it};
|
package/dist/chunk-7xdvwjxh.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function*O(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function pt(n,e){if(e.length===0)return[];let r=[];for(let{turnKey:t,segments:o}of n){let c=0;for(let s of o)for(let a of O(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
-
export{O,pt};
|
package/dist/chunk-98g6kwj5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{O}from"./chunk-7xdvwjxh.js";function _(d,f){if(!f)return[];let h=[],s="",n=[],a=()=>{let t=0,e=0;for(let{start:r,end:o}of O(s,f)){while(t<n.length&&n[t].end<=r)t++;e=Math.max(e,t);while(e<n.length&&n[e].end<o)e++;let l=n[t],c=n[e];if(!l||!c)throw Error("Search text offset has no DOM node");let i=document.createRange();i.setStart(l.node,r-l.start),i.setEnd(c.node,o-c.start),h.push(i)}s="",n=[]},u=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DIV","DL","DT","DD","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TD","TH","TR","UL"]),E=(t)=>{if(t.nodeType===Node.TEXT_NODE){let r=t.parentElement;if(!r||r.offsetParent===null&&r.tagName!=="BODY")return;let o=t.nodeValue??"";n.push({node:t,start:s.length,end:s.length+o.length}),s+=o;return}if(!(t instanceof Element))return;if(t.matches("script, style, [hidden], [aria-hidden='true']")){a();return}if(t.tagName==="BR"){a();return}let e=u.has(t.tagName);if(e)a();for(let r of t.childNodes)E(r);if(e)a()};return E(d),a(),h}
|
|
2
|
-
export{_};
|
package/dist/chunk-bbw2zg1a.js
DELETED
package/dist/chunk-c4ps9628.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function Y(r,n){if(!n)return{score:0,indices:[]};let s=r.toLowerCase(),c=n.toLowerCase(),i=[],t=0,e=0,u=-2;for(let l of c.split("")){let o=-1;while(t<s.length){if(s[t]===l){o=t;break}t++}if(o<0)return null;if(e+=1,o===u+1)e+=4;if(h(r,o))e+=5;let f=r.lastIndexOf("/");if(f!==-1&&o>f)e+=2;i.push(o),u=o,t=o+1}if(e-=Math.floor(r.length/50),r.includes(n))e+=3;return{score:e,indices:i}}function De(r,n,s,c=100){if(!n)return r.slice(0,c).map((t)=>({item:t,score:0,indices:[]}));let i=[];for(let t of r){let e=Y(s(t),n);if(!e)continue;i.push({item:t,score:e.score,indices:e.indices})}return i.sort((t,e)=>e.score-t.score),i.slice(0,c)}
|
|
2
|
-
export{Y,De};
|
package/dist/chunk-c8dr4btd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function at(t,e){if(t.type||!e.type)return t;let o=e.type.split("/")[1],i=o!==void 0&&o!==""?`pasted-${Date.now()}.${o==="jpeg"?"jpg":o}`:"";return new File([t],t.name||i||`pasted-${Date.now()}`,{type:e.type})}function Te(t){let e=[],o=!1;for(let i of t){if(i.kind!=="file")continue;let n=i.getAsFile();if(!n)continue;if(!(n.type||i.type).startsWith("image/")){o=!0;continue}e.push(at(n,i))}return{imageFiles:e,sawNonImageFile:o}}function Pe(t){return[...t].some((e)=>e.kind==="string")}function s(t){let e=t.codePointAt(0);return e<32&&e!==9&&e!==10&&e!==13||e===127}function st(t){return[...t].filter((e)=>!s(e)).join("")}function rt(t,e){let o=0;for(let i=0;i<e;i++){let n=t.charCodeAt(i);if(n>=0&&n<=8||n===11||n===12||n>=14&&n<=31||n===127)o++}return o}function F(t){let{value:e,selectionStart:o,selectionEnd:i}=t,n=st(e);if(n===e)return n;if(t.value=n,o!==null&&i!==null){let a=Math.max(0,o-rt(e,o)),r=Math.max(0,i-rt(e,i));requestAnimationFrame(()=>{t.setSelectionRange(a,r)})}return n}
|
|
2
|
-
export{at,Te,Pe,st,rt,F};
|
package/dist/chunk-d4e74rv1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var nt={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function ke(e){return[...e].toSorted((o,n)=>(nt[o.kind]??99)-(nt[n.kind]??99))}function wt(e){return e==="allow_once"||e==="allow_always"}function kt(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
-
export{nt,ke,wt,kt};
|
package/dist/chunk-dj8v2w6n.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Checkbox as i}from"@base-ui/react/checkbox";import{cn as o}from"cn";import{CheckIcon as t}from"lucide-react";import{jsx as e}from"react/jsx-runtime";function w({className:r,...a}){return e(i.Root,{"data-slot":"checkbox",className:o("peer border-input group-has-[:focus-visible]/field-label:not-data-checked:border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3",r),...a,children:e(i.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:e(t,{})})})}export{w};
|
package/dist/chunk-fk1z4bmr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createContext as d,useCallback as n,useContext as i,useEffect as et,useMemo as G,useRef as g,useState as J}from"react";import{jsx as N}from"react/jsx-runtime";var A=d(null),K=d(null);function vt(){return i(K)}var W=d(null);function xt(){return i(W)}var C=d(null);function ye(){let r=i(A);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use usePromptInputController().");return r}var T=()=>i(A);function bt(){let r=i(C);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use useProviderAttachments().");return r}var nt=()=>i(C);function yt({initialInput:r="",revision:l,onSubmittedClear:c,onRemoveAttachment:R,attachmentPolicy:P,value:y,onValueChange:U,attachments:L,onAttachmentsChange:S,children:Q}){let j=n((t)=>{if(t.type)return t.type;let e=(t.name||"").toLowerCase();if(e.endsWith(".png"))return"image/png";if(e.endsWith(".jpg")||e.endsWith(".jpeg"))return"image/jpeg";if(e.endsWith(".webp"))return"image/webp";if(e.endsWith(".gif"))return"image/gif";if(e.endsWith(".bmp"))return"image/bmp";if(e.endsWith(".svg"))return"image/svg+xml";return""},[]),w=y!==void 0,[V,X]=J(r),p=y??V,o=g({value:p,external:l,revision:0});if(o.current.value!==p||o.current.external!==l)o.current={value:p,external:l,revision:o.current.revision+1};let O=n(()=>o.current.revision,[]),x=n((t)=>{if(o.current.value=t,o.current.revision++,w)U?.(t);else X(t)},[w,U]),h=n(()=>x(""),[x]),v=L!==void 0,[Y,Z]=J([]),I=L??Y,b=g(I);b.current=I;let s=n((t)=>{let e=typeof t==="function"?t(b.current):t;if(v)S?.(e);else Z(e)},[v,S]),M=g(null),E=g(()=>{}),k=n((t)=>{let e=[...t];if(e.length===0)return;s((a)=>{let m=P===void 0?e:P.uniqueFiles(e,a);return[...a,...m.map((u)=>{let B=P?.sourcePath(u);return{id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(u),mediaType:j(u),filename:u.name,size:u.size,lastModified:u.lastModified,...B===void 0?{}:{sourcePath:B}}})]})},[P,j,s]),H=n((t)=>{s((e)=>{let a=e.find((m)=>m.id===t);if(a?.url)URL.revokeObjectURL(a.url);return e.filter((m)=>m.id!==t)}),R?.()},[R,s]),_=n(()=>{s((t)=>{for(let e of t)if(e.url)URL.revokeObjectURL(e.url);return[]})},[s]);et(()=>{if(v)return;return()=>{for(let t of b.current)if(t.url)URL.revokeObjectURL(t.url)}},[v]);let z=n(()=>{E.current?.()},[]),F=G(()=>({files:I,add:k,remove:H,clear:_,openFileDialog:z,fileInputRef:M}),[I,k,H,_,z]),D=n((t,e)=>{M.current=t.current,E.current=e},[]),tt=G(()=>({textInput:{value:p,setInput:x,clear:h,getRevision:O,clearSubmitted:c??h},attachments:F,__registerFileInput:D}),[p,x,h,O,c,F,D]);return N(A.Provider,{value:tt,children:N(C.Provider,{value:F,children:Q})})}var q=d(null);function f(){let r=nt(),l=i(q),c=r??l;if(!c)throw Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");return c}
|
|
2
|
-
export{K,vt,W,xt,C,ye,T,bt,yt,q,f};
|
package/dist/chunk-fk5nvz2s.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{cn as S}from"cn";import{useRef as y,useState as k}from"react";import{jsx as m,jsxs as u}from"react/jsx-runtime";function V({name:p,value:P,levels:h,disabled:c,onChange:v}){if(h.length===0)throw Error("EffortSlider requires at least one level");let o=h,g=Math.max(0,o.findIndex((t)=>t.value===P)),[M,d]=k(null),l=y(null),[I,b]=k(null),x=y(0),s=M??I??g,w=(t)=>{let n=++x.current;b(t);let e=()=>{if(x.current===n)b(null)};try{Promise.resolve(v(o[t].value)).then(e,e)}catch(N){throw e(),N}},f=76,r=14,a=2,i=o.length,C=a+s/Math.max(1,i-1)*(f-r-a*2);return u("div",{className:S("flex items-center justify-between px-2 py-2.5",c&&"opacity-50"),children:[u("span",{className:"grid shrink-0 text-sm whitespace-nowrap",children:[o.map((t)=>u("span",{"aria-hidden":!0,className:"invisible col-start-1 row-start-1",children:[p," ",u("span",{style:{fontSize:12},children:["(",t.name,")"]})]},t.value)),u("span",{className:"col-start-1 row-start-1",children:[p," ",u("span",{"data-effort-value":"",style:{fontSize:12},children:["(",o[s].name,")"]})]})]}),u("button",{type:"button",disabled:c,role:"slider","aria-label":p,"aria-valuemin":0,"aria-valuemax":i-1,"aria-valuenow":s,"aria-valuetext":o[s].name,onKeyDown:(t)=>{let n;if(t.key==="ArrowRight"||t.key==="ArrowUp")n=Math.min(i-1,s+1);else if(t.key==="ArrowLeft"||t.key==="ArrowDown")n=Math.max(0,s-1);else if(t.key==="Home")n=0;else if(t.key==="End")n=i-1;else return;if(t.preventDefault(),t.stopPropagation(),!c&&n!==s)w(n)},className:"relative shrink-0 cursor-pointer touch-none overflow-hidden rounded-full border-none p-0 disabled:cursor-default",style:{width:f,height:18,background:"var(--input)"},onPointerDown:(t)=>{if(c||t.button!==0)return;t.preventDefault(),t.stopPropagation(),t.currentTarget.focus(),t.currentTarget.setPointerCapture(t.pointerId);let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/(n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerMove:(t)=>{if(l.current===null)return;let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/(n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerUp:(t)=>{let n=l.current;if(l.current=null,d(null),t.currentTarget.hasPointerCapture(t.pointerId))t.currentTarget.releasePointerCapture(t.pointerId);if(!c&&n!==null&&n!==g)w(n)},onLostPointerCapture:()=>{l.current=null,d(null)},onPointerCancel:()=>{l.current=null,d(null)},onClick:(t)=>{t.preventDefault(),t.stopPropagation()},children:[m("span",{className:"absolute inset-y-0 left-0 w-full rounded-full",style:{background:"var(--input)"}}),o.map((t,n)=>{let e=a+r/2+n/Math.max(1,i-1)*(f-r-a*2)-2;return m("span",{className:"absolute top-1/2 size-1 -translate-y-1/2 rounded-full",style:{left:e,background:"color-mix(in srgb, var(--muted-foreground) 40%, transparent)"}},t.value)}),m("span",{className:"absolute rounded-full transition-all duration-150",style:{width:r,height:r,top:a,left:C,background:"var(--foreground)",boxShadow:"0 1px 2px #0003"}})]})]})}
|
|
2
|
-
export{V};
|
package/dist/chunk-j3my6gn8.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Menu as n}from"@base-ui/react/menu";import{cn as d}from"cn";import{CheckIcon as p,ChevronRightIcon as l}from"lucide-react";import{jsx as t,jsxs as c}from"react/jsx-runtime";function v({...e}){return t(n.Root,{"data-slot":"dropdown-menu",...e})}function St({...e}){return t(n.Portal,{"data-slot":"dropdown-menu-portal",...e})}function x({...e}){return t(n.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function m({align:e="start",alignOffset:o=0,side:r="bottom",sideOffset:i=4,className:s,...u}){return t(n.Portal,{children:t(n.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:o,side:r,sideOffset:i,children:t(n.Popup,{"data-slot":"dropdown-menu-content",className:d("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md p-1 shadow-md ring-1 duration-100 outline-none data-closed:overflow-hidden",s),...u})})})}function b({...e}){return t(n.Group,{"data-slot":"dropdown-menu-group",...e})}function D({className:e,inset:o,...r}){return t(n.GroupLabel,{"data-slot":"dropdown-menu-label","data-inset":o,className:d("text-muted-foreground px-2 py-1.5 text-xs font-medium data-inset:pl-8",e),...r})}function y({className:e,inset:o,variant:r="default",...i}){return t(n.Item,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":r,className:d("group/dropdown-menu-item focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i})}function P({...e}){return t(n.SubmenuRoot,{"data-slot":"dropdown-menu-sub",...e})}function I({className:e,inset:o,children:r,...i}){return c(n.SubmenuTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:d("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i,children:[r,t(l,{className:"ml-auto"})]})}function M({align:e="start",alignOffset:o=-3,side:r="right",sideOffset:i=0,className:s,...u}){return t(m,{"data-slot":"dropdown-menu-sub-content",className:d("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 w-auto min-w-[96px] rounded-md p-1 shadow-lg ring-1 duration-100",s),align:e,alignOffset:o,side:r,sideOffset:i,...u})}function J({className:e,children:o,checked:r,inset:i,...s}){return c(n.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item","data-inset":i,className:d("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:r,...s,children:[t("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:t(n.CheckboxItemIndicator,{children:t(p,{})})}),o]})}function He({...e}){return t(n.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}function Oe({className:e,children:o,inset:r,...i}){return c(n.RadioItem,{"data-slot":"dropdown-menu-radio-item","data-inset":r,className:d("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i,children:[t("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:t(n.RadioItemIndicator,{children:t(p,{})})}),o]})}function a({className:e,...o}){return t(n.Separator,{"data-slot":"dropdown-menu-separator",className:d("bg-border -mx-1 my-1 h-px",e),...o})}function Et({className:e,...o}){return t("span",{"data-slot":"dropdown-menu-shortcut",className:d("text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest",e),...o})}export{v,St,x,m,b,D,y,P,I,M,J,He,Oe,a,Et};
|
package/dist/chunk-k0mayxgs.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function Ce(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function G(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function h(t){return t.type==="array"}function A(t){return(h(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
|
|
2
|
-
export{Ce,G,h,A};
|
package/dist/chunk-k4w61adv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function j(r){if(!r.trimStart().toLowerCase().startsWith("gpt"))return r;let a=/^gpt-\d/iu.test(r.trimStart())?" ":"-";return r.split(/(\s+)/).map((i)=>i.trim().length===0?i:i.split("-").map((t,o)=>{if(t.toLowerCase()==="gpt")return"GPT";if(t.toLowerCase()==="oai")return"OAI";return o>0&&t.length>0?`${t[0]?.toUpperCase()}${t.slice(1)}`:t}).join(a).replace(/^GPT (?=\d)/u,"GPT-")).join("")}
|
|
2
|
-
export{j};
|
package/dist/chunk-kk9q6wtq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ie}from"./chunk-tcqf45rf.js";import{E,Ze,R,L}from"./chunk-wnq8g0kp.js";import{cn as v}from"cn";import{XIcon as _}from"lucide-react";import{useCallback as p,useEffect as D,useMemo as j,useRef as N,useState as b}from"react";import{jsx as i,jsxs as A}from"react/jsx-runtime";function we({open:l,onOpenChange:y,url:h,filename:M,scale:d,onScaleChange:f,containerRef:z,containerClassName:H,dialogContentClassName:P,imageClassName:T}){let g=p((e)=>Math.min(4,Math.max(0.25,e)),[]),[I,O]=b(1),o=g(d??I),W=N(null),s=z??W,S=N(null),[m,x]=b({width:0,height:0}),[C,Z]=b({width:0,height:0}),w=p((e)=>{let n=g(e);if(typeof f==="function"){f(n);return}O(n)},[f,g]);D(()=>{if(!l)return;if(!h)return;if(typeof d==="number")return;O(1)},[l,h,d]),D(()=>{if(!l)return;let e=s.current;if(!e)return;let n=()=>{x({width:e.clientWidth,height:e.clientHeight})};n();let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}},[s,l]);let k=p(()=>{w(1)},[w]),r=j(()=>{let{width:e,height:n}=C,{width:t,height:a}=m;if(e===0||n===0)return{width:0,height:0};if(t===0||a===0)return{width:0,height:0};let c=Math.min(t/e,a/n,1),u=e*c,X=n*c;return{width:u*o,height:X*o}},[o,C,m]);if(!h)return null;return i(E,{open:l,onOpenChange:y,children:A(R,{className:v("top-1/2 left-1/2 h-[90vh] max-h-[90vh] w-[90vw]! max-w-[90vw]! -translate-x-1/2 -translate-y-1/2 gap-0 rounded-none bg-transparent p-0 ring-0 sm:w-[90vw]! sm:max-w-[90vw]!",P),showCloseButton:!1,children:[i(L,{className:"sr-only",children:M||"Image preview"}),i(Ze,{"aria-label":"Close",className:"absolute top-3 right-3 z-10 flex size-10 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur-sm transition-colors hover:bg-black/75",children:i(_,{className:"size-5"})}),i("div",{ref:s,onWheel:(e)=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let n=e.deltaY>0?o-0.2:o+0.2,t=g(Number.parseFloat(n.toFixed(2)));if(t===o)return;let a=s.current,c=S.current,u=a&&c?Ie({container:a,target:c,clientX:e.clientX,clientY:e.clientY,currentScale:o,nextScale:t}):null;if(w(t),a&&u)requestAnimationFrame(()=>{a.scrollTo(u)})},className:v("h-full w-full scrollbar-thin overflow-auto",H),children:i("div",{className:"grid min-h-full min-w-full place-items-center",style:{width:Math.max(m.width,r.width),height:Math.max(m.height,r.height)},children:i("div",{className:"shrink-0",children:i("img",{alt:M||"image preview",className:v("block object-contain select-none",T),decoding:"async",draggable:!1,ref:S,onDoubleClick:k,onLoad:(e)=>{let n=e.currentTarget;Z({width:n.naturalWidth,height:n.naturalHeight});let t=s.current;if(t&&(t.clientWidth||t.clientHeight))x({width:t.clientWidth,height:t.clientHeight})},style:{imageRendering:"auto",width:r.width||void 0,height:r.height||void 0,maxWidth:r.width?"none":"90vw",maxHeight:r.height?"none":"90vh"},src:h})})})})]})})}
|
|
2
|
-
export{we};
|
package/dist/chunk-p141s624.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-d0ptk8x8.js";import{cn as n}from"cn";import{jsx as a}from"react/jsx-runtime";function se({className:r,...e}){return a(o,{"data-slot":"input-group-control",className:n("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",r),...e})}
|
|
2
|
-
export{se};
|
package/dist/chunk-s2n85pks.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Switch as a}from"@base-ui/react/switch";import{cn as d}from"cn";import{jsx as e}from"react/jsx-runtime";function N({className:i,size:t="default",...r}){return e(a.Root,{"data-slot":"switch","data-size":t,className:d("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 aria-invalid:ring-3 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px]",i),...r,children:e(a.Thumb,{"data-slot":"switch-thumb",className:"bg-background dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0"})})}export{N};
|