@justanarthur/modo-ui-ai 0.0.0-stage → 0.3.0
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/LICENSE +21 -0
- package/LICENSE.fluid-functionalism +21 -0
- package/README.md +105 -2
- package/blocks/conversation/agent-prompt/examples.mdx +44 -0
- package/blocks/conversation/agent-prompt/index.tsx +114 -0
- package/blocks/conversation/composer/draft.css +25 -0
- package/blocks/conversation/composer/draft.tsx +589 -0
- package/blocks/conversation/composer/examples.mdx +164 -0
- package/blocks/conversation/composer/file-preview-tile.tsx +59 -0
- package/blocks/conversation/composer/file-thumbnail.tsx +146 -0
- package/blocks/conversation/composer/index.tsx +651 -0
- package/blocks/conversation/composer/queued-row.tsx +102 -0
- package/blocks/conversation/composer/shared.ts +38 -0
- package/blocks/conversation/composer/suggestion-row.tsx +64 -0
- package/blocks/conversation/composer/use-composer-files.ts +142 -0
- package/blocks/conversation/composer/use-history-nav.ts +60 -0
- package/blocks/conversation/composer/use-message-queue.ts +108 -0
- package/blocks/conversation/composer/use-region-height.ts +34 -0
- package/blocks/conversation/failure-states/examples.mdx +58 -0
- package/blocks/conversation/failure-states/index.tsx +274 -0
- package/blocks/conversation/transcript/examples.mdx +43 -0
- package/blocks/conversation/transcript/index.tsx +206 -0
- package/blocks/conversation/transcript-search/examples.mdx +50 -0
- package/blocks/conversation/transcript-search/index.tsx +469 -0
- package/blocks/dialogs/command-palette/examples.mdx +50 -0
- package/blocks/dialogs/command-palette/index.tsx +239 -0
- package/blocks/dialogs/hook-dialog/examples.mdx +44 -0
- package/blocks/dialogs/hook-dialog/index.tsx +286 -0
- package/blocks/dialogs/mcp-server-dialog/examples.mdx +57 -0
- package/blocks/dialogs/mcp-server-dialog/index.tsx +415 -0
- package/blocks/dialogs/shortcuts-sheet/examples.mdx +36 -0
- package/blocks/dialogs/shortcuts-sheet/index.tsx +186 -0
- package/blocks/panes/artifacts-pane/examples.mdx +23 -0
- package/blocks/panes/artifacts-pane/index.tsx +82 -0
- package/blocks/panes/changes-pane/examples.mdx +23 -0
- package/blocks/panes/changes-pane/index.tsx +248 -0
- package/blocks/panes/file-pane/examples.mdx +13 -0
- package/blocks/panes/file-pane/index.tsx +102 -0
- package/blocks/panes/pr-pane/examples.mdx +13 -0
- package/blocks/panes/pr-pane/index.tsx +191 -0
- package/blocks/panes/side-pane/examples.mdx +58 -0
- package/blocks/panes/side-pane/index.tsx +187 -0
- package/blocks/panes/tasks-pane/examples.mdx +23 -0
- package/blocks/panes/tasks-pane/index.tsx +127 -0
- package/blocks/panes/terminal-pane/examples.mdx +13 -0
- package/blocks/panes/terminal-pane/index.tsx +99 -0
- package/blocks/panes/usage-pane/examples.mdx +23 -0
- package/blocks/panes/usage-pane/index.tsx +78 -0
- package/blocks/profiles/profile-onboarding/examples.mdx +80 -0
- package/blocks/profiles/profile-onboarding/index.tsx +580 -0
- package/blocks/profiles/profile-switcher/examples.mdx +29 -0
- package/blocks/profiles/profile-switcher/index.tsx +212 -0
- package/blocks/profiles/profile-usage/examples.mdx +41 -0
- package/blocks/profiles/profile-usage/index.tsx +141 -0
- package/blocks/sessions/inbox/examples.mdx +35 -0
- package/blocks/sessions/inbox/index.tsx +372 -0
- package/blocks/sessions/session-board/examples.mdx +34 -0
- package/blocks/sessions/session-board/index.tsx +570 -0
- package/blocks/sessions/session-sidebar/examples.mdx +93 -0
- package/blocks/sessions/session-sidebar/index.tsx +497 -0
- package/blocks/settings/extensions/examples.mdx +10 -0
- package/blocks/settings/extensions/index.tsx +72 -0
- package/blocks/settings/hooks/examples.mdx +16 -0
- package/blocks/settings/hooks/index.tsx +127 -0
- package/blocks/settings/mcp-servers/examples.mdx +26 -0
- package/blocks/settings/mcp-servers/index.tsx +204 -0
- package/blocks/settings/memory/examples.mdx +22 -0
- package/blocks/settings/memory/index.tsx +113 -0
- package/blocks/settings/notifications/examples.mdx +8 -0
- package/blocks/settings/notifications/index.tsx +63 -0
- package/blocks/settings/permission-rules/examples.mdx +37 -0
- package/blocks/settings/permission-rules/index.tsx +317 -0
- package/blocks/settings/plugin-catalog/examples.mdx +52 -0
- package/blocks/settings/plugin-catalog/index.tsx +407 -0
- package/blocks/settings/plugins/examples.mdx +10 -0
- package/blocks/settings/plugins/index.tsx +72 -0
- package/blocks/settings/settings-window/examples.mdx +40 -0
- package/blocks/settings/settings-window/index.tsx +188 -0
- package/blocks/settings/worktrees/examples.mdx +17 -0
- package/blocks/settings/worktrees/index.tsx +145 -0
- package/components/conversation/agent-run/examples.mdx +38 -0
- package/components/conversation/agent-run/index.tsx +83 -0
- package/components/conversation/chapter-nav/examples.mdx +30 -0
- package/components/conversation/chapter-nav/index.tsx +123 -0
- package/components/conversation/message/examples.mdx +53 -0
- package/components/conversation/message/index.tsx +130 -0
- package/components/conversation/message/working.tsx +102 -0
- package/components/conversation/reasoning/examples.mdx +32 -0
- package/components/conversation/reasoning/index.tsx +55 -0
- package/components/conversation/recap/examples.mdx +21 -0
- package/components/conversation/recap/index.tsx +67 -0
- package/components/conversation/todo-list/examples.mdx +32 -0
- package/components/conversation/todo-list/index.tsx +106 -0
- package/components/conversation/tool-call/examples.mdx +48 -0
- package/components/conversation/tool-call/index.tsx +142 -0
- package/components/conversation/work-summary/examples.mdx +50 -0
- package/components/conversation/work-summary/index.tsx +87 -0
- package/components/prompts/permission-request/examples.mdx +32 -0
- package/components/prompts/permission-request/index.tsx +74 -0
- package/components/prompts/plan-approval/examples.mdx +37 -0
- package/components/prompts/plan-approval/index.tsx +76 -0
- package/components/prompts/prompt-card/examples.mdx +31 -0
- package/components/prompts/prompt-card/index.tsx +82 -0
- package/components/prompts/question-prompt/examples.mdx +46 -0
- package/components/prompts/question-prompt/index.tsx +118 -0
- package/dist/blocks/conversation/agent-prompt/index.d.ts +7 -0
- package/dist/blocks/conversation/agent-prompt/index.js +13 -0
- package/dist/blocks/conversation/composer/index.d.ts +4 -0
- package/dist/blocks/conversation/composer/index.js +16 -0
- package/dist/blocks/conversation/failure-states/index.d.ts +4 -0
- package/dist/blocks/conversation/failure-states/index.js +8 -0
- package/dist/blocks/conversation/transcript/index.d.ts +50 -0
- package/dist/blocks/conversation/transcript/index.js +17 -0
- package/dist/blocks/conversation/transcript-search/index.d.ts +4 -0
- package/dist/blocks/conversation/transcript-search/index.js +11 -0
- package/dist/blocks/dialogs/command-palette/index.d.ts +5 -0
- package/dist/blocks/dialogs/command-palette/index.js +20 -0
- package/dist/blocks/dialogs/hook-dialog/index.d.ts +3 -0
- package/dist/blocks/dialogs/hook-dialog/index.js +12 -0
- package/dist/blocks/dialogs/mcp-server-dialog/index.d.ts +5 -0
- package/dist/blocks/dialogs/mcp-server-dialog/index.js +12 -0
- package/dist/blocks/dialogs/shortcuts-sheet/index.d.ts +2 -0
- package/dist/blocks/dialogs/shortcuts-sheet/index.js +11 -0
- package/dist/blocks/panes/artifacts-pane/index.d.ts +3 -0
- package/dist/blocks/panes/artifacts-pane/index.js +9 -0
- package/dist/blocks/panes/changes-pane/index.d.ts +3 -0
- package/dist/blocks/panes/changes-pane/index.js +9 -0
- package/dist/blocks/panes/file-pane/index.d.ts +3 -0
- package/dist/blocks/panes/file-pane/index.js +9 -0
- package/dist/blocks/panes/pr-pane/index.d.ts +3 -0
- package/dist/blocks/panes/pr-pane/index.js +10 -0
- package/dist/blocks/panes/side-pane/index.d.ts +5 -0
- package/dist/blocks/panes/side-pane/index.js +21 -0
- package/dist/blocks/panes/tasks-pane/index.d.ts +3 -0
- package/dist/blocks/panes/tasks-pane/index.js +10 -0
- package/dist/blocks/panes/terminal-pane/index.d.ts +3 -0
- package/dist/blocks/panes/terminal-pane/index.js +9 -0
- package/dist/blocks/panes/usage-pane/index.d.ts +4 -0
- package/dist/blocks/panes/usage-pane/index.js +11 -0
- package/dist/blocks/profiles/profile-onboarding/index.d.ts +4 -0
- package/dist/blocks/profiles/profile-onboarding/index.js +11 -0
- package/dist/blocks/profiles/profile-switcher/index.d.ts +4 -0
- package/dist/blocks/profiles/profile-switcher/index.js +12 -0
- package/dist/blocks/profiles/profile-usage/index.d.ts +4 -0
- package/dist/blocks/profiles/profile-usage/index.js +10 -0
- package/dist/blocks/sessions/inbox/index.d.ts +2 -0
- package/dist/blocks/sessions/inbox/index.js +11 -0
- package/dist/blocks/sessions/session-board/index.d.ts +4 -0
- package/dist/blocks/sessions/session-board/index.js +27 -0
- package/dist/blocks/sessions/session-sidebar/index.d.ts +5 -0
- package/dist/blocks/sessions/session-sidebar/index.js +15 -0
- package/dist/blocks/settings/extensions/index.d.ts +2 -0
- package/dist/blocks/settings/extensions/index.js +9 -0
- package/dist/blocks/settings/hooks/index.d.ts +4 -0
- package/dist/blocks/settings/hooks/index.js +9 -0
- package/dist/blocks/settings/mcp-servers/index.d.ts +4 -0
- package/dist/blocks/settings/mcp-servers/index.js +9 -0
- package/dist/blocks/settings/memory/index.d.ts +4 -0
- package/dist/blocks/settings/memory/index.js +8 -0
- package/dist/blocks/settings/notifications/index.d.ts +2 -0
- package/dist/blocks/settings/notifications/index.js +8 -0
- package/dist/blocks/settings/permission-rules/index.d.ts +3 -0
- package/dist/blocks/settings/permission-rules/index.js +10 -0
- package/dist/blocks/settings/plugin-catalog/index.d.ts +2 -0
- package/dist/blocks/settings/plugin-catalog/index.js +11 -0
- package/dist/blocks/settings/plugins/index.d.ts +4 -0
- package/dist/blocks/settings/plugins/index.js +9 -0
- package/dist/blocks/settings/settings-window/index.d.ts +4 -0
- package/dist/blocks/settings/settings-window/index.js +8 -0
- package/dist/blocks/settings/worktrees/index.d.ts +4 -0
- package/dist/blocks/settings/worktrees/index.js +9 -0
- package/dist/components/conversation/agent-run/index.d.ts +3 -0
- package/dist/components/conversation/agent-run/index.js +10 -0
- package/dist/components/conversation/chapter-nav/index.d.ts +2 -0
- package/dist/components/conversation/chapter-nav/index.js +11 -0
- package/dist/components/conversation/message/index.d.ts +2 -0
- package/dist/components/conversation/message/index.js +15 -0
- package/dist/components/conversation/reasoning/index.d.ts +2 -0
- package/dist/components/conversation/reasoning/index.js +8 -0
- package/dist/components/conversation/recap/index.d.ts +2 -0
- package/dist/components/conversation/recap/index.js +9 -0
- package/dist/components/conversation/todo-list/index.d.ts +2 -0
- package/dist/components/conversation/todo-list/index.js +9 -0
- package/dist/components/conversation/tool-call/index.d.ts +3 -0
- package/dist/components/conversation/tool-call/index.js +13 -0
- package/dist/components/conversation/work-summary/index.d.ts +2 -0
- package/dist/components/conversation/work-summary/index.js +10 -0
- package/dist/components/prompts/permission-request/index.d.ts +2 -0
- package/dist/components/prompts/permission-request/index.js +9 -0
- package/dist/components/prompts/plan-approval/index.d.ts +2 -0
- package/dist/components/prompts/plan-approval/index.js +9 -0
- package/dist/components/prompts/prompt-card/index.d.ts +3 -0
- package/dist/components/prompts/prompt-card/index.js +8 -0
- package/dist/components/prompts/question-prompt/index.d.ts +2 -0
- package/dist/components/prompts/question-prompt/index.js +9 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +231 -0
- package/dist/lib/config-parts.d.ts +2 -0
- package/dist/lib/config-parts.js +16 -0
- package/dist/lib/icons.d.ts +2 -0
- package/dist/lib/icons.js +10 -0
- package/dist/lib/pace-bar.d.ts +11 -0
- package/dist/lib/pace-bar.js +6 -0
- package/dist/lib/pace.d.ts +4 -0
- package/dist/lib/pace.js +14 -0
- package/dist/lib/pane-parts.d.ts +25 -0
- package/dist/lib/pane-parts.js +11 -0
- package/dist/lib/row-trigger.d.ts +5 -0
- package/dist/lib/row-trigger.js +7 -0
- package/dist/lib/settings-parts.d.ts +70 -0
- package/dist/lib/settings-parts.js +24 -0
- package/dist/lib/side-pane-types.d.ts +2 -0
- package/dist/lib/side-pane-types.js +1 -0
- package/dist/lib/status-glyph.d.ts +8 -0
- package/dist/lib/status-glyph.js +12 -0
- package/dist/lib/types.d.ts +3 -0
- package/dist/lib/types.js +1 -0
- package/dist/shared/chunk-04a497rr.js +21 -0
- package/dist/shared/chunk-13yf0mza.d.ts +70 -0
- package/dist/shared/chunk-1hzrm8r5.d.ts +51 -0
- package/dist/shared/chunk-1qdwg7w5.d.ts +81 -0
- package/dist/shared/chunk-1yt061np.d.ts +64 -0
- package/dist/shared/chunk-218qabm5.js +250 -0
- package/dist/shared/chunk-2fk5aq60.js +313 -0
- package/dist/shared/chunk-3ps5h55t.d.ts +30 -0
- package/dist/shared/chunk-3yaftgh0.d.ts +28 -0
- package/dist/shared/chunk-4zvhpf2x.js +55 -0
- package/dist/shared/chunk-57hzzmjd.d.ts +67 -0
- package/dist/shared/chunk-58jh3mje.js +46 -0
- package/dist/shared/chunk-58qvny6a.d.ts +29 -0
- package/dist/shared/chunk-5fhkkn39.js +130 -0
- package/dist/shared/chunk-5hw0525a.d.ts +33 -0
- package/dist/shared/chunk-5meda998.js +238 -0
- package/dist/shared/chunk-5pqksw7z.js +91 -0
- package/dist/shared/chunk-6220dy5n.js +70 -0
- package/dist/shared/chunk-64bnh22t.d.ts +59 -0
- package/dist/shared/chunk-66sh633m.d.ts +60 -0
- package/dist/shared/chunk-6cmf27g3.d.ts +81 -0
- package/dist/shared/chunk-6kwk9vag.js +558 -0
- package/dist/shared/chunk-6rdwkymk.js +177 -0
- package/dist/shared/chunk-71j8qzvb.d.ts +57 -0
- package/dist/shared/chunk-74bvf3tw.d.ts +21 -0
- package/dist/shared/chunk-75zwypyr.d.ts +43 -0
- package/dist/shared/chunk-7mfer3tp.js +176 -0
- package/dist/shared/chunk-7rzjmcnh.d.ts +30 -0
- package/dist/shared/chunk-7zvb39cf.d.ts +26 -0
- package/dist/shared/chunk-8mecznyr.js +357 -0
- package/dist/shared/chunk-8pag6vmd.js +255 -0
- package/dist/shared/chunk-94grzz9f.js +187 -0
- package/dist/shared/chunk-9kw6m047.d.ts +32 -0
- package/dist/shared/chunk-at0jje23.d.ts +110 -0
- package/dist/shared/chunk-awd573h9.js +34 -0
- package/dist/shared/chunk-b171wjge.d.ts +25 -0
- package/dist/shared/chunk-b4dz15em.d.ts +36 -0
- package/dist/shared/chunk-b5ccp5de.js +35 -0
- package/dist/shared/chunk-bh2b5d1z.js +98 -0
- package/dist/shared/chunk-c36qvrwq.d.ts +30 -0
- package/dist/shared/chunk-c8wp058j.js +153 -0
- package/dist/shared/chunk-d2t72h4x.d.ts +35 -0
- package/dist/shared/chunk-dh3qy5fj.js +49 -0
- package/dist/shared/chunk-dxzrtvt9.d.ts +283 -0
- package/dist/shared/chunk-e46apgve.d.ts +40 -0
- package/dist/shared/chunk-ejtknc0w.js +21 -0
- package/dist/shared/chunk-eqajdxn8.js +82 -0
- package/dist/shared/chunk-fapc805j.js +130 -0
- package/dist/shared/chunk-fm1qyrae.d.ts +68 -0
- package/dist/shared/chunk-fqhcz6ss.d.ts +29 -0
- package/dist/shared/chunk-g88hweqh.d.ts +70 -0
- package/dist/shared/chunk-gb5ee5dw.d.ts +88 -0
- package/dist/shared/chunk-gewnsgza.js +61 -0
- package/dist/shared/chunk-hxjgey30.d.ts +36 -0
- package/dist/shared/chunk-jkkdq1mh.d.ts +213 -0
- package/dist/shared/chunk-jpq101w3.js +91 -0
- package/dist/shared/chunk-k3bv9k1v.d.ts +56 -0
- package/dist/shared/chunk-kreypnzp.d.ts +34 -0
- package/dist/shared/chunk-mnzw0bav.js +80 -0
- package/dist/shared/chunk-mrb3fp2f.d.ts +30 -0
- package/dist/shared/chunk-n1qq2wp9.js +6 -0
- package/dist/shared/chunk-n31qwnj2.js +1544 -0
- package/dist/shared/chunk-n4742y54.js +39 -0
- package/dist/shared/chunk-ndjvdkv7.d.ts +29 -0
- package/dist/shared/chunk-njf851p1.js +245 -0
- package/dist/shared/chunk-nk4578dr.js +73 -0
- package/dist/shared/chunk-nkbgg7bw.d.ts +24 -0
- package/dist/shared/chunk-nvh33x9x.js +488 -0
- package/dist/shared/chunk-paezqfg1.js +106 -0
- package/dist/shared/chunk-qemm9e3r.d.ts +21 -0
- package/dist/shared/chunk-qhxz1etk.js +96 -0
- package/dist/shared/chunk-qj5ev9ak.js +531 -0
- package/dist/shared/chunk-qnwggvjy.js +150 -0
- package/dist/shared/chunk-qt31n444.js +178 -0
- package/dist/shared/chunk-r5hz78pb.js +129 -0
- package/dist/shared/chunk-r6nb21kz.d.ts +102 -0
- package/dist/shared/chunk-rqrpvvz4.d.ts +107 -0
- package/dist/shared/chunk-s3r759ec.js +80 -0
- package/dist/shared/chunk-sdtjrw9w.d.ts +98 -0
- package/dist/shared/chunk-skg3m9m0.js +56 -0
- package/dist/shared/chunk-t21t9x7e.js +188 -0
- package/dist/shared/chunk-tc75ng2c.js +235 -0
- package/dist/shared/chunk-tkx1krwc.js +88 -0
- package/dist/shared/chunk-tprdqtb1.d.ts +30 -0
- package/dist/shared/chunk-tv9a1sek.js +137 -0
- package/dist/shared/chunk-tvbd27hg.d.ts +43 -0
- package/dist/shared/chunk-ty2ccknv.d.ts +54 -0
- package/dist/shared/chunk-v6yevw62.d.ts +28 -0
- package/dist/shared/chunk-v9q38p0x.js +258 -0
- package/dist/shared/chunk-vgh4f3sv.js +118 -0
- package/dist/shared/chunk-vjht1zn1.js +391 -0
- package/dist/shared/chunk-vsrkb0sp.d.ts +21 -0
- package/dist/shared/chunk-whsx7yp9.d.ts +37 -0
- package/dist/shared/chunk-wq9h37gy.js +86 -0
- package/dist/shared/chunk-x7az5x1y.d.ts +57 -0
- package/dist/shared/chunk-x9jf26yb.js +318 -0
- package/dist/shared/chunk-xbrrt07s.d.ts +23 -0
- package/dist/shared/chunk-xkchhs2z.js +129 -0
- package/dist/shared/chunk-xzfrskd7.js +202 -0
- package/dist/shared/chunk-y4cj4y54.js +423 -0
- package/dist/shared/chunk-y934at6m.js +7 -0
- package/dist/shared/chunk-zbpwhpjy.d.ts +75 -0
- package/dist/shared/chunk-zfhmbb7n.js +63 -0
- package/dist/shared/chunk-zk0t4vq5.js +71 -0
- package/dist/shared/chunk-znp9gna7.d.ts +23 -0
- package/dist/styles.css +467 -0
- package/index.ts +49 -0
- package/lib/config-parts.tsx +97 -0
- package/lib/icons.tsx +149 -0
- package/lib/pace-bar.tsx +24 -0
- package/lib/pace.ts +78 -0
- package/lib/pane-parts.tsx +76 -0
- package/lib/row-trigger.tsx +44 -0
- package/lib/settings-parts.tsx +232 -0
- package/lib/side-pane-types.ts +75 -0
- package/lib/status-glyph.tsx +25 -0
- package/lib/types.ts +204 -0
- package/mock/demo-reply.tsx +33 -0
- package/mock/demo-session.tsx +150 -0
- package/mock/mock-config.ts +173 -0
- package/mock/mock-extras.ts +288 -0
- package/mock/mock-panes.ts +190 -0
- package/mock/mock-settings.ts +92 -0
- package/mock/mock.ts +548 -0
- package/mock/screen-frame.tsx +49 -0
- package/package.json +114 -4
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Local addition: the AI app's search across transcripts. A query field,
|
|
3
|
+
* project / profile / date filters, and the matching lines grouped by
|
|
4
|
+
* session with a line of context on each side. The input keeps focus while
|
|
5
|
+
* the arrow keys move one fluid highlight through the hits, as Command's
|
|
6
|
+
* list does; Enter opens the hit.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
'use client'
|
|
10
|
+
|
|
11
|
+
import { FluidHoverHighlight, useFluidHover, useRegisterFluidHoverItem } from '@justanarthur/modo-ui'
|
|
12
|
+
import Kbd from '@justanarthur/modo-ui/components/data-display/kbd'
|
|
13
|
+
import Input from '@justanarthur/modo-ui/components/inputs/input'
|
|
14
|
+
import Select from '@justanarthur/modo-ui/components/inputs/select'
|
|
15
|
+
import Dialog from '@justanarthur/modo-ui/components/overlays/dialog'
|
|
16
|
+
import { useShape } from '@justanarthur/modo-ui/lib/shape-context'
|
|
17
|
+
import { useControllableState } from '@justanarthur/modo-ui/lib/use-controllable-state'
|
|
18
|
+
import { cn } from '@justanarthur/modo-ui/lib/utils'
|
|
19
|
+
import ScrollArea from '@justanarthur/modo-ui/primitives/layout/scroll-area'
|
|
20
|
+
import { type KeyboardEvent, type ReactElement, useEffect, useId, useRef, useState } from 'react'
|
|
21
|
+
import { useIcon } from '../../../lib/icons'
|
|
22
|
+
import type { Profile, Project } from '../../../lib/types'
|
|
23
|
+
|
|
24
|
+
export interface TranscriptMessage {
|
|
25
|
+
id: string
|
|
26
|
+
role: 'user' | 'assistant' | 'tool'
|
|
27
|
+
/** The message's text; a hit is one of its lines. */
|
|
28
|
+
text: string
|
|
29
|
+
/** When it was sent, as it reads ("14:02", "Mon"). */
|
|
30
|
+
when: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface TranscriptSession {
|
|
34
|
+
id: string
|
|
35
|
+
title: string
|
|
36
|
+
/** The project's path, matched against `projects`. */
|
|
37
|
+
project: string
|
|
38
|
+
/** The profile id it ran under. */
|
|
39
|
+
profile: string
|
|
40
|
+
/** Days since its last message; the date filter reads it. */
|
|
41
|
+
daysAgo: number
|
|
42
|
+
messages: TranscriptMessage[]
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type TranscriptDateRange = 'any' | 'today' | 'week' | 'month'
|
|
46
|
+
|
|
47
|
+
/** The filters' "all" value: Select reads an empty string as no value. */
|
|
48
|
+
const ALL = '*'
|
|
49
|
+
|
|
50
|
+
const RANGES: TranscriptDateRange[] = ['any', 'today', 'week', 'month']
|
|
51
|
+
|
|
52
|
+
const RANGE_DAYS: Record<TranscriptDateRange, number> = {
|
|
53
|
+
any: Number.POSITIVE_INFINITY,
|
|
54
|
+
today: 0,
|
|
55
|
+
week: 7,
|
|
56
|
+
month: 30,
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const RANGE_LABEL: Record<TranscriptDateRange, string> = {
|
|
60
|
+
any: 'Any time',
|
|
61
|
+
today: 'Today',
|
|
62
|
+
week: 'Past 7 days',
|
|
63
|
+
month: 'Past 30 days',
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const ROLE_LABEL: Record<TranscriptMessage['role'], string> = { user: 'You', assistant: 'Claude', tool: 'Tool' }
|
|
67
|
+
|
|
68
|
+
/** Hits shown per session before the rest fold into "+N more". */
|
|
69
|
+
const PER_SESSION = 4
|
|
70
|
+
|
|
71
|
+
interface Hit {
|
|
72
|
+
session: TranscriptSession
|
|
73
|
+
message: TranscriptMessage
|
|
74
|
+
before?: string
|
|
75
|
+
line: string
|
|
76
|
+
after?: string
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function search(sessions: TranscriptSession[], query: string) {
|
|
80
|
+
const q = query.trim().toLowerCase()
|
|
81
|
+
if (!q) return []
|
|
82
|
+
return sessions
|
|
83
|
+
.map(session => {
|
|
84
|
+
const hits: Hit[] = []
|
|
85
|
+
for (const message of session.messages) {
|
|
86
|
+
const lines = message.text.split('\n')
|
|
87
|
+
lines.forEach((line, i) => {
|
|
88
|
+
if (line.toLowerCase().includes(q))
|
|
89
|
+
hits.push({ session, message, before: lines[i - 1], line, after: lines[i + 1] })
|
|
90
|
+
})
|
|
91
|
+
}
|
|
92
|
+
return { session, hits }
|
|
93
|
+
})
|
|
94
|
+
.filter(group => group.hits.length > 0)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function Highlighted({ text, query }: { text: string; query: string }) {
|
|
98
|
+
const q = query.trim().toLowerCase()
|
|
99
|
+
const parts: { text: string; match: boolean }[] = []
|
|
100
|
+
let from = 0
|
|
101
|
+
for (let at = text.toLowerCase().indexOf(q, from); q && at !== -1; at = text.toLowerCase().indexOf(q, from)) {
|
|
102
|
+
if (at > from) parts.push({ text: text.slice(from, at), match: false })
|
|
103
|
+
parts.push({ text: text.slice(at, at + q.length), match: true })
|
|
104
|
+
from = at + q.length
|
|
105
|
+
}
|
|
106
|
+
parts.push({ text: text.slice(from), match: false })
|
|
107
|
+
return (
|
|
108
|
+
<>
|
|
109
|
+
{parts.map((part, i) =>
|
|
110
|
+
part.match ? (
|
|
111
|
+
<mark key={i} className="rounded-glyph bg-status-warning/16 text-foreground">
|
|
112
|
+
{part.text}
|
|
113
|
+
</mark>
|
|
114
|
+
) : (
|
|
115
|
+
part.text
|
|
116
|
+
),
|
|
117
|
+
)}
|
|
118
|
+
</>
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function HitRow({
|
|
123
|
+
hit,
|
|
124
|
+
query,
|
|
125
|
+
index,
|
|
126
|
+
active,
|
|
127
|
+
id,
|
|
128
|
+
register,
|
|
129
|
+
onHover,
|
|
130
|
+
onOpen,
|
|
131
|
+
}: {
|
|
132
|
+
hit: Hit
|
|
133
|
+
query: string
|
|
134
|
+
index: number
|
|
135
|
+
active: boolean
|
|
136
|
+
id: string
|
|
137
|
+
register: (index: number, element: HTMLElement | null) => void
|
|
138
|
+
onHover: (index: number) => void
|
|
139
|
+
onOpen: () => void
|
|
140
|
+
}) {
|
|
141
|
+
const ref = useRef<HTMLDivElement | null>(null)
|
|
142
|
+
const shape = useShape()
|
|
143
|
+
useRegisterFluidHoverItem(register, index, ref)
|
|
144
|
+
|
|
145
|
+
useEffect(() => {
|
|
146
|
+
if (active) ref.current?.scrollIntoView({ block: 'nearest' })
|
|
147
|
+
}, [active])
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
// biome-ignore lint/a11y/useKeyWithClickEvents: the query field keeps focus and drives the keys (aria-activedescendant), as a combobox's options do
|
|
151
|
+
<div
|
|
152
|
+
ref={ref}
|
|
153
|
+
id={id}
|
|
154
|
+
role="option"
|
|
155
|
+
aria-selected={active}
|
|
156
|
+
tabIndex={-1}
|
|
157
|
+
onPointerMove={() => onHover(index)}
|
|
158
|
+
onClick={onOpen}
|
|
159
|
+
className={cn(
|
|
160
|
+
'relative z-10 flex cursor-pointer gap-[var(--space-3)] px-[var(--space-2)] py-[var(--space-2)] text-caption',
|
|
161
|
+
shape.item,
|
|
162
|
+
)}
|
|
163
|
+
>
|
|
164
|
+
<span className="w-12 shrink-0 text-muted-foreground">{ROLE_LABEL[hit.message.role]}</span>
|
|
165
|
+
<span className="flex min-w-0 flex-1 flex-col font-mono">
|
|
166
|
+
{hit.before && <span className="truncate text-muted-foreground">{hit.before}</span>}
|
|
167
|
+
<span className="truncate text-foreground">
|
|
168
|
+
<Highlighted text={hit.line} query={query} />
|
|
169
|
+
</span>
|
|
170
|
+
{hit.after && <span className="truncate text-muted-foreground">{hit.after}</span>}
|
|
171
|
+
</span>
|
|
172
|
+
<span className="shrink-0 tabular-nums text-muted-foreground">{hit.message.when}</span>
|
|
173
|
+
</div>
|
|
174
|
+
)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
interface TranscriptSearchPanelProps {
|
|
178
|
+
/** The transcripts to search. */
|
|
179
|
+
sessions: TranscriptSession[]
|
|
180
|
+
/** The projects the filter offers. */
|
|
181
|
+
projects: Project[]
|
|
182
|
+
/** The profiles the filter offers. */
|
|
183
|
+
profiles: Profile[]
|
|
184
|
+
/** Controlled query. Pair with `onQueryChange`. */
|
|
185
|
+
query?: string
|
|
186
|
+
/** The query it starts with. Defaults to `''`. */
|
|
187
|
+
defaultQuery?: string
|
|
188
|
+
/** Called as the query changes. */
|
|
189
|
+
onQueryChange?: (query: string) => void
|
|
190
|
+
/** The project path it starts filtered to; empty for all. Defaults to `''`. */
|
|
191
|
+
defaultProject?: string
|
|
192
|
+
/** The profile id it starts filtered to; empty for all. Defaults to `''`. */
|
|
193
|
+
defaultProfile?: string
|
|
194
|
+
/** The date range it starts with. Defaults to `'any'`. */
|
|
195
|
+
defaultRange?: TranscriptDateRange
|
|
196
|
+
/** Called with the hit's session and message when a hit is opened (a click, or Enter on the lit one). */
|
|
197
|
+
onOpen?: (sessionId: string, messageId: string) => void
|
|
198
|
+
/** Classes for the root. */
|
|
199
|
+
className?: string
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/** The search on its own, without the Dialog: the field, the filters and the hits. */
|
|
203
|
+
function TranscriptSearchPanel({
|
|
204
|
+
sessions,
|
|
205
|
+
projects,
|
|
206
|
+
profiles,
|
|
207
|
+
query,
|
|
208
|
+
defaultQuery = '',
|
|
209
|
+
onQueryChange,
|
|
210
|
+
defaultProject = '',
|
|
211
|
+
defaultProfile = '',
|
|
212
|
+
defaultRange = 'any',
|
|
213
|
+
onOpen,
|
|
214
|
+
className,
|
|
215
|
+
}: TranscriptSearchPanelProps) {
|
|
216
|
+
const [q, setQ] = useControllableState(query, defaultQuery, onQueryChange)
|
|
217
|
+
const [project, setProject] = useState(defaultProject || ALL)
|
|
218
|
+
const [profile, setProfile] = useState(defaultProfile || ALL)
|
|
219
|
+
const [range, setRange] = useState<TranscriptDateRange>(defaultRange)
|
|
220
|
+
const [active, setActive] = useState(0)
|
|
221
|
+
const containerRef = useRef<HTMLDivElement | null>(null)
|
|
222
|
+
const { itemRects, isMeasured, registerItem } = useFluidHover(containerRef)
|
|
223
|
+
const shape = useShape()
|
|
224
|
+
const listId = useId()
|
|
225
|
+
const SearchIcon = useIcon('search')
|
|
226
|
+
|
|
227
|
+
const scoped = sessions.filter(
|
|
228
|
+
s =>
|
|
229
|
+
(project === ALL || s.project === project) &&
|
|
230
|
+
(profile === ALL || s.profile === profile) &&
|
|
231
|
+
s.daysAgo <= RANGE_DAYS[range],
|
|
232
|
+
)
|
|
233
|
+
const groups = search(scoped, q).map(g => ({ ...g, shown: g.hits.slice(0, PER_SESSION) }))
|
|
234
|
+
const hits = groups.flatMap(g => g.shown)
|
|
235
|
+
const current = Math.min(active, hits.length - 1)
|
|
236
|
+
const rect = isMeasured && current >= 0 ? (itemRects[current] ?? null) : null
|
|
237
|
+
const total = groups.reduce((n, g) => n + g.hits.length, 0)
|
|
238
|
+
|
|
239
|
+
const open = (hit: Hit | undefined) => hit && onOpen?.(hit.session.id, hit.message.id)
|
|
240
|
+
const onKeyDown = (event: KeyboardEvent) => {
|
|
241
|
+
if (hits.length === 0) return
|
|
242
|
+
const step = (by: number) => setActive(a => (Math.min(a, hits.length - 1) + by + hits.length) % hits.length)
|
|
243
|
+
if (event.key === 'ArrowDown') step(1)
|
|
244
|
+
else if (event.key === 'ArrowUp') step(-1)
|
|
245
|
+
else if (event.key === 'Home') setActive(0)
|
|
246
|
+
else if (event.key === 'End') setActive(hits.length - 1)
|
|
247
|
+
else if (event.key === 'Enter') open(hits[current])
|
|
248
|
+
else return
|
|
249
|
+
event.preventDefault()
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
const projectLabel = (path: string) => projects.find(p => p.path === path)?.label ?? path
|
|
253
|
+
const profileLabel = (id: string) => profiles.find(p => p.id === id)?.name ?? id
|
|
254
|
+
let index = 0
|
|
255
|
+
|
|
256
|
+
return (
|
|
257
|
+
<div className={cn('flex min-h-0 flex-col gap-[var(--space-3)]', className)}>
|
|
258
|
+
<Input
|
|
259
|
+
autoFocus
|
|
260
|
+
variant="bordered"
|
|
261
|
+
icon={SearchIcon}
|
|
262
|
+
placeholder="Search every transcript…"
|
|
263
|
+
aria-label="Search transcripts"
|
|
264
|
+
role="combobox"
|
|
265
|
+
aria-expanded={hits.length > 0}
|
|
266
|
+
aria-controls={listId}
|
|
267
|
+
aria-activedescendant={current >= 0 ? `${listId}-${current}` : undefined}
|
|
268
|
+
value={q}
|
|
269
|
+
onValueChange={value => {
|
|
270
|
+
setQ(value)
|
|
271
|
+
setActive(0)
|
|
272
|
+
}}
|
|
273
|
+
onKeyDown={onKeyDown}
|
|
274
|
+
/>
|
|
275
|
+
|
|
276
|
+
<div className="flex flex-wrap items-center gap-[var(--space-1)]">
|
|
277
|
+
<Select value={project} onValueChange={setProject} size="compact">
|
|
278
|
+
<Select.Trigger variant="borderless" aria-label="Project" />
|
|
279
|
+
<Select.Content>
|
|
280
|
+
{[{ label: 'All projects', path: ALL }, ...projects].map((p, i) => (
|
|
281
|
+
<Select.Item key={p.path} index={i} value={p.path}>
|
|
282
|
+
{p.label}
|
|
283
|
+
</Select.Item>
|
|
284
|
+
))}
|
|
285
|
+
</Select.Content>
|
|
286
|
+
</Select>
|
|
287
|
+
<Select value={profile} onValueChange={setProfile} size="compact">
|
|
288
|
+
<Select.Trigger variant="borderless" aria-label="Profile" />
|
|
289
|
+
<Select.Content>
|
|
290
|
+
{[{ name: 'All profiles', id: ALL }, ...profiles].map((p, i) => (
|
|
291
|
+
<Select.Item key={p.id} index={i} value={p.id}>
|
|
292
|
+
{p.name}
|
|
293
|
+
</Select.Item>
|
|
294
|
+
))}
|
|
295
|
+
</Select.Content>
|
|
296
|
+
</Select>
|
|
297
|
+
<Select value={range} onValueChange={value => setRange(RANGES.find(r => r === value) ?? 'any')} size="compact">
|
|
298
|
+
<Select.Trigger variant="borderless" aria-label="Date" />
|
|
299
|
+
<Select.Content>
|
|
300
|
+
{RANGES.map((r, i) => (
|
|
301
|
+
<Select.Item key={r} index={i} value={r}>
|
|
302
|
+
{RANGE_LABEL[r]}
|
|
303
|
+
</Select.Item>
|
|
304
|
+
))}
|
|
305
|
+
</Select.Content>
|
|
306
|
+
</Select>
|
|
307
|
+
{q.trim() && (
|
|
308
|
+
<span
|
|
309
|
+
aria-live="polite"
|
|
310
|
+
className="ml-auto pr-[var(--space-2)] text-caption tabular-nums text-muted-foreground"
|
|
311
|
+
>
|
|
312
|
+
{total === 0
|
|
313
|
+
? 'No matches'
|
|
314
|
+
: `${total} ${total === 1 ? 'match' : 'matches'} in ${groups.length} ${groups.length === 1 ? 'session' : 'sessions'}`}
|
|
315
|
+
</span>
|
|
316
|
+
)}
|
|
317
|
+
</div>
|
|
318
|
+
|
|
319
|
+
<ScrollArea className="min-h-0 flex-1" viewportClassName="scroll-fade">
|
|
320
|
+
<div
|
|
321
|
+
ref={containerRef}
|
|
322
|
+
id={listId}
|
|
323
|
+
role="listbox"
|
|
324
|
+
aria-label="Matches"
|
|
325
|
+
className="@container relative flex flex-col gap-[var(--space-3)]"
|
|
326
|
+
>
|
|
327
|
+
<FluidHoverHighlight rect={rect} session={0} className={shape.bg} />
|
|
328
|
+
{groups.map(group => (
|
|
329
|
+
<section key={group.session.id} aria-label={group.session.title} className="flex flex-col">
|
|
330
|
+
<div className="flex items-baseline gap-[var(--space-2)] px-[var(--space-2)] pb-[var(--space-1)]">
|
|
331
|
+
<span className="min-w-0 truncate text-body weight-medium text-foreground">{group.session.title}</span>
|
|
332
|
+
<span className="min-w-0 truncate text-caption text-muted-foreground">
|
|
333
|
+
{projectLabel(group.session.project)} · {profileLabel(group.session.profile)}
|
|
334
|
+
</span>
|
|
335
|
+
<span className="ml-auto shrink-0 text-caption tabular-nums text-muted-foreground">
|
|
336
|
+
{group.hits.length > group.shown.length ? `+${group.hits.length - group.shown.length} more` : ''}
|
|
337
|
+
</span>
|
|
338
|
+
</div>
|
|
339
|
+
{group.shown.map(hit => {
|
|
340
|
+
const i = index++
|
|
341
|
+
return (
|
|
342
|
+
<HitRow
|
|
343
|
+
key={`${hit.message.id}-${hit.line}`}
|
|
344
|
+
hit={hit}
|
|
345
|
+
query={q}
|
|
346
|
+
index={i}
|
|
347
|
+
id={`${listId}-${i}`}
|
|
348
|
+
active={i === current}
|
|
349
|
+
register={registerItem}
|
|
350
|
+
onHover={setActive}
|
|
351
|
+
onOpen={() => open(hit)}
|
|
352
|
+
/>
|
|
353
|
+
)
|
|
354
|
+
})}
|
|
355
|
+
</section>
|
|
356
|
+
))}
|
|
357
|
+
{q.trim() && total === 0 && (
|
|
358
|
+
<span className="px-[var(--space-4)] py-[var(--space-6)] text-center text-body text-muted-foreground">
|
|
359
|
+
Nothing in {scoped.length} {scoped.length === 1 ? 'transcript' : 'transcripts'} says “{q.trim()}”.
|
|
360
|
+
</span>
|
|
361
|
+
)}
|
|
362
|
+
{!q.trim() && (
|
|
363
|
+
<span className="px-[var(--space-4)] py-[var(--space-6)] text-center text-body text-muted-foreground">
|
|
364
|
+
Search what you asked, what Claude answered and what the tools printed, across {scoped.length}{' '}
|
|
365
|
+
{scoped.length === 1 ? 'session' : 'sessions'}.
|
|
366
|
+
</span>
|
|
367
|
+
)}
|
|
368
|
+
</div>
|
|
369
|
+
</ScrollArea>
|
|
370
|
+
|
|
371
|
+
<div className="flex items-center gap-[var(--space-3)] px-[var(--space-2)] text-caption text-muted-foreground">
|
|
372
|
+
<span className="flex items-center gap-[var(--space-1)]">
|
|
373
|
+
<Kbd>↑</Kbd>
|
|
374
|
+
<Kbd>↓</Kbd> move
|
|
375
|
+
</span>
|
|
376
|
+
<span className="flex items-center gap-[var(--space-1)]">
|
|
377
|
+
<Kbd>↵</Kbd> open
|
|
378
|
+
</span>
|
|
379
|
+
<span className="flex items-center gap-[var(--space-1)]">
|
|
380
|
+
<Kbd>Esc</Kbd> close
|
|
381
|
+
</span>
|
|
382
|
+
</div>
|
|
383
|
+
</div>
|
|
384
|
+
)
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
interface TranscriptSearchProps {
|
|
388
|
+
/** The transcripts to search. */
|
|
389
|
+
sessions: TranscriptSession[]
|
|
390
|
+
/** The projects the filter offers. */
|
|
391
|
+
projects: Project[]
|
|
392
|
+
/** The profiles the filter offers. */
|
|
393
|
+
profiles: Profile[]
|
|
394
|
+
/** The control that opens it. */
|
|
395
|
+
trigger?: ReactElement
|
|
396
|
+
/** Controlled open state. */
|
|
397
|
+
open?: boolean
|
|
398
|
+
/** Initial open state, for an uncontrolled dialog. Defaults to `false`. */
|
|
399
|
+
defaultOpen?: boolean
|
|
400
|
+
/** Called when the dialog opens or closes. */
|
|
401
|
+
onOpenChange?: (open: boolean) => void
|
|
402
|
+
/** The query it starts with. Defaults to `''`. */
|
|
403
|
+
defaultQuery?: string
|
|
404
|
+
/** The project path it starts filtered to; empty for all. Defaults to `''`. */
|
|
405
|
+
defaultProject?: string
|
|
406
|
+
/** The profile id it starts filtered to; empty for all. Defaults to `''`. */
|
|
407
|
+
defaultProfile?: string
|
|
408
|
+
/** The date range it starts with. Defaults to `'any'`. */
|
|
409
|
+
defaultRange?: TranscriptDateRange
|
|
410
|
+
/** Called with the hit's session and message when a hit is opened; the dialog closes. */
|
|
411
|
+
onOpen?: (sessionId: string, messageId: string) => void
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Searches every session's transcript at once: what you asked, what Claude
|
|
416
|
+
* answered, what the tools printed.
|
|
417
|
+
*
|
|
418
|
+
* Each matching line shows with the line before and after it, the match
|
|
419
|
+
* marked, grouped under its session with the session's project and profile.
|
|
420
|
+
* Narrow it by project, by profile, or to today, the past week or the past
|
|
421
|
+
* month. The field keeps focus: the arrow keys move one highlight through
|
|
422
|
+
* the hits (Home and End jump), the pointer moves it too, and Enter or a
|
|
423
|
+
* click hands the session and message to `onOpen` and closes the dialog.
|
|
424
|
+
* The dialog sits near the top so it keeps still while the hits change;
|
|
425
|
+
* `TranscriptSearch.Panel` is the same search without it.
|
|
426
|
+
*
|
|
427
|
+
* Statics:
|
|
428
|
+
* - `TranscriptSearch.Panel` — the search on its own: the same props, minus the dialog's.
|
|
429
|
+
*
|
|
430
|
+
* @example {@include ./examples.mdx}
|
|
431
|
+
*/
|
|
432
|
+
const TranscriptSearch = Object.assign(
|
|
433
|
+
function TranscriptSearch({
|
|
434
|
+
trigger,
|
|
435
|
+
open,
|
|
436
|
+
defaultOpen = false,
|
|
437
|
+
onOpenChange,
|
|
438
|
+
onOpen,
|
|
439
|
+
...panel
|
|
440
|
+
}: TranscriptSearchProps) {
|
|
441
|
+
const [isOpen, setOpen] = useControllableState(open, defaultOpen, onOpenChange)
|
|
442
|
+
return (
|
|
443
|
+
<Dialog open={isOpen} onOpenChange={setOpen}>
|
|
444
|
+
{trigger && <Dialog.Trigger render={trigger} />}
|
|
445
|
+
<Dialog.Content
|
|
446
|
+
width="xl"
|
|
447
|
+
position="top"
|
|
448
|
+
aria-label="Search transcripts"
|
|
449
|
+
className="flex h-[min(560px,76dvh)] flex-col p-4"
|
|
450
|
+
>
|
|
451
|
+
<TranscriptSearchPanel
|
|
452
|
+
{...panel}
|
|
453
|
+
className="flex-1"
|
|
454
|
+
onOpen={(sessionId, messageId) => {
|
|
455
|
+
onOpen?.(sessionId, messageId)
|
|
456
|
+
setOpen(false)
|
|
457
|
+
}}
|
|
458
|
+
/>
|
|
459
|
+
</Dialog.Content>
|
|
460
|
+
</Dialog>
|
|
461
|
+
)
|
|
462
|
+
},
|
|
463
|
+
{ Panel: TranscriptSearchPanel },
|
|
464
|
+
)
|
|
465
|
+
|
|
466
|
+
export type { TranscriptSearchPanelProps, TranscriptSearchProps }
|
|
467
|
+
export { TranscriptSearch, TranscriptSearchPanel }
|
|
468
|
+
|
|
469
|
+
export default TranscriptSearch
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import CommandPalette from './index'
|
|
2
|
+
import { ARCHIVED, COMMANDS, GROUPS, PINNED, PROFILES, PROJECTS } from '../../../mock/mock'
|
|
3
|
+
import { SETTINGS_SECTIONS } from '../../../mock/mock-settings'
|
|
4
|
+
|
|
5
|
+
# Palette
|
|
6
|
+
|
|
7
|
+
Press the trigger or ⌘K: the panel grows out of it. Try "canvas" for a session, "work" for a new session under that profile, "review" for a command or "hooks" for a settings section.
|
|
8
|
+
|
|
9
|
+
<div className="flex h-[520px] w-full items-start justify-center pt-6">
|
|
10
|
+
<CommandPalette
|
|
11
|
+
sessions={[...PINNED, ...GROUPS.flatMap(g => g.sessions), ...ARCHIVED]}
|
|
12
|
+
projects={PROJECTS}
|
|
13
|
+
profiles={PROFILES}
|
|
14
|
+
commands={COMMANDS}
|
|
15
|
+
settings={SETTINGS_SECTIONS}
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
# Another profile
|
|
20
|
+
|
|
21
|
+
With `work` active, new sessions start under it and its own row is disabled. Without `settings`, one row opens the settings window. ⌘K stays with the first palette here.
|
|
22
|
+
|
|
23
|
+
<div className="flex h-[520px] w-full items-start justify-center pt-6">
|
|
24
|
+
<CommandPalette
|
|
25
|
+
hotkey={false}
|
|
26
|
+
profile="work"
|
|
27
|
+
label="Search work"
|
|
28
|
+
sessions={PINNED}
|
|
29
|
+
projects={PROJECTS}
|
|
30
|
+
profiles={PROFILES}
|
|
31
|
+
commands={COMMANDS}
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
# Fewer groups
|
|
36
|
+
|
|
37
|
+
An app without side panes or a settings window leaves those groups out: `panes={false}` drops Panes and `settings={[]}` drops Settings. `panes={['changes', 'terminal']}` would offer just those two.
|
|
38
|
+
|
|
39
|
+
<div className="flex h-[520px] w-full items-start justify-center pt-6">
|
|
40
|
+
<CommandPalette
|
|
41
|
+
hotkey={false}
|
|
42
|
+
label="Search lean"
|
|
43
|
+
sessions={PINNED}
|
|
44
|
+
projects={PROJECTS}
|
|
45
|
+
profiles={PROFILES}
|
|
46
|
+
commands={COMMANDS}
|
|
47
|
+
panes={false}
|
|
48
|
+
settings={[]}
|
|
49
|
+
/>
|
|
50
|
+
</div>
|