@alwith/module-chat 0.5.1 → 0.5.2
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 +23 -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-15nwm04a.js +2 -0
- package/dist/chunk-16y5rmm5.js +2 -0
- package/dist/chunk-1d4c9j8w.js +2 -0
- package/dist/chunk-20zcgxa5.js +4 -0
- package/dist/chunk-2epnn4sq.js +1 -0
- package/dist/chunk-2f19pcpn.js +2 -0
- package/dist/chunk-3vt71emt.js +2 -0
- package/dist/{chunk-6ynartgd.js → chunk-42zr8zpv.js} +2 -2
- package/dist/{chunk-7ex6r8ja.js → chunk-4svwa5p8.js} +3 -3
- package/dist/chunk-4tkxmh52.js +2 -0
- package/dist/chunk-5grywgpq.js +4 -0
- package/dist/chunk-5h13saah.js +2 -0
- package/dist/chunk-5j3wnans.js +2 -0
- package/dist/{chunk-wnq8g0kp.js → chunk-6p5hgnpq.js} +1 -1
- package/dist/{chunk-2sgxwycp.js → chunk-6qa5dt1k.js} +1 -1
- package/dist/{chunk-6q8b8aww.js → chunk-6qn5srgg.js} +1 -1
- package/dist/{chunk-8md0gr7j.js → chunk-6vky4fcv.js} +2 -2
- package/dist/chunk-7kcdf82d.js +2 -0
- package/dist/{chunk-wmsdg5fb.js → chunk-7q7c0mds.js} +1 -1
- package/dist/{chunk-vk39871j.js → chunk-801v0awm.js} +1 -1
- package/dist/{chunk-fmxt5ysw.js → chunk-8e7xf2tb.js} +1 -1
- package/dist/chunk-8k7wzkna.js +2 -0
- package/dist/chunk-8vvn71rf.js +2 -0
- package/dist/{chunk-3z0y9amd.js → chunk-9ab18v07.js} +2 -2
- package/dist/{chunk-r125b0z5.js → chunk-9dsa5vm7.js} +2 -2
- package/dist/chunk-9pdj44jr.js +2 -0
- package/dist/{chunk-s2n85pks.js → chunk-9s1cgt7s.js} +1 -1
- package/dist/chunk-aqj0v5a9.js +7 -0
- package/dist/chunk-azmqtycn.js +2 -0
- package/dist/{chunk-3t2c4zky.js → chunk-b5mkvr4d.js} +2 -2
- package/dist/chunk-bfe7xk9m.js +3 -0
- package/dist/{chunk-ahcmeqvb.js → chunk-bkbemt8g.js} +2 -2
- package/dist/{chunk-d0ptk8x8.js → chunk-c4621n0b.js} +1 -1
- package/dist/{chunk-9f42d428.js → chunk-cw9tg2sz.js} +1 -1
- package/dist/{chunk-dp4g5y18.js → chunk-d675nr2b.js} +2 -2
- package/dist/{chunk-2v9kbth7.js → chunk-d8gwsw6j.js} +3 -3
- package/dist/{chunk-38skakaz.js → chunk-dgp9q950.js} +1 -1
- package/dist/{chunk-kk9q6wtq.js → chunk-dm31xvh3.js} +2 -2
- package/dist/chunk-dr6z453e.js +2 -0
- package/dist/{chunk-1vxrdkew.js → chunk-ea7zsd2s.js} +2 -2
- package/dist/chunk-fgsd4fsd.js +2 -0
- package/dist/chunk-fvnb8ds4.js +2 -0
- package/dist/{chunk-tcqf45rf.js → chunk-h0dq9ztv.js} +2 -2
- package/dist/{chunk-gnthx1zg.js → chunk-h38yw8y3.js} +1 -1
- package/dist/chunk-h6df4xfd.js +2 -0
- package/dist/chunk-h87xp1gv.js +2 -0
- package/dist/{chunk-bwzjm3g8.js → chunk-hx6wfscz.js} +1 -1
- package/dist/chunk-j2mcvb68.js +7 -0
- package/dist/chunk-jeyvacx6.js +5 -0
- package/dist/chunk-jh8jske0.js +2 -0
- package/dist/chunk-jn2pj92h.js +2 -0
- package/dist/{chunk-dj8v2w6n.js → chunk-jrrvpnf3.js} +1 -1
- package/dist/chunk-jsb0zged.js +2 -0
- package/dist/chunk-k2y4cpra.js +2 -0
- package/dist/{chunk-nfd274y3.js → chunk-k7zzrns3.js} +1 -1
- package/dist/chunk-m2myfd89.js +2 -0
- package/dist/chunk-m2wxz0sj.js +2 -0
- package/dist/chunk-nxarfyj2.js +2 -0
- package/dist/chunk-p1pd1twf.js +2 -0
- package/dist/chunk-p6558tbk.js +2 -0
- package/dist/{chunk-fk5nvz2s.js → chunk-phe3an96.js} +2 -2
- package/dist/{chunk-en6qem8e.js → chunk-q7e2bdav.js} +2 -2
- package/dist/chunk-qh5fhcrh.js +3 -0
- package/dist/{chunk-3abwky4a.js → chunk-sky795ex.js} +1 -1
- package/dist/chunk-t3vgbc9s.js +2 -0
- package/dist/{chunk-g13txkf0.js → chunk-t5nstx0k.js} +2 -2
- package/dist/chunk-trgq8rq1.js +2 -0
- package/dist/{chunk-h96s3j1e.js → chunk-v0zn87k5.js} +2 -2
- package/dist/chunk-v72t4sf9.js +2 -0
- package/dist/chunk-vhat5rbz.js +2 -0
- package/dist/chunk-vw2hv2sq.js +2 -0
- package/dist/{chunk-jaf9msp7.js → chunk-w3yddw6n.js} +2 -2
- package/dist/chunk-x9pramem.js +2 -0
- package/dist/chunk-xjen1yt6.js +2 -0
- package/dist/chunk-ypvjzkfb.js +2 -0
- 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/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 +2 -2
- 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 +3 -3
- package/dist/composer/prompt-input.js +1 -1
- 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 +312 -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-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/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/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/label.js +1 -1
- package/dist/ui/radio-group.js +1 -1
- package/dist/ui/separator.js +1 -1
- package/dist/ui/switch.js +1 -1
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/tooltip.js +1 -1
- package/package.json +32 -4
- package/dist/chunk-35j3t609.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-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-fk1z4bmr.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-p141s624.js +0 -2
- package/dist/chunk-rgy601b7.js +0 -2
- package/dist/chunk-sdv6vdhr.js +0 -7
- package/dist/chunk-sptvg9xh.js +0 -2
|
@@ -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{At}from"../chunk-8vvn71rf.js";export{At 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{wt}from"../chunk-20zcgxa5.js";import"../chunk-w3yddw6n.js";import"../chunk-q7e2bdav.js";import"../chunk-fgsd4fsd.js";import"../chunk-15nwm04a.js";import"../chunk-fvnb8ds4.js";import"../chunk-5grywgpq.js";import"../chunk-k7zzrns3.js";import"../chunk-hx6wfscz.js";import"../chunk-c4621n0b.js";import"../chunk-vw2hv2sq.js";import"../chunk-801v0awm.js";import"../chunk-azmqtycn.js";export{wt as UserMessage};
|
package/dist/ui/badge.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{mn,Ye}from"../chunk-6qn5srgg.js";export{Ye as Badge,mn as badgeVariants};
|
package/dist/ui/button.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Tn,e}from"../chunk-801v0awm.js";export{e as Button,Tn as buttonVariants};
|
package/dist/ui/card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ue,Ve,qe,Ke,On,Ge,We}from"../chunk-6qa5dt1k.js";export{Ue as Card,On as CardAction,Ge as CardContent,Ke as CardDescription,We as CardFooter,Ve as CardHeader,qe as CardTitle};
|
package/dist/ui/checkbox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{P}from"../chunk-jrrvpnf3.js";export{P as Checkbox};
|
package/dist/ui/dialog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{L,zn,pn,et,gn,A,tt,nt,_,rt}from"../chunk-6p5hgnpq.js";import"../chunk-801v0awm.js";export{L as Dialog,et as DialogClose,A as DialogContent,rt as DialogDescription,nt as DialogFooter,tt as DialogHeader,gn as DialogOverlay,pn as DialogPortal,_ as DialogTitle,zn as DialogTrigger};
|
package/dist/ui/dropdown-menu.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{k,$n,C,x,T,j,I,H,F,D,ue,ot,it,l,Un}from"../chunk-2epnn4sq.js";export{k as DropdownMenu,ue as DropdownMenuCheckboxItem,x as DropdownMenuContent,T as DropdownMenuGroup,I as DropdownMenuItem,j as DropdownMenuLabel,$n as DropdownMenuPortal,ot as DropdownMenuRadioGroup,it as DropdownMenuRadioItem,l as DropdownMenuSeparator,Un as DropdownMenuShortcut,H as DropdownMenuSub,D as DropdownMenuSubContent,F as DropdownMenuSubTrigger,C as DropdownMenuTrigger};
|
package/dist/ui/field.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{re,
|
|
1
|
+
import{ne,re,Fe,De,Rn,Be,Ln,G,An,_n}from"../chunk-sky795ex.js";import"../chunk-h38yw8y3.js";import"../chunk-hx6wfscz.js";export{De as Field,Rn as FieldContent,G as FieldDescription,_n as FieldError,Fe as FieldGroup,Be as FieldLabel,re as FieldLegend,An as FieldSeparator,ne as FieldSet,Ln as FieldTitle};
|
package/dist/ui/hover-card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{je,Qe,Xe}from"../chunk-dgp9q950.js";export{je as HoverCard,Xe as HoverCardContent,Qe as HoverCardTrigger};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ce}from"../chunk-16y5rmm5.js";import"../chunk-c4621n0b.js";export{ce as InputGroupTextarea};
|
package/dist/ui/input-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$e,le,de,Bn}from"../chunk-8e7xf2tb.js";import{ce}from"../chunk-16y5rmm5.js";import"../chunk-c4621n0b.js";import"../chunk-801v0awm.js";export{$e as InputGroup,le as InputGroupAddon,de as InputGroupButton,Bn as InputGroupText,ce as InputGroupTextarea};
|
package/dist/ui/input.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{u}from"../chunk-7q7c0mds.js";export{u as Input};
|
package/dist/ui/label.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{o}from"../chunk-hx6wfscz.js";export{o as Label};
|
package/dist/ui/radio-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c
|
|
1
|
+
import{v,c}from"../chunk-k7zzrns3.js";export{v as RadioGroup,c as RadioGroupItem};
|
package/dist/ui/separator.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{B}from"../chunk-h38yw8y3.js";export{B as Separator};
|
package/dist/ui/switch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{R}from"../chunk-9s1cgt7s.js";export{R as Switch};
|
package/dist/ui/textarea.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{s}from"../chunk-c4621n0b.js";export{s as Textarea};
|
package/dist/ui/tooltip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Hn,oe,ie,ae}from"../chunk-cw9tg2sz.js";export{oe as Tooltip,ae as TooltipContent,Hn as TooltipProvider,ie 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.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -271,13 +271,39 @@
|
|
|
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
|
+
},
|
|
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"
|
|
274
294
|
}
|
|
275
295
|
},
|
|
276
296
|
"peerDependencies": {
|
|
277
297
|
"@agentclientprotocol/sdk": "^2.0.2",
|
|
278
|
-
"@alwith/api": "^0.
|
|
298
|
+
"@alwith/api": "^0.5.1",
|
|
279
299
|
"react": "^19.3.1",
|
|
280
|
-
"react-dom": "^19.3.1"
|
|
300
|
+
"react-dom": "^19.3.1",
|
|
301
|
+
"@nyssance/codex-acp-v2": "^0.7.39"
|
|
302
|
+
},
|
|
303
|
+
"peerDependenciesMeta": {
|
|
304
|
+
"@nyssance/codex-acp-v2": {
|
|
305
|
+
"optional": true
|
|
306
|
+
}
|
|
281
307
|
},
|
|
282
308
|
"files": [
|
|
283
309
|
"dist",
|
|
@@ -299,9 +325,11 @@
|
|
|
299
325
|
},
|
|
300
326
|
"devDependencies": {
|
|
301
327
|
"@agentclientprotocol/sdk": "^2.0.2",
|
|
302
|
-
"@alwith/api": "^0.
|
|
328
|
+
"@alwith/api": "^0.5.1",
|
|
303
329
|
"@happy-dom/global-registrator": "^21.0.4",
|
|
330
|
+
"@nyssance/codex-acp-v2": "^0.7.39",
|
|
304
331
|
"@testing-library/dom": "^10.4.2",
|
|
332
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
305
333
|
"@testing-library/react": "^16.3.3",
|
|
306
334
|
"@types/react": "^19.3.0",
|
|
307
335
|
"@types/react-dom": "^19.3.0",
|
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-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-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-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-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-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-rgy601b7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useCallback as f,useState as r}from"react";var t=new Map;function i(o,e,a=!1){let[p,S]=r(()=>({key:o,expanded:t.get(o)??e})),n=p.expanded;if(p.key!==o||a&&!t.has(o)&&n!==e)n=t.get(o)??e,S({key:o,expanded:n});let k=f((c)=>{S((s)=>{let b=s.key===o?s.expanded:t.get(o)??e,d=typeof c==="function"?c(b):c;return t.set(o,d),s.key===o?{key:o,expanded:d}:s})},[o,e]);return[n,k]}
|
|
2
|
-
export{i};
|
package/dist/chunk-sdv6vdhr.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{t,u}from"./chunk-sptvg9xh.js";import{j}from"./chunk-k4w61adv.js";import{l}from"./chunk-2v9kbth7.js";import{i}from"./chunk-rgy601b7.js";import{p,pe}from"./chunk-7ar540cc.js";import{k}from"./chunk-h96s3j1e.js";import{cn as b}from"cn";import{BotIcon as ge,CheckIcon as fe,CopyIcon as Ce}from"lucide-react";import{Fragment as xe,useEffect as U,useRef as Z,useState as D}from"react";import{jsx as a,jsxs as y,Fragment as O}from"react/jsx-runtime";function G(e,n){let[o,r]=D(()=>({key:e,mounted:n})),s=n||o.key===e&&o.mounted;if(o.key!==e||o.mounted!==s)r({key:e,mounted:s});return s}var K=new WeakMap,J=1;function T(e){if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return`${e.type}:${e.id}`;if(e.type==="thinking"&&e.id!==void 0)return`thinking:${e.id}`;let n=K.get(e);if(n!==void 0)return`${e.type}:${n}`;let o=J;return J+=1,K.set(e,o),`${e.type}:${o}`}function A(e){switch(e){case"pending":case"in_progress":return!0;case"completed":case"failed":case"cancelled":case"interrupted":return!1;default:throw Error(`Unknown ACP tool status: ${e}`)}}function H(e,n){let o=Math.max(0,Math.round(e/1000)),r=Math.floor(o/3600),s=Math.floor(o%3600/60),d=o%60;if(d>=60)s+=Math.floor(d/60),d%=60;if(s>=60)r+=Math.floor(s/60),s%=60;let m=Intl.DurationFormat;if(m)try{return new m(n,{style:"narrow"}).format({hours:r,minutes:s,seconds:r>0?0:d})}catch{}if(r>0)return s>0?`${r}h ${s}m`:`${r}h`;if(s>0)return d>0?`${s}m ${d}s`:`${s}m`;return`${d}s`}var ye="M7.52925 3.7793C7.75652 3.55203 8.10803 3.52383 8.36616 3.69434L8.47065 3.7793L14.2207 9.5293C14.4804 9.789 14.4804 10.211 14.2207 10.4707L8.47065 16.2207C8.21095 16.4804 7.78895 16.4804 7.52925 16.2207C7.26955 15.961 7.26955 15.539 7.52925 15.2793L12.8085 10L7.52925 4.7207L7.44429 4.61621C7.27378 4.35808 7.30198 4.00657 7.52925 3.7793Z";function S({expanded:e,className:n}){return a("svg",{className:b("codex-activity-disclosure",e&&"codex-activity-disclosure-expanded",n),viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:a("path",{d:ye})})}function ve(){return a("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:a("path",{d:"M16.3965 5.01128C16.3963 4.93399 16.3489 4.87691 16.293 4.85406L16.2354 4.84332C13.9306 4.91764 12.5622 5.32101 10.665 6.34722V16.3716C11.3851 15.9994 12.0688 15.7115 12.7861 15.5015C13.8286 15.1965 14.9113 15.0633 16.2402 15.0435L16.2979 15.0308C16.353 15.0063 16.3965 14.9483 16.3965 14.8755V5.01128ZM3.54492 14.8765C3.54492 14.9725 3.62159 15.0422 3.70117 15.0435L4.19629 15.0562C5.94062 15.1247 7.26036 15.4201 8.65918 16.0484C8.05544 15.1706 7.14706 14.436 6.17871 14.1109V14.1099C5.56757 13.9045 5.16816 13.3314 5.16797 12.6988V4.98882C4.86679 4.93786 4.60268 4.8999 4.28223 4.87457L3.72754 4.84429C3.62093 4.84079 3.54505 4.92417 3.54492 5.01226V14.8765ZM17.7266 14.8755C17.7266 15.6314 17.1607 16.2751 16.4121 16.3628L16.2598 16.3736C15.0122 16.3922 14.0555 16.5159 13.1602 16.7779C12.2629 17.0404 11.3966 17.4508 10.3369 18.0738C10.129 18.1959 9.87099 18.1958 9.66309 18.0738C7.71455 16.9283 6.31974 16.4689 4.12988 16.3853L3.68164 16.3736C2.85966 16.3614 2.21484 15.6838 2.21484 14.8765V5.01226C2.21497 4.15391 2.93263 3.4871 3.77246 3.51519L4.39844 3.54937C4.67996 3.57191 4.92258 3.60421 5.16797 3.64214V2.51031C5.16797 1.44939 6.29018 0.645615 7.31055 1.15679L7.31152 1.15582C8.78675 1.89511 10.0656 3.33006 10.5352 4.91461C12.3595 3.98907 13.8688 3.58817 16.1924 3.51324L16.3506 3.51714C17.1285 3.5741 17.7264 4.23496 17.7266 5.01128V14.8755ZM6.49805 12.6988C6.49824 12.7723 6.5442 12.8296 6.60254 12.8492L6.96289 12.9859C7.85245 13.3586 8.68125 13.9846 9.33496 14.7496V5.5816C9.08794 4.37762 8.13648 3.1566 6.95801 2.47613L6.71582 2.34527C6.67779 2.32617 6.6337 2.32502 6.58301 2.35796C6.52946 2.39279 6.49805 2.44863 6.49805 2.51031V12.6988Z"})})}function he(){return a("svg",{className:"codex-activity-icon",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:a("path",{d:"M7.33057 1.98535C10.2484 1.98535 12.6136 4.3508 12.6138 7.26855C12.6138 8.58031 12.1346 9.77942 11.3433 10.7031L13.9897 13.3496C14.1655 13.5253 14.1655 13.8106 13.9897 13.9863C13.814 14.1621 13.5288 14.1621 13.353 13.9863L10.7017 11.335C9.78678 12.0942 8.61243 12.5518 7.33057 12.5518C4.41281 12.5516 2.04736 10.1864 2.04736 7.26855C2.04754 4.35091 4.41292 1.98553 7.33057 1.98535ZM7.33057 2.88574C4.90998 2.88592 2.94793 4.84796 2.94775 7.26855C2.94775 9.68929 4.90987 11.6522 7.33057 11.6523C9.75141 11.6523 11.7144 9.6894 11.7144 7.26855C11.7142 4.84786 9.75131 2.88574 7.33057 2.88574Z"})})}function we(){return y("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[a("path",{d:"M6.19629 7.86231C6.42357 7.63534 6.7752 7.60692 7.0332 7.77734L7.1377 7.86231L8.80371 9.5293C9.06329 9.78889 9.06307 10.21 8.80371 10.4697L7.1377 12.1367C6.878 12.3964 6.45599 12.3964 6.19629 12.1367C5.93686 11.8771 5.93697 11.456 6.19629 11.1963L7.39258 9.99902L6.19629 8.80371L6.11133 8.69922C5.94087 8.4411 5.96904 8.08955 6.19629 7.86231Z"}),a("path",{d:"M13.4668 11.0156C13.7699 11.0776 13.998 11.3456 13.998 11.667C13.9979 11.9883 13.7698 12.2564 13.4668 12.3184L13.333 12.332H10.833C10.466 12.3319 10.1682 12.034 10.168 11.667C10.168 11.2998 10.4659 11.0021 10.833 11.002H13.333L13.4668 11.0156Z"}),a("path",{d:"M12.6602 2.66504C13.3492 2.66504 13.9062 2.66439 14.3564 2.70117C14.8142 2.73859 15.2201 2.81796 15.5967 3.00977C16.1922 3.31321 16.677 3.79805 16.9805 4.39356C17.1722 4.77014 17.2517 5.17604 17.2891 5.63379C17.3258 6.08402 17.3252 6.64102 17.3252 7.33008V12.6602C17.3252 13.3492 17.3258 13.9062 17.2891 14.3564C17.2516 14.8142 17.1723 15.2201 16.9805 15.5967C16.677 16.1922 16.1922 16.677 15.5967 16.9805C15.2201 17.1723 14.8142 17.2516 14.3564 17.2891C13.9062 17.3258 13.3492 17.3252 12.6602 17.3252H7.33008C6.64102 17.3252 6.08402 17.3258 5.63379 17.2891C5.17604 17.2517 4.77014 17.1722 4.39356 16.9805C3.79805 16.677 3.31321 16.1922 3.00977 15.5967C2.81796 15.2201 2.73859 14.8142 2.70117 14.3564C2.66439 13.9062 2.66504 13.3492 2.66504 12.6602V7.33008C2.66504 6.64101 2.66439 6.08402 2.70117 5.63379C2.73858 5.17601 2.81797 4.77016 3.00977 4.39356C3.31321 3.79802 3.79802 3.31321 4.39356 3.00977C4.77016 2.81797 5.17601 2.73858 5.63379 2.70117C6.08402 2.66439 6.64101 2.66504 7.33008 2.66504H12.6602ZM7.33008 3.99512C6.61907 3.99512 6.1257 3.99601 5.74219 4.02734C5.3665 4.05804 5.15508 4.11481 4.99707 4.19531C4.65183 4.37124 4.37124 4.65183 4.19531 4.99707C4.11481 5.15508 4.05805 5.3665 4.02734 5.74219C3.99601 6.1257 3.99512 6.61908 3.99512 7.33008V12.6602C3.99512 13.3711 3.99601 13.8646 4.02734 14.248C4.05805 14.6237 4.11481 14.8352 4.19531 14.9932C4.37124 15.3384 4.65186 15.619 4.99707 15.7949C5.15507 15.8754 5.36654 15.9322 5.74219 15.9629C6.1257 15.9942 6.61908 15.9951 7.33008 15.9951H12.6602C13.3711 15.9951 13.8646 15.9942 14.248 15.9629C14.6237 15.9322 14.8352 15.8754 14.9932 15.7949C15.3384 15.619 15.619 15.3384 15.7949 14.9932C15.8754 14.8352 15.9322 14.6237 15.9629 14.248C15.9942 13.8646 15.9951 13.3711 15.9951 12.6602V7.33008C15.9951 6.61908 15.9942 6.1257 15.9629 5.74219C15.9322 5.36654 15.8754 5.15507 15.7949 4.99707C15.619 4.65186 15.3384 4.37124 14.9932 4.19531C14.8352 4.11481 14.6237 4.05805 14.248 4.02734C13.8646 3.99601 13.3711 3.99512 12.6602 3.99512H7.33008Z"})]})}function be(){return a("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:a("path",{d:"M11.3312 4.20472C12.7488 2.92391 14.9377 2.96644 16.3039 4.33265L16.4318 4.46742C17.6713 5.8393 17.6713 7.93343 16.4318 9.30531L16.3039 9.44007L10.0119 15.7311C9.68839 16.0546 9.45384 16.2917 9.22185 16.4821L8.98748 16.6588C8.78233 16.799 8.56429 16.9196 8.33709 17.0192L8.10759 17.1119C7.92582 17.1785 7.73843 17.2266 7.52166 17.2711L6.75701 17.4069L4.36345 17.8053C4.22059 17.8291 4.06914 17.8552 3.9406 17.8649C3.84183 17.8723 3.70833 17.875 3.56267 17.8395L3.41423 17.7907C3.19121 17.695 3.00747 17.5271 2.89177 17.316L2.84588 17.2223C2.75958 17.0209 2.76174 16.8276 2.77166 16.6959C2.78136 16.5674 2.80742 16.4159 2.83123 16.2731L3.22966 13.8795L3.36443 13.1149C3.40899 12.898 3.45795 12.7108 3.52459 12.5289L3.61736 12.2985C3.71691 12.0715 3.83772 11.854 3.97771 11.6491L4.15349 11.4147C4.34392 11.1825 4.58171 10.9484 4.90545 10.6246L11.1965 4.33265L11.3312 4.20472ZM5.84588 11.5651C5.49671 11.9142 5.31258 12.0998 5.1867 12.2526L5.07537 12.3991C4.98194 12.5358 4.90157 12.6812 4.83513 12.8327L4.77361 12.9869C4.73328 13.0971 4.70248 13.2125 4.66814 13.3815L4.54119 14.0983L4.14275 16.4918L4.14177 16.4938H4.1447L6.53826 16.0944L7.25505 15.9684C7.42406 15.9341 7.53946 15.9033 7.64959 15.8629L7.80291 15.8014C7.95461 15.7349 8.09953 15.6538 8.2365 15.5602L8.38396 15.4498C8.53674 15.3239 8.72231 15.1398 9.07146 14.7907L14.0588 9.80238L10.8332 6.57679L5.84588 11.5651ZM15.3635 5.27308C14.5281 4.43776 13.2058 4.38573 12.3097 5.11683L12.1369 5.27308L11.7736 5.63636L15.0002 8.86195L15.3635 8.49964L15.5197 8.32581C16.2015 7.48961 16.2015 6.28311 15.5197 5.44691L15.3635 5.27308Z"})})}function Le(){return a("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:a("path",{d:"M16.8347 7.91699C16.8347 7.76279 16.8266 7.61021 16.8123 7.45996L15.4705 8.80371C14.2903 9.98388 12.3762 9.98388 11.1961 8.80371C10.016 7.62352 10.0159 5.70942 11.1961 4.5293L12.5378 3.18652C12.3885 3.17238 12.237 3.16505 12.0837 3.16504C9.45947 3.16504 7.33179 5.29272 7.33179 7.91699C7.33184 8.56608 7.46162 9.18329 7.69605 9.74512C7.79981 9.9939 7.74311 10.2811 7.5525 10.4717L3.59547 14.4287C3.0498 14.9744 3.04991 15.8586 3.59547 16.4043L3.70191 16.501C4.25076 16.9483 5.05957 16.9158 5.57105 16.4043L9.52906 12.4473L9.60426 12.3828C9.79018 12.2455 10.0369 12.2131 10.2546 12.3037C10.8166 12.5382 11.4345 12.668 12.0837 12.668C14.7078 12.6678 16.8345 10.541 16.8347 7.91699ZM18.1648 7.91699C18.1646 11.2755 15.4423 13.9979 12.0837 13.998C11.4151 13.998 10.7708 13.8886 10.1677 13.6885L6.51246 17.3457C5.51389 18.3443 3.93332 18.406 2.86207 17.5322L2.65504 17.3457C1.58992 16.2806 1.58992 14.5534 2.65504 13.4883L6.31031 9.83203C6.1104 9.22921 6.00175 8.58526 6.00172 7.91699C6.00172 4.55818 8.72494 1.83496 12.0837 1.83496C12.7838 1.835 13.458 1.95316 14.0857 2.17188L14.1638 2.20508C14.3404 2.29325 14.4697 2.45713 14.5144 2.65234C14.5653 2.87533 14.4984 3.10876 14.3367 3.27051L12.1375 5.4707C11.4767 6.13148 11.4767 7.20251 12.1375 7.86328C12.7983 8.52373 13.8694 8.52395 14.53 7.86328L16.7293 5.66309L16.7937 5.60742C16.9499 5.48687 17.1532 5.44067 17.3484 5.48535C17.5714 5.53648 17.7526 5.69898 17.8279 5.91504C18.0466 6.54272 18.1648 7.21689 18.1648 7.91699Z"})})}function ee({block:e}){if(e.type!=="tool_use")return null;let n=l(e).category;if(n==="read")return a(ve,{});if(n==="search"||n==="fetch")return a(he,{});if(n==="execute")return a(we,{});if(n==="edit")return a(be,{});return a(Le,{})}function E(e,n){let o=e.rawInput[n];return typeof o==="string"&&o.length>0?o:void 0}function Ne(e){return l(e).target}function q(e){return e.name.startsWith("mcp__")||e.name.startsWith("mcp_")}function te(e,n){let{category:o}=l(e),r=Ne(e),s=A(e.status);if(q(e))return{leading:e.title};if(o==="execute"){let d=E(e,"command")?.split(`
|
|
2
|
-
`)[0]??r;return d?{leading:n(s?"stream.codex.running":"stream.codex.ran"),trailing:d}:{leading:n(s?"stream.codex.runningCommand":"stream.codex.ranCommandGeneric")}}if(o==="search"){let d=E(e,"pattern")??E(e,"query")??r;return d?{leading:n(s?"stream.codex.searching":"stream.codex.searched"),trailing:n("stream.codex.forDetail",{detail:d})}:{leading:n(s?"stream.codex.searchingFiles":"stream.codex.searchedFiles")}}if(o==="fetch"){let d=E(e,"query")??E(e,"url")??r;return d?{leading:n(s?"stream.codex.searchingWeb":"stream.codex.searchedWeb"),trailing:n("stream.codex.forDetail",{detail:d})}:{leading:n(s?"stream.codex.searchingWeb":"stream.codex.searchedWeb")}}if(o==="read")return r?{leading:n("stream.codex.readLabel"),trailing:r}:{leading:n("stream.codex.readFiles")};if(o==="edit")return r?{leading:n(s?"stream.codex.editingLabel":"stream.codex.editedLabel"),trailing:r}:{leading:n(s?"stream.codex.editingFiles":"stream.codex.editedFiles")};if(o==="delete")return r?{leading:n(s?"stream.codex.deletingLabel":"stream.codex.deletedLabel"),trailing:r}:{leading:n(s?"stream.codex.deletingFiles":"stream.codex.deletedFiles")};if(o==="move")return r?{leading:n(s?"stream.codex.movingLabel":"stream.codex.movedLabel"),trailing:r}:{leading:n(s?"stream.codex.movingFiles":"stream.codex.movedFiles")};return{leading:e.title}}function Te(e,n){let o=te(e,n);return o.trailing===void 0?o.leading:`${o.leading} ${o.trailing}`}function $e(e){return e.map((n)=>{if(n.type!=="content")return"";let o=n.content;return o.type==="text"?o.text:""}).filter(Boolean).join(`
|
|
3
|
-
`).trim()}function ke(e){return e.flatMap((n)=>{if(n.type!=="content")return[];let o=n.content;return o.type==="image"?[{data:o.data,mimeType:o.mimeType}]:[]})}function Ae(e){return e.flatMap((n)=>{if(n.type!=="content")return[];let o=n.content;return o.type==="audio"?[{data:o.data,mimeType:o.mimeType}]:[]})}function Be(e){if(typeof e==="string"&&e.length>0)return e;return}function Me(e){return e.type==="diff"}function Ie(e){let n=e.content.find(Me);if(n===void 0)return;return n.changes.map((o)=>`${o.operation} ${o.path}`).join(`
|
|
4
|
-
`)}function ne(e){let n=Be(e.rawOutput);if(n!==void 0)return n;let o=$e(e.content);if(o.length>0)return o;return Ie(e)}function Ee({block:e,command:n}){let{t:o,Output:r,commandStatus:s}=t(),[d,m]=D(!1),[g,f]=D(!1),x=ne(e),c=s===void 0?e.exitCode===void 0?void 0:o("stream.codex.exitCode",{code:e.exitCode}):s(e),C=()=>{navigator.clipboard.writeText([`$ ${n}`,x].filter((w)=>w!==void 0).join(`
|
|
5
|
-
`)),m(!0),setTimeout(()=>m(!1),1500)};return a("div",{className:"codex-command-details",children:y("div",{className:"codex-command-card",children:[y("div",{className:"codex-command-line-row",children:[a("span",{className:"codex-command-prompt","aria-hidden":"true",children:"$"}),a("button",{type:"button",className:b("codex-command-line",!g&&"codex-command-line-clamped"),"data-codex-disclosure":"","aria-expanded":g,onClick:()=>f((w)=>!w),children:n}),a("button",{type:"button",className:"codex-command-copy","aria-label":o("actions.copy"),onClick:C,children:d?a(fe,{}):a(Ce,{})})]}),x!==void 0&&(r===void 0?a("pre",{className:"codex-command-output",children:x}):a(r,{text:x})),c!==void 0&&a("div",{className:"codex-command-footer",children:a("span",{className:"codex-command-status",children:c})})]})})}function ae({block:e}){let{t:n,openLink:o,Patch:r,openImage:s,commandStatus:d,expandToolOutput:m=!1}=t(),g=ne(e),f=r===void 0?void 0:e.content.flatMap((v)=>{if(v.type!=="diff")return[];let I=v;return I.patch?.text?[I.patch.text]:[]}).join(`
|
|
6
|
-
`),x=ke(e.content),c=Ae(e.content),[C,w]=i(`tool:${e.id}`,!1),M=G(`tool:${e.id}`,C),L=l(e),N=L.category,h=te(e,n),R=N==="execute"?E(e,"command"):void 0,B=R!==void 0||q(e)||x.length>0||c.length>0||Boolean(f)||m&&g!==void 0,_=!B&&!A(e.status)?L.filePath:void 0;if(N==="execute"&&!A(e.status)&&e.status!=="completed"){let v=d?.(e);if(v)h={...h,leading:v}}if(N==="read"&&A(e.status))return null;let F=y("span",{className:"codex-activity-label",children:[a(ee,{block:e}),a("span",{className:"min-w-0 flex-1 truncate",children:A(e.status)?a("span",{className:"codex-activity-running",children:h.trailing===void 0?h.leading:`${h.leading} ${h.trailing}`}):y(O,{children:[a("span",{className:"codex-activity-leading",children:h.leading}),h.trailing!==void 0&&(_!==void 0?y(O,{children:[" ",a("button",{type:"button",className:"codex-activity-trailing codex-activity-file-link",title:_,onClick:()=>o(_),children:h.trailing})]}):y("span",{className:"codex-activity-trailing",children:[" ",h.trailing]}))]})})]});return y("div",{className:"codex-activity-item",children:[B?y("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-label":h.trailing===void 0?h.leading:`${h.leading} ${h.trailing}`,"aria-expanded":C,onClick:()=>w((v)=>!v),children:[F,a(S,{expanded:C})]}):a("div",{className:"codex-activity-header codex-activity-header-static",children:F}),a("div",{className:b("codex-activity-details-grid",C&&"codex-activity-details-grid-open"),children:a("div",{className:"min-h-0 overflow-hidden",children:M&&y(O,{children:[R!==void 0?a(Ee,{block:e,command:R}):r!==void 0&&f?a(r,{patch:f}):g!==void 0&&a("pre",{className:"codex-activity-details",children:g}),x.length>0&&a("div",{className:"codex-activity-media",children:x.map((v)=>{let I=`data:${v.mimeType};base64,${v.data}`,z=a("img",{src:I,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},`${v.mimeType}:${v.data.slice(0,32)}`);return s===void 0?z:a("button",{type:"button",className:"cursor-pointer",onClick:()=>s(I),children:z},I)})}),c.map((v)=>a("audio",{className:"mt-1 w-full","aria-label":n("stream.codex.audioOutput"),controls:!0,src:`data:${v.mimeType};base64,${v.data}`},`${v.mimeType}:${v.data.slice(0,32)}`))]})})})]})}function oe({block:e}){if(e.type==="tool_use")return a(ae,{block:e});if(e.type==="thinking")return a(me,{block:e});if(e.type==="collab")return a(ue,{block:e});return a(ie,{block:e})}function ie({block:e}){let{t:n,openSession:o}=t(),r=A(e.status),[s,d]=i(`subagent:${e.id}`,r),m=Z(r);U(()=>{if(r)d(!0);if(m.current&&!r)d(!1);m.current=r},[r,d]);let g=`${Fe(e.activity,r,e.name,n)}${re(e.model,e.reasoningEffort,n)}`,f=e.threadId??"",x=e.blocks.length>0;return y("div",{className:"codex-activity-item",children:[y("button",{type:"button",className:b("codex-activity-header",!x&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":x?s:void 0,disabled:!x,onClick:()=>d((c)=>!c),children:[y("span",{className:"codex-activity-label",children:[a(_e,{seed:e.threadId??e.id}),a("span",{className:"min-w-0 flex-1 truncate",children:o===void 0||e.threadId===null?r?a("span",{className:"codex-activity-running",children:g}):g:a("span",{role:"link",tabIndex:0,className:b("codex-agent-link",r&&"codex-activity-running"),"aria-label":n("stream.codex.subagentOpen",{name:e.name}),onClick:(c)=>{c.stopPropagation(),o(f,e.name)},onKeyDown:(c)=>{if(c.key!=="Enter"&&c.key!==" ")return;c.preventDefault(),c.stopPropagation(),o(f,e.name)},children:g})})]}),x&&a(S,{expanded:s})]}),a("div",{className:b("codex-activity-details-grid",s&&"codex-activity-details-grid-open"),children:a("div",{className:"min-h-0 overflow-hidden",children:a("div",{className:"codex-subagent-details",children:e.blocks.map((c)=>{if(c.type==="tool_use")return a(ae,{block:c},c.id);if(c.type==="thinking")return a(me,{block:c},T(c));if(c.type==="subagent")return a(ie,{block:c},c.id);if(c.type==="collab")return a(ue,{block:c},c.id);if(c.type==="text")return a("div",{className:"codex-reasoning-details",children:a(u,{text:c.text,streaming:!1})},T(c));if(c.type==="plan")return a(k,{entries:c.entries},T(c));if(c.type==="image")return a("img",{src:`data:${c.source.media_type};base64,${c.source.data}`,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},T(c));return null})})})})]})}var Se=8;function Re(e){let n=0;for(let o=0;o<e.length;o+=1)n=(n*31+e.charCodeAt(o))%2147483647;return n%Se}function _e({seed:e}){return a("span",{className:"codex-agent-avatar","data-hue":Re(e),"aria-hidden":"true"})}function Fe(e,n,o,r){switch(e){case"started":return r(n?"stream.codex.subagentWorking":"stream.codex.subagentFinished",{name:o});case"interacted":return r("stream.codex.subagentMessaged",{name:o});case"interrupted":return r("stream.codex.subagentInterrupted",{name:o});case"completed":return r("stream.codex.subagentFinished",{name:o})}}var De=new Set(["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]);function re(e,n,o){if(e===null)return"";if(n===null)return` · ${j(e)}`;let r=De.has(n)?o(`stream.codex.reasoningEffort.${n}`):n;return` · ${j(e)} · ${r}`}var Pe={spawnAgent:"spawn",sendInput:"message",sendMessage:"message",followupTask:"message",interruptAgent:"interrupt",listAgents:"list",resumeAgent:"resume",closeAgent:"close"};function se(e){switch(e){case"pending":case"in_progress":return"inProgress";case"completed":return"completed";case"failed":return"failed";case"cancelled":case"interrupted":return"interrupted";default:throw Error(`Unknown ACP tool status: ${e}`)}}function W(e,n,o){if(e.tool==="wait")throw Error("Codex does not present wait calls");let r=se(e.status);if(r==="interrupted")return o("stream.codex.collab.interrupted");return o(`stream.codex.collab.${n}.${Pe[e.tool]}.${r}`)}function Ve(e){return e.agents.filter((n)=>n.nickname!==null)}function le(e,n){let o=e.agents.length>0?e.agents.length:1;return`${W(e,"header",n)}${n("stream.codex.collab.agentCount",{count:o})}`}var P="\x01";function V(e,n,o,r){let s=Object.fromEntries(Object.keys(r).map((d)=>[d,`${P}${d}${P}`]));return e(n,{...o,...s}).split(new RegExp(`${P}(\\w+)${P}`,"u")).map((d,m)=>a(xe,{children:m%2===1?r[d]:d},`${m}:${d}`))}function Oe({agent:e,showModel:n}){let{t:o,openSession:r}=t(),s=e.nickname??"",d=r===void 0?a("span",{className:"font-medium",children:s}):a("button",{type:"button",className:"codex-agent-link font-medium","aria-label":o("stream.codex.subagentOpen",{name:s}),onClick:()=>r(e.threadId,s),children:s});return y("span",{children:[d,e.role!==null&&` (${e.role})`,n&&re(e.model,e.reasoningEffort,o)]})}function Q({prompt:e}){return a("span",{className:"codex-collab-prompt",title:e,children:e})}function Ue(e,n){let o=e.prompt?.trim()?e.prompt:null,r=se(e.status),s=e.tool==="spawnAgent"&&r==="completed"&&o!==null,d=(e.tool==="sendInput"||e.tool==="sendMessage"||e.tool==="followupTask")&&o!==null,m=Ve(e),g=[];if(m.length===0)g.push({key:"generic",node:W(e,"row",n)});for(let f of m){let x=a(Oe,{agent:f,showModel:e.tool==="spawnAgent"});if(s)g.push({key:f.threadId,node:a("span",{className:"codex-collab-line",children:V(n,"stream.codex.collab.createdWithInstructions",{},{agent:x,instructions:a(Q,{prompt:o})})})});else if(d)g.push({key:f.threadId,node:a("span",{className:"codex-collab-line",children:V(n,"stream.codex.collab.messagedWithPrompt",{action:r==="interrupted"?n("stream.codex.collab.interrupted"):n(`stream.codex.collab.messaged.${r}`)},{agent:x,prompt:a(Q,{prompt:o})})})});else{let C=e.tool!=="closeAgent"&&e.tool!=="resumeAgent"&&f.state!==null&&f.state!==null?f.state.message?.trim()?n("stream.codex.collab.stateWithMessage",{state:n(`stream.codex.collab.state.${f.state.status}`),message:f.state.message}):n("stream.codex.collab.stateOnly",{state:n(`stream.codex.collab.state.${f.state.status}`)}):"";g.push({key:f.threadId,node:V(n,"stream.codex.collab.agentRow",{action:W(e,"row",n),state:C},{agent:x})})}}if(!s&&!d&&o!==null)g.push({key:"input",node:V(n,"stream.codex.collab.input",{},{prompt:a("span",{className:"codex-collab-input",children:o})})});return g}function ue({block:e}){let{t:n}=t(),[o,r]=i(`collab:${e.id}`,!1);if(e.tool==="wait")return null;let s=A(e.status),d=le(e,n);return y("div",{className:"codex-activity-item",children:[y("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":o,onClick:()=>r((m)=>!m),children:[y("span",{className:"codex-activity-label",children:[a(ge,{className:"size-4 shrink-0","aria-hidden":"true"}),a("span",{className:"min-w-0 flex-1 truncate",children:s?a("span",{className:"codex-activity-running",children:d}):d})]}),a(S,{expanded:o})]}),a("div",{className:b("codex-activity-details-grid",o&&"codex-activity-details-grid-open"),children:a("div",{className:"min-h-0 overflow-hidden",children:a("div",{className:"codex-subagent-details",children:Ue(e,n).map((m)=>a("div",{className:"codex-collab-row",children:m.node},m.key))})})})]})}function me({block:e}){let{t:n,i18n:o}=t(),r=Boolean(e.isComplete),[s,d]=i(`thinking:${T(e)}`,!1),m=Z(null),g=e.thinking.trim().length>0;U(()=>{if(r||!g)return;let c=m.current;if(c===null)throw Error("Thinking details are not mounted");let C=new ResizeObserver(()=>{c.scrollTop=c.scrollHeight}),w=null,M=()=>{let N=c.firstElementChild;if(N===w)return;if(w!==null)C.unobserve(w);if(w=N,w!==null)C.observe(w)},L=new MutationObserver(M);return L.observe(c,{childList:!0}),M(),()=>{L.disconnect(),C.disconnect()}},[g,r]);let f=r?e.durationMs!==void 0?n("stream.codex.thoughtFor",{duration:H(e.durationMs,o.language)}):n("stream.codex.thought"):n("message.thinking"),x=e.thinking.trimStart().replace(/^\*\*[^\n]*?\*\*\s*/,"");return y("div",{className:"codex-activity-item",children:[y("button",{type:"button",className:b("codex-activity-header",!g&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":g?s:void 0,disabled:!g,onClick:()=>d((c)=>!c),children:[a("span",{className:"codex-activity-label",children:a("span",{className:"codex-reasoning-label min-w-0 flex-1 truncate",children:r?f:a("span",{className:"codex-activity-running",children:f})})}),g&&a(S,{expanded:s})]}),a("div",{className:b("codex-activity-details-grid",s&&"codex-activity-details-grid-open"),children:a("div",{className:"min-h-0 overflow-hidden",children:g&&a("div",{ref:m,className:"codex-reasoning-details",role:"region","aria-label":f,"aria-hidden":!s,tabIndex:0,inert:!s,children:a(u,{text:x,streaming:!r})})})})]})}function Ze(e){if(q(e))return"mcp";let n=l(e).category;return n==="think"||n==="switch_mode"?"other":n}function He(e,n,o,r){return r(`stream.codex.summary.${e}.${o?"leading":"following"}`,{count:n})}function We(e,n,o){let r=new Map;for(let d of e){let m=Ze(d);r.set(m,(r.get(m)??0)+1)}let s=Array.from(r,([d,m],g)=>He(d,m,g===0,n));if(o.startsWith("zh"))return s.join("");return new Intl.ListFormat(o,{style:"long",type:"conjunction"}).format(s)}function de({stateKey:e,durationMs:n,durationKind:o="work",active:r,defaultExpanded:s=r,startedAt:d,providerId:m,providerIcon:g,children:f}){let{t:x,i18n:c}=t(),[C,w]=i(`work:${e}`,s,!0),M=G(`work:${e}`,C||r),L=Z(null),[N,h]=D(0);U(()=>{if(!r||n!==void 0){L.current=null;return}L.current=d??Date.now();let B=()=>{let F=L.current;if(F===null)throw Error("Codex work section is ticking without a start time");h(Date.now()-F)};B();let _=window.setInterval(B,1000);return()=>window.clearInterval(_)},[r,d,n]);let R=n!==void 0?x(o==="total"?"stream.codex.totalDuration":"stream.codex.workedFor",{duration:H(n,c.language)}):r&&N>=1000?x("stream.codex.workingFor",{duration:H(N,c.language)}):x(r?"stream.codex.working":"stream.codex.worked");return y("section",{className:"codex-work-section",children:[y("button",{type:"button",className:"codex-work-trigger","data-codex-disclosure":"","aria-expanded":C,onClick:()=>w((B)=>!B),children:[m!==void 0&&a("span",{className:"codex-work-provider-icon","data-testid":"codex-work-provider-icon","data-provider-id":m,"aria-hidden":"true",children:g}),a("span",{children:R}),a(S,{expanded:C,className:"codex-work-chevron"})]}),a("div",{className:"codex-work-separator","aria-hidden":"true"}),a("div",{className:b("codex-work-grid",C&&"codex-work-grid-open"),"aria-hidden":!C,inert:!C,children:a("div",{className:"min-h-0 overflow-hidden",children:a("div",{className:"codex-work-body",children:M&&f})})})]})}function je(e,n){if(e.type==="tool_use")return Te(e,n);if(e.type==="thinking")return n("message.thinking");if(e.type==="collab")return le(e,n);return n("stream.codex.subagentWorking",{name:e.name})}function X(e){if(e.type==="thinking")return!e.isComplete;if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return A(e.status);return!1}function Ge(e,n,o=1000){let[r,s]=D({text:e,live:n}),d=Z(Date.now());return U(()=>{if(e===r.text&&n===r.live)return;let m=Date.now(),g=Math.max(0,d.current+o-m);if(g===0||n!==r.live){d.current=m,s({text:e,live:n});return}let f=window.setTimeout(()=>{d.current=Date.now(),s({text:e,live:n})},g);return()=>window.clearTimeout(f)},[r,n,o,e]),n===r.live?r.text:e}function qe({blocks:e}){let{t:n,i18n:o}=t(),r=e.some(X),s=T(e[0]),[d,m]=i(`group:${s}`,!0),g=G(`group:${s}`,d||r),f=e.findLast(X)??e.at(-1);if(f===void 0)throw Error("CodexActivityGroup requires at least one activity block");let x=e.filter((C)=>C.type==="tool_use"),c=Ge(r?je(f,n):We(x,n,o.language),r);return y("div",{className:"codex-activity-group",children:[y("button",{type:"button",className:"codex-activity-group-trigger","aria-expanded":d,onClick:()=>m((C)=>!C),children:[y("span",{className:"codex-activity-label",children:[a(ee,{block:e[0]}),a("span",{className:"truncate",children:r?a("span",{className:"codex-activity-running",children:c}):c})]}),a(S,{expanded:d})]}),a("div",{className:b("codex-activity-group-grid",d&&"codex-activity-group-grid-open"),children:a("div",{className:"min-h-0 overflow-hidden",children:a("div",{className:"codex-activity-group-body",children:g&&e.map((C)=>a(oe,{block:C},T(C)))})})})]})}function Y({blocks:e}){if(e.length===0)throw Error("CodexActivityGroup requires at least one activity block");if(e.length===1)return a(oe,{block:e[0]});return a(qe,{blocks:e})}function ce({blocks:e}){if(!e.some(p))return a(Y,{blocks:e});let n=[];for(let o of e){let r=n.at(-1);if(r&&p(r[0])===p(o))r.push(o);else n.push([o])}return a(O,{children:n.map((o)=>p(o[0])?a(pe,{blocks:o.filter(p)},T(o[0])):a(Y,{blocks:o},T(o[0])))})}
|
|
7
|
-
export{de,ce};
|
package/dist/chunk-sptvg9xh.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createContext as r,useContext as s}from"react";import{jsx as i}from"react/jsx-runtime";var n=r(null);function It({host:o,children:e}){return i(n.Provider,{value:o,children:e})}function t(){let o=s(n);if(o===null)throw Error("Activity host is missing");return o}function u(o){let{Markdown:e}=t();return i(e,{...o})}
|
|
2
|
-
export{It,t,u};
|