@zyro-sec/session-ui 0.0.0-stage → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +25 -0
- package/bunfig.toml +2 -0
- package/component-tests/basic-tool.fixture.tsx +46 -0
- package/component-tests/basic-tool.spec.ts +63 -0
- package/component-tests/file-media.fixture.tsx +39 -0
- package/component-tests/file-media.spec.ts +13 -0
- package/component-tests/file-tool.spec.ts +62 -0
- package/component-tests/file-viewer.fixture.tsx +109 -0
- package/component-tests/file-viewer.spec.ts +134 -0
- package/component-tests/file.spec.ts +33 -0
- package/component-tests/line-comment-v2.spec.ts +15 -0
- package/component-tests/markdown-code-wrap.spec.ts +94 -0
- package/component-tests/markdown-readiness.spec.ts +95 -0
- package/component-tests/markdown.fixture.tsx +104 -0
- package/component-tests/markdown.spec.ts +1564 -0
- package/component-tests/mermaid-preview.spec.ts +43 -0
- package/component-tests/patch-group.spec.ts +79 -0
- package/component-tests/read-group.spec.ts +72 -0
- package/component-tests/read-image.fixture.tsx +66 -0
- package/component-tests/read-image.spec.ts +154 -0
- package/component-tests/session-compaction.spec.ts +254 -0
- package/component-tests/session-lifecycle.spec.ts +190 -0
- package/component-tests/session-message-projection.spec.ts +639 -0
- package/component-tests/session-notice-projection.spec.ts +20 -0
- package/component-tests/session-review-comments.spec.ts +179 -0
- package/component-tests/session-shell.spec.ts +93 -0
- package/component-tests/session-timeline-mobile.spec.ts +201 -0
- package/component-tests/session-timeline-notices.spec.ts +38 -0
- package/component-tests/session-timeline-reasoning.spec.ts +107 -0
- package/component-tests/session-timeline.spec.ts +157 -0
- package/component-tests/session-tool-projection.spec.ts +323 -0
- package/component-tests/text-lifecycle.fixture.tsx +26 -0
- package/component-tests/text-lifecycle.spec.ts +42 -0
- package/component-tests/timeline-subagent-rows.spec.ts +33 -0
- package/component-tests/tool-disclosure.spec.ts +48 -0
- package/component-tests/tool-group-sticky.spec.ts +37 -0
- package/component-tests/tool-group.spec.ts +290 -0
- package/component-tests/tool-status-title.fixture.tsx +22 -0
- package/component-tests/tool-status-title.spec.ts +30 -0
- package/component-tests/user-message-quotes.spec.ts +111 -0
- package/package.json +91 -4
- package/playwright.components.config.ts +4 -0
- package/playwright.local.config.ts +2 -0
- package/src/actions.ts +54 -0
- package/src/components/apply-patch-file.ts +122 -0
- package/src/components/basic-tool.css +487 -0
- package/src/components/basic-tool.tsx +258 -0
- package/src/components/copy-machine.ts +78 -0
- package/src/components/copy.ts +85 -0
- package/src/components/diagram-preview.tsx +28 -0
- package/src/components/disclosure-machine.ts +188 -0
- package/src/components/disclosure.ts +129 -0
- package/src/components/dock-prompt.stories.tsx +73 -0
- package/src/components/dock-prompt.tsx +29 -0
- package/src/components/file-comment-selection.tsx +146 -0
- package/src/components/file-media-machine.ts +165 -0
- package/src/components/file-media.stories.tsx +112 -0
- package/src/components/file-media.tsx +323 -0
- package/src/components/file-search.tsx +73 -0
- package/src/components/file.css +59 -0
- package/src/components/file.tsx +1300 -0
- package/src/components/image-preview.tsx +35 -0
- package/src/components/line-comment-annotations.tsx +580 -0
- package/src/components/line-comment-machine.ts +262 -0
- package/src/components/line-comment-styles.ts +293 -0
- package/src/components/line-comment.stories.tsx +152 -0
- package/src/components/line-comment.tsx +448 -0
- package/src/components/link-segments.ts +20 -0
- package/src/components/linked-text.tsx +21 -0
- package/src/components/markdown-cache-machine.ts +257 -0
- package/src/components/markdown-cache.tsx +556 -0
- package/src/components/markdown-clipboard.ts +101 -0
- package/src/components/markdown-code-machine.ts +200 -0
- package/src/components/markdown-code-state.ts +22 -0
- package/src/components/markdown-fragment-links.ts +74 -0
- package/src/components/markdown-github.svg +3 -0
- package/src/components/markdown-globe.svg +5 -0
- package/src/components/markdown-image-machine.ts +170 -0
- package/src/components/markdown-image.ts +156 -0
- package/src/components/markdown-inline-code-kind.ts +39 -0
- package/src/components/markdown-mermaid.ts +18 -0
- package/src/components/markdown-phase-machine.ts +102 -0
- package/src/components/markdown-projection.ts +13 -0
- package/src/components/markdown-session-links.ts +183 -0
- package/src/components/markdown-solid.test.tsx +92 -0
- package/src/components/markdown-solid.tsx +113 -0
- package/src/components/markdown-stream.ts +95 -0
- package/src/components/markdown-worker-machine.ts +516 -0
- package/src/components/markdown-worker-protocol.ts +73 -0
- package/src/components/markdown-worker.ts +250 -0
- package/src/components/markdown.css +672 -0
- package/src/components/markdown.stories.tsx +199 -0
- package/src/components/markdown.tsx +1612 -0
- package/src/components/markdown.worker.ts +188 -0
- package/src/components/message-file.ts +102 -0
- package/src/components/message-nav.css +134 -0
- package/src/components/message-nav.tsx +159 -0
- package/src/components/message-part.css +2109 -0
- package/src/components/message-part.tsx +3 -0
- package/src/components/question-prompt-experimental.css +576 -0
- package/src/components/question-prompt.css +527 -0
- package/src/components/quote-highlight.css +59 -0
- package/src/components/review-focus-driver.ts +142 -0
- package/src/components/review-focus-machine.ts +95 -0
- package/src/components/session-compaction.css +270 -0
- package/src/components/session-diff.ts +358 -0
- package/src/components/session-error.tsx +41 -0
- package/src/components/session-retry.tsx +92 -0
- package/src/components/session-review-machine.ts +241 -0
- package/src/components/session-review.css +264 -0
- package/src/components/session-review.stories.tsx +232 -0
- package/src/components/session-review.tsx +733 -0
- package/src/components/session-turn.css +282 -0
- package/src/components/shell-submessage.css +24 -0
- package/src/components/timeline-separator.tsx +69 -0
- package/src/components/tool-count-label.css +57 -0
- package/src/components/tool-count-label.tsx +76 -0
- package/src/components/tool-count-summary.css +102 -0
- package/src/components/tool-count-summary.stories.tsx +99 -0
- package/src/components/tool-count-summary.tsx +44 -0
- package/src/components/tool-error-card.css +178 -0
- package/src/components/tool-error-card.stories.tsx +113 -0
- package/src/components/tool-error-card.tsx +202 -0
- package/src/components/tool-status-title-machine.ts +128 -0
- package/src/components/tool-status-title.css +89 -0
- package/src/components/tool-status-title.tsx +163 -0
- package/src/context/data.tsx +107 -0
- package/src/context/index.ts +1 -0
- package/src/context/markdown.tsx +129 -0
- package/src/context/sources.tsx +34 -0
- package/src/document.ts +8 -0
- package/src/file-presentation.ts +34 -0
- package/src/message/action-machine.ts +72 -0
- package/src/message/agent-label.ts +3 -0
- package/src/message/attachment-card.css +119 -0
- package/src/message/attachment-card.tsx +40 -0
- package/src/message/attachment-media-machine.ts +213 -0
- package/src/message/comment-card.tsx +155 -0
- package/src/message/compaction-entrance-machine.ts +93 -0
- package/src/message/current-message.tsx +157 -0
- package/src/message/current-tool-state.ts +161 -0
- package/src/message/message-content.tsx +1391 -0
- package/src/message/paced-text-machine.ts +73 -0
- package/src/message/prompt-message.stories.tsx +149 -0
- package/src/message/relative-time.ts +45 -0
- package/src/message/user-message-quote-parts.ts +16 -0
- package/src/message/user-message-quotes.stories.tsx +797 -0
- package/src/message/user-message-quotes.tsx +135 -0
- package/src/pierre/comment-hover-machine.ts +53 -0
- package/src/pierre/comment-hover.ts +131 -0
- package/src/pierre/comment-selection-machine.ts +257 -0
- package/src/pierre/commented-lines.ts +106 -0
- package/src/pierre/diff-selection.ts +91 -0
- package/src/pierre/file-find-machine.ts +323 -0
- package/src/pierre/file-find.ts +537 -0
- package/src/pierre/file-runtime.ts +42 -0
- package/src/pierre/file-selection.ts +140 -0
- package/src/pierre/index.ts +344 -0
- package/src/pierre/media.ts +140 -0
- package/src/pierre/render-machine.ts +381 -0
- package/src/pierre/selection-bridge.ts +82 -0
- package/src/pierre/selection-machine.ts +198 -0
- package/src/pierre/virtualizer.ts +114 -0
- package/src/pierre/worker.ts +46 -0
- package/src/sources/experiment.ts +59 -0
- package/src/sources/site-icon.tsx +53 -0
- package/src/sources/sources-chip.tsx +57 -0
- package/src/sources/sources-expand-machine.ts +101 -0
- package/src/sources/sources-panel.tsx +249 -0
- package/src/sources/sources-title.tsx +21 -0
- package/src/sources/sources.css +266 -0
- package/src/sources/sources.ts +141 -0
- package/src/storybook/current-session-fixtures.ts +1492 -0
- package/src/storybook/current-session-scenarios.ts +76 -0
- package/src/storybook/current-session-story.tsx +154 -0
- package/src/storybook/index.ts +43 -0
- package/src/styles/index.css +19 -0
- package/src/timeline/__snapshots__/group-labels.test.ts.snap +110 -0
- package/src/timeline/__snapshots__/placement.test.ts.snap +1041 -0
- package/src/timeline/code-blocks.stories.tsx +105 -0
- package/src/timeline/commentary.stories.tsx +70 -0
- package/src/timeline/commentary.ts +38 -0
- package/src/timeline/detail.ts +111 -0
- package/src/timeline/error-card.stories.tsx +134 -0
- package/src/timeline/error-spacing.stories.tsx +71 -0
- package/src/timeline/facts.ts +493 -0
- package/src/timeline/file-changes.stories.tsx +436 -0
- package/src/timeline/group-label-fixtures.ts +97 -0
- package/src/timeline/mermaid.stories.tsx +131 -0
- package/src/timeline/place.ts +280 -0
- package/src/timeline/placement-fixtures.ts +365 -0
- package/src/timeline/placement-reactivity.ts +133 -0
- package/src/timeline/projection.ts +1261 -0
- package/src/timeline/research-and-agents.stories.tsx +461 -0
- package/src/timeline/session-timeline-row.tsx +1675 -0
- package/src/timeline/session-timeline.tsx +68 -0
- package/src/timeline/steer-arrival-machine.ts +134 -0
- package/src/timeline/terminal-work.stories.tsx +464 -0
- package/src/timeline/timeline-row.stories.tsx +1069 -0
- package/src/timeline/timeline-row.ts +238 -0
- package/src/timeline/turn-phase-machine.ts +112 -0
- package/src/timeline/user-message-fold.stories.tsx +194 -0
- package/src/timeline/user-runs.ts +87 -0
- package/src/timeline-next/__snapshots__/placement.test.ts.snap +990 -0
- package/src/timeline-next/compaction.tsx +236 -0
- package/src/timeline-next/errors.ts +101 -0
- package/src/timeline-next/event-row.tsx +168 -0
- package/src/timeline-next/events.ts +103 -0
- package/src/timeline-next/index.ts +10 -0
- package/src/timeline-next/nested-rail.ts +125 -0
- package/src/timeline-next/projection.ts +1028 -0
- package/src/timeline-next/row.tsx +1728 -0
- package/src/timeline-next/rules.ts +89 -0
- package/src/timeline-next/separator.tsx +73 -0
- package/src/timeline-next/spacing.ts +127 -0
- package/src/timeline-next/status-line.tsx +41 -0
- package/src/timeline-next/status.ts +33 -0
- package/src/timeline-next/stories/compare-renderer.stories.tsx +190 -0
- package/src/timeline-next/stories/compare-sessions/.gitignore +3 -0
- package/src/timeline-next/stories/compare.stories.tsx +486 -0
- package/src/timeline-next/stories/playground.stories.tsx +297 -0
- package/src/timeline-next/stories/session-replay.ts +1156 -0
- package/src/timeline-next/stories/session-timeline.tsx +50 -0
- package/src/timeline-next/stories/subagent-status.stories.tsx +132 -0
- package/src/timeline-next/timeline-next.css +649 -0
- package/src/timeline-next/tools/__snapshots__/activity-label.test.ts.snap +39 -0
- package/src/timeline-next/tools/activity-label.ts +166 -0
- package/src/timeline-next/tools/assistant-content.tsx +84 -0
- package/src/timeline-next/tools/context-group.tsx +619 -0
- package/src/timeline-next/tools/error-card.tsx +147 -0
- package/src/timeline-next/tools/explore.tsx +119 -0
- package/src/timeline-next/tools/file-group.tsx +128 -0
- package/src/timeline-next/tools/patch.tsx +174 -0
- package/src/timeline-next/tools/shell.tsx +186 -0
- package/src/timeline-next/tools/thought.tsx +87 -0
- package/src/timeline-next/tools/tool-display.tsx +119 -0
- package/src/tools/ansi.ts +8 -0
- package/src/tools/context-group-label.ts +123 -0
- package/src/tools/file-runs.ts +35 -0
- package/src/tools/project-path.ts +18 -0
- package/src/tools/read-group.stories.tsx +159 -0
- package/src/tools/run-machine.ts +185 -0
- package/src/tools/shell-output-machine.ts +233 -0
- package/src/tools/shell-output.ts +91 -0
- package/src/tools/subagent-row-variants.stories.tsx +129 -0
- package/src/tools/tool-group.stories.tsx +345 -0
- package/src/tools/tool-renderer.tsx +2876 -0
- package/src/v2/components/line-comment-annotations-v2.tsx +215 -0
- package/src/v2/components/session-file-panel-v2.tsx +149 -0
- package/src/v2/components/session-progress-indicator-v2.css +5 -0
- package/src/v2/components/session-progress-indicator-v2.stories.tsx +86 -0
- package/src/v2/components/session-progress-indicator-v2.tsx +16 -0
- package/src/v2/components/session-review-empty-changes-v2.tsx +17 -0
- package/src/v2/components/session-review-empty-no-git-v2.tsx +28 -0
- package/src/v2/components/session-review-file-preview-v2-virtualize.ts +5 -0
- package/src/v2/components/session-review-file-preview-v2.tsx +266 -0
- package/src/v2/components/session-review-v2.css +653 -0
- package/src/v2/components/session-review-v2.tsx +422 -0
- package/src/v2/components/sidebar-presence-machine.ts +69 -0
- package/tsconfig.json +20 -0
- package/README.md +0 -3
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/* oxlint-disable anti-slop/no-runtime-typeof, anti-slop/no-unknown-parameters, anti-slop-effect/prefer-effect-match --
|
|
2
|
+
this file parses tool metadata as it did before the New timeline, which only added the optional `context`; the
|
|
3
|
+
parsing is shared with the current timeline and keeps its shape until it is rewritten on its own. */
|
|
4
|
+
import type { FileDiffInfo } from "@zyro-sec/client/promise"
|
|
5
|
+
import { completePatchContents, normalize, type ViewDiff } from "./session-diff"
|
|
6
|
+
|
|
7
|
+
type Kind = "add" | "update" | "delete"
|
|
8
|
+
|
|
9
|
+
export type ApplyPatchFile = {
|
|
10
|
+
path: string
|
|
11
|
+
type: Kind
|
|
12
|
+
additions: number
|
|
13
|
+
deletions: number
|
|
14
|
+
view: ViewDiff
|
|
15
|
+
contents?: { before: string; after: string }
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type ApplyPatchFileGroup = Omit<ApplyPatchFile, "view" | "contents"> & { views: ViewDiff[] }
|
|
19
|
+
|
|
20
|
+
export function changedFileDiff(value: unknown): value is FileDiffInfo {
|
|
21
|
+
if (!value || typeof value !== "object") return false
|
|
22
|
+
|
|
23
|
+
if (!("file" in value) || typeof value.file !== "string") return false
|
|
24
|
+
|
|
25
|
+
if (!("patch" in value) || typeof value.patch !== "string") return false
|
|
26
|
+
|
|
27
|
+
if (!("additions" in value) || typeof value.additions !== "number") return false
|
|
28
|
+
|
|
29
|
+
if (!("deletions" in value) || typeof value.deletions !== "number") return false
|
|
30
|
+
|
|
31
|
+
if (!("status" in value)) return false
|
|
32
|
+
|
|
33
|
+
if (value.status !== "added" && value.status !== "deleted" && value.status !== "modified") return false
|
|
34
|
+
|
|
35
|
+
return value.additions > 0 || value.deletions > 0
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** `context` is how many unchanged lines the diff keeps around each change. */
|
|
39
|
+
export function patchFile(value: unknown, context?: number): ApplyPatchFile | undefined {
|
|
40
|
+
if (!changedFileDiff(value)) return
|
|
41
|
+
let view: ViewDiff | undefined
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
path: value.file,
|
|
45
|
+
type: value.status === "added" ? "add" : value.status === "deleted" ? "delete" : "update",
|
|
46
|
+
additions: value.additions,
|
|
47
|
+
deletions: value.deletions,
|
|
48
|
+
get view() {
|
|
49
|
+
return (view ??= normalize(value, context))
|
|
50
|
+
},
|
|
51
|
+
contents: completePatchContents(value.patch),
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function patchFiles(value: unknown, context?: number) {
|
|
56
|
+
if (!Array.isArray(value)) return []
|
|
57
|
+
|
|
58
|
+
return value.map((file) => patchFile(file, context)).filter((file): file is ApplyPatchFile => !!file)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function patchFileGroups(value: unknown, context?: number): ApplyPatchFileGroup[] {
|
|
62
|
+
const groups = patchFiles(value, context).reduce((result, file) => {
|
|
63
|
+
const files = result.get(file.path)
|
|
64
|
+
|
|
65
|
+
if (files) files.push(file)
|
|
66
|
+
|
|
67
|
+
if (!files) result.set(file.path, [file])
|
|
68
|
+
|
|
69
|
+
return result
|
|
70
|
+
}, new Map<string, ApplyPatchFile[]>())
|
|
71
|
+
|
|
72
|
+
return [...groups].map(([path, files]) => {
|
|
73
|
+
const first = files[0]!
|
|
74
|
+
const last = files.at(-1)!
|
|
75
|
+
const type = last.type === "delete" ? "delete" : first.type === "add" ? "add" : "update"
|
|
76
|
+
|
|
77
|
+
const chained = files.every(
|
|
78
|
+
(file, index) => !!file.contents && (index === 0 || files[index - 1]?.contents?.after === file.contents.before),
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
if (!chained) {
|
|
82
|
+
return {
|
|
83
|
+
path,
|
|
84
|
+
type,
|
|
85
|
+
additions: files.reduce((total, file) => total + file.additions, 0),
|
|
86
|
+
deletions: files.reduce((total, file) => total + file.deletions, 0),
|
|
87
|
+
views: files.map((file) => file.view),
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const view =
|
|
92
|
+
files.length === 1
|
|
93
|
+
? first.view
|
|
94
|
+
: normalize(
|
|
95
|
+
{
|
|
96
|
+
file: path,
|
|
97
|
+
before: first.contents!.before,
|
|
98
|
+
after: last.contents!.after,
|
|
99
|
+
status: type === "add" ? "added" : type === "delete" ? "deleted" : "modified",
|
|
100
|
+
additions: 0,
|
|
101
|
+
deletions: 0,
|
|
102
|
+
},
|
|
103
|
+
context,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
// Parsed hunks already contain net change counts, excluding unchanged context.
|
|
107
|
+
const counts = view.fileDiff.hunks.reduce(
|
|
108
|
+
(result, hunk) => ({
|
|
109
|
+
additions: result.additions + hunk.additionLines,
|
|
110
|
+
deletions: result.deletions + hunk.deletionLines,
|
|
111
|
+
}),
|
|
112
|
+
{ additions: 0, deletions: 0 },
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
path,
|
|
117
|
+
type,
|
|
118
|
+
...counts,
|
|
119
|
+
views: [{ ...view, ...counts }],
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
}
|
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
[data-timeline-row] [data-component="tool-trigger"] {
|
|
2
|
+
content-visibility: visible;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
[data-component="tool-trigger"] {
|
|
6
|
+
content-visibility: auto;
|
|
7
|
+
width: 100%;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
align-self: stretch;
|
|
11
|
+
gap: 0px;
|
|
12
|
+
justify-content: flex-start;
|
|
13
|
+
|
|
14
|
+
&[data-clickable="true"] {
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
[data-slot="basic-tool-tool-trigger-content"] {
|
|
19
|
+
flex: 0 1 auto;
|
|
20
|
+
width: auto;
|
|
21
|
+
max-width: calc(100% - 24px);
|
|
22
|
+
min-width: 0;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
align-self: stretch;
|
|
26
|
+
gap: 8px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[data-slot="basic-tool-tool-indicator"] {
|
|
30
|
+
width: 16px;
|
|
31
|
+
height: 16px;
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
|
|
37
|
+
[data-component="spinner"] {
|
|
38
|
+
width: 16px;
|
|
39
|
+
height: 16px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[data-slot="basic-tool-tool-spinner"] {
|
|
44
|
+
width: 16px;
|
|
45
|
+
height: 16px;
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
flex-shrink: 0;
|
|
50
|
+
color: var(--v2-text-text-faint);
|
|
51
|
+
|
|
52
|
+
[data-component="spinner"] {
|
|
53
|
+
width: 16px;
|
|
54
|
+
height: 16px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
[data-slot="icon-svg"] {
|
|
59
|
+
flex-shrink: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
[data-slot="basic-tool-tool-info"] {
|
|
63
|
+
flex: 0 1 auto;
|
|
64
|
+
min-width: 0;
|
|
65
|
+
max-width: 100%;
|
|
66
|
+
font-size: 13px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
[data-slot="basic-tool-tool-info-structured"] {
|
|
70
|
+
flex: 0 1 auto;
|
|
71
|
+
width: auto;
|
|
72
|
+
max-width: 100%;
|
|
73
|
+
min-width: 0;
|
|
74
|
+
display: inline-flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
gap: 8px;
|
|
77
|
+
justify-content: flex-start;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[data-slot="basic-tool-tool-info-main"] {
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: baseline;
|
|
83
|
+
gap: 8px;
|
|
84
|
+
min-width: 0;
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[data-slot="basic-tool-tool-title"] {
|
|
89
|
+
flex-shrink: 0;
|
|
90
|
+
font-family: var(--font-family-sans);
|
|
91
|
+
font-size: 13px;
|
|
92
|
+
font-style: normal;
|
|
93
|
+
font-weight: var(--font-weight-medium);
|
|
94
|
+
line-height: var(--line-height-compact);
|
|
95
|
+
letter-spacing: var(--letter-spacing-normal);
|
|
96
|
+
color: var(--v2-text-text-base);
|
|
97
|
+
|
|
98
|
+
&.capitalize {
|
|
99
|
+
text-transform: capitalize;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&.agent-title {
|
|
103
|
+
color: var(--v2-text-text-base);
|
|
104
|
+
font-weight: var(--font-weight-medium);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[data-slot="basic-tool-tool-subtitle"] {
|
|
109
|
+
flex-shrink: 1;
|
|
110
|
+
min-width: 0;
|
|
111
|
+
overflow: hidden;
|
|
112
|
+
text-overflow: ellipsis;
|
|
113
|
+
white-space: nowrap;
|
|
114
|
+
font-family: var(--font-family-sans);
|
|
115
|
+
font-variant-numeric: tabular-nums;
|
|
116
|
+
font-size: 13px;
|
|
117
|
+
font-style: normal;
|
|
118
|
+
font-weight: var(--font-weight-regular);
|
|
119
|
+
line-height: var(--line-height-compact);
|
|
120
|
+
letter-spacing: var(--letter-spacing-normal);
|
|
121
|
+
color: var(--v2-text-text-muted);
|
|
122
|
+
|
|
123
|
+
&.clickable:not(.webfetch-link) {
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
text-decoration: underline;
|
|
126
|
+
transition: color 0.15s ease;
|
|
127
|
+
|
|
128
|
+
&:hover {
|
|
129
|
+
color: var(--v2-text-text-muted);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&.subagent-link {
|
|
134
|
+
color: var(--v2-text-text-accent);
|
|
135
|
+
text-decoration: none;
|
|
136
|
+
text-underline-offset: 2px;
|
|
137
|
+
font-weight: var(--font-weight-regular);
|
|
138
|
+
|
|
139
|
+
&:visited {
|
|
140
|
+
color: var(--v2-text-text-accent);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&:hover {
|
|
144
|
+
color: var(--v2-text-text-accent-hover);
|
|
145
|
+
text-decoration: underline;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&:active {
|
|
149
|
+
color: var(--v2-text-text-accent);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
[data-slot="basic-tool-tool-arg"] {
|
|
155
|
+
flex-shrink: 1;
|
|
156
|
+
min-width: 0;
|
|
157
|
+
overflow: hidden;
|
|
158
|
+
text-overflow: ellipsis;
|
|
159
|
+
white-space: nowrap;
|
|
160
|
+
font-family: var(--font-family-sans);
|
|
161
|
+
font-variant-numeric: tabular-nums;
|
|
162
|
+
font-size: 13px;
|
|
163
|
+
font-style: normal;
|
|
164
|
+
font-weight: var(--font-weight-regular);
|
|
165
|
+
line-height: var(--line-height-compact);
|
|
166
|
+
letter-spacing: var(--letter-spacing-normal);
|
|
167
|
+
color: var(--v2-text-text-muted);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
[data-slot="basic-tool-tool-action"] {
|
|
171
|
+
display: inline-flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
flex-shrink: 0;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* The action sits on the trigger's line as a sibling, since buttons cannot nest inside the trigger button. */
|
|
178
|
+
[data-component="collapsible"].tool-collapsible[data-has-action="true"] {
|
|
179
|
+
flex-direction: row;
|
|
180
|
+
flex-wrap: wrap;
|
|
181
|
+
align-items: center;
|
|
182
|
+
column-gap: 2px;
|
|
183
|
+
|
|
184
|
+
> [data-slot="collapsible-trigger"] {
|
|
185
|
+
flex: 0 1 auto;
|
|
186
|
+
width: auto;
|
|
187
|
+
min-width: 0;
|
|
188
|
+
/* Leave room for the action so a long collapsed subtitle truncates instead of wrapping it. */
|
|
189
|
+
max-width: calc(100% - 26px);
|
|
190
|
+
|
|
191
|
+
/* The trigger now sizes to its content, so the content's room for the arrow would clip the title. */
|
|
192
|
+
[data-slot="basic-tool-tool-trigger-content"] {
|
|
193
|
+
max-width: none;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
> [data-slot="collapsible-content"] {
|
|
198
|
+
flex-basis: 100%;
|
|
199
|
+
/* In this row layout, unbreakable content would otherwise widen the content past the tool's width. */
|
|
200
|
+
min-width: 0;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
[data-slot="basic-tool-action"] {
|
|
205
|
+
display: inline-flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
flex-shrink: 0;
|
|
208
|
+
opacity: 0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* Reveal the action while the pointer is anywhere over the tool, including its expanded content. */
|
|
212
|
+
[data-component="collapsible"].tool-collapsible:hover > [data-slot="basic-tool-action"],
|
|
213
|
+
[data-slot="collapsible-trigger"]:focus-visible + [data-slot="basic-tool-action"],
|
|
214
|
+
[data-slot="basic-tool-action"]:hover,
|
|
215
|
+
[data-slot="basic-tool-action"]:focus-within {
|
|
216
|
+
opacity: 1;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@media (hover: none) {
|
|
220
|
+
[data-slot="basic-tool-action"] {
|
|
221
|
+
opacity: 1;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
[data-component="collapsible"].tool-collapsible[data-compact="true"] > [data-slot="collapsible-trigger"] {
|
|
226
|
+
height: 28px;
|
|
227
|
+
|
|
228
|
+
[data-slot="collapsible-arrow"] {
|
|
229
|
+
width: 16px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
[data-component="tool-trigger"],
|
|
233
|
+
[data-slot="basic-tool-tool-info-main"] {
|
|
234
|
+
gap: 6px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
[data-slot="basic-tool-tool-title"] {
|
|
238
|
+
font-family: var(--v2-font-family-sans);
|
|
239
|
+
font-size: 13px;
|
|
240
|
+
font-weight: 530;
|
|
241
|
+
/* Keep compact text on the shared metric; solid 13px line boxes clip Inter descenders. */
|
|
242
|
+
line-height: var(--line-height-compact);
|
|
243
|
+
letter-spacing: -0.04px;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
[data-slot="basic-tool-tool-subtitle"] {
|
|
247
|
+
font-family: var(--v2-font-family-sans);
|
|
248
|
+
font-size: 13px;
|
|
249
|
+
font-weight: 440;
|
|
250
|
+
line-height: var(--line-height-compact);
|
|
251
|
+
letter-spacing: -0.04px;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
[data-component="task-tool-card"] {
|
|
256
|
+
width: 100%;
|
|
257
|
+
min-width: 0;
|
|
258
|
+
display: flex;
|
|
259
|
+
align-items: center;
|
|
260
|
+
gap: 8px;
|
|
261
|
+
padding: 8px 12px;
|
|
262
|
+
border-radius: 6px;
|
|
263
|
+
border: 0.5px solid var(--v2-border-border-base);
|
|
264
|
+
background: color-mix(in srgb, var(--background-base) 92%, transparent);
|
|
265
|
+
transition:
|
|
266
|
+
border-color 0.15s ease,
|
|
267
|
+
background-color 0.15s ease,
|
|
268
|
+
color 0.15s ease;
|
|
269
|
+
|
|
270
|
+
[data-component="task-tool-surface"] {
|
|
271
|
+
display: flex;
|
|
272
|
+
align-items: center;
|
|
273
|
+
gap: 8px;
|
|
274
|
+
min-width: 0;
|
|
275
|
+
flex: 1 1 auto;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
[data-slot="basic-tool-tool-info-structured"] {
|
|
279
|
+
flex: 1 1 auto;
|
|
280
|
+
min-width: 0;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
[data-slot="basic-tool-tool-info-main"] {
|
|
284
|
+
flex: 1 1 auto;
|
|
285
|
+
min-width: 0;
|
|
286
|
+
align-items: center;
|
|
287
|
+
gap: 8px;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
[data-component="task-tool-action"] {
|
|
291
|
+
display: inline-flex;
|
|
292
|
+
align-items: center;
|
|
293
|
+
justify-content: center;
|
|
294
|
+
width: 0;
|
|
295
|
+
overflow: hidden;
|
|
296
|
+
flex-shrink: 0;
|
|
297
|
+
color: var(--v2-text-text-faint);
|
|
298
|
+
margin-inline-start: 0;
|
|
299
|
+
opacity: 0;
|
|
300
|
+
transform: translateX(-4px);
|
|
301
|
+
transition:
|
|
302
|
+
width 0.15s ease,
|
|
303
|
+
margin-inline-start 0.15s ease,
|
|
304
|
+
opacity 0.15s ease,
|
|
305
|
+
color 0.15s ease,
|
|
306
|
+
transform 0.15s ease;
|
|
307
|
+
|
|
308
|
+
:dir(rtl) & {
|
|
309
|
+
transform: translateX(4px);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
@media (hover: none) {
|
|
313
|
+
width: 16px;
|
|
314
|
+
margin-inline-start: 2px;
|
|
315
|
+
opacity: 1;
|
|
316
|
+
transform: none;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
:root[data-motion="reduce"] & {
|
|
320
|
+
transition: none;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
[data-component="task-tool-title"] {
|
|
325
|
+
flex-shrink: 0;
|
|
326
|
+
font-family: var(--font-family-sans);
|
|
327
|
+
font-size: 13px;
|
|
328
|
+
font-style: normal;
|
|
329
|
+
font-weight: var(--font-weight-medium);
|
|
330
|
+
line-height: var(--line-height-compact);
|
|
331
|
+
letter-spacing: var(--letter-spacing-normal);
|
|
332
|
+
text-transform: capitalize;
|
|
333
|
+
color: var(--v2-text-text-base);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
[data-slot="basic-tool-tool-subtitle"] {
|
|
337
|
+
color: var(--v2-text-text-base);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
&:hover,
|
|
341
|
+
&:focus-visible {
|
|
342
|
+
border-color: var(--v2-border-border-strong);
|
|
343
|
+
background: color-mix(in srgb, var(--background-stronger) 88%, transparent);
|
|
344
|
+
|
|
345
|
+
[data-component="task-tool-action"] {
|
|
346
|
+
width: 16px;
|
|
347
|
+
margin-inline-start: 2px;
|
|
348
|
+
opacity: 1;
|
|
349
|
+
transform: none;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
[data-component="collapsible"].tool-collapsible:not([data-rail="false"]) {
|
|
355
|
+
> [data-slot="collapsible-content"] {
|
|
356
|
+
padding-inline-start: 12px;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
:root body {
|
|
361
|
+
[data-component="task-tool-card"] {
|
|
362
|
+
gap: 8px;
|
|
363
|
+
padding: 0;
|
|
364
|
+
border-radius: 0;
|
|
365
|
+
border: 0;
|
|
366
|
+
border-color: transparent;
|
|
367
|
+
background: transparent;
|
|
368
|
+
box-shadow: none;
|
|
369
|
+
|
|
370
|
+
[data-component="task-tool-surface"] {
|
|
371
|
+
padding: 8px 12px;
|
|
372
|
+
gap: 0;
|
|
373
|
+
border-radius: 8px;
|
|
374
|
+
background: var(--v2-background-bg-layer-02);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
[data-component="task-tool-title"] {
|
|
378
|
+
height: 20px;
|
|
379
|
+
font-family: var(--v2-font-family-sans, "Inter", sans-serif);
|
|
380
|
+
font-style: normal;
|
|
381
|
+
font-weight: 530;
|
|
382
|
+
font-size: 13px;
|
|
383
|
+
line-height: 20px;
|
|
384
|
+
letter-spacing: -0.04px;
|
|
385
|
+
color: var(--v2-text-text-base);
|
|
386
|
+
flex: none;
|
|
387
|
+
flex-grow: 0;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
[data-slot="basic-tool-tool-subtitle"] {
|
|
391
|
+
font-family: var(--v2-font-family-sans, "Inter", sans-serif);
|
|
392
|
+
font-style: normal;
|
|
393
|
+
font-weight: 440;
|
|
394
|
+
font-size: 13px;
|
|
395
|
+
line-height: 20px;
|
|
396
|
+
letter-spacing: -0.04px;
|
|
397
|
+
color: var(--v2-text-text-base);
|
|
398
|
+
font-variation-settings: "slnt" 0;
|
|
399
|
+
flex: none;
|
|
400
|
+
flex-grow: 0;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
&:hover,
|
|
404
|
+
&:focus-visible {
|
|
405
|
+
border-color: transparent;
|
|
406
|
+
background: transparent;
|
|
407
|
+
|
|
408
|
+
[data-component="task-tool-surface"] {
|
|
409
|
+
background: var(--v2-background-bg-layer-02);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.webfetch-link,
|
|
416
|
+
[data-slot="basic-tool-tool-subtitle"].webfetch-link,
|
|
417
|
+
[data-slot="exa-tool-link"].webfetch-link,
|
|
418
|
+
[data-component="tool-trigger"] [data-slot="basic-tool-tool-subtitle"].webfetch-link {
|
|
419
|
+
display: inline-flex;
|
|
420
|
+
align-items: center;
|
|
421
|
+
gap: 8px;
|
|
422
|
+
color: var(--v2-text-text-accent);
|
|
423
|
+
text-decoration: none;
|
|
424
|
+
overflow: visible;
|
|
425
|
+
max-width: 100%;
|
|
426
|
+
font-family: var(--font-family-sans);
|
|
427
|
+
font-variant-numeric: tabular-nums;
|
|
428
|
+
font-size: inherit;
|
|
429
|
+
font-style: normal;
|
|
430
|
+
font-weight: var(--font-weight-regular, 440);
|
|
431
|
+
line-height: inherit;
|
|
432
|
+
letter-spacing: var(--letter-spacing-normal);
|
|
433
|
+
|
|
434
|
+
&:visited,
|
|
435
|
+
&:active {
|
|
436
|
+
color: var(--v2-text-text-accent);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
[data-slot="webfetch-link-text"] {
|
|
440
|
+
text-decoration: none;
|
|
441
|
+
overflow: hidden;
|
|
442
|
+
text-overflow: ellipsis;
|
|
443
|
+
white-space: nowrap;
|
|
444
|
+
line-height: inherit;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.webfetch-link-icon {
|
|
448
|
+
display: inline-flex;
|
|
449
|
+
width: 16px;
|
|
450
|
+
height: 16px;
|
|
451
|
+
flex-shrink: 0;
|
|
452
|
+
color: var(--v2-icon-icon-accent, var(--v2-text-text-accent));
|
|
453
|
+
|
|
454
|
+
@media (hover: hover) {
|
|
455
|
+
display: none;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
&:hover {
|
|
460
|
+
color: var(--v2-text-text-accent);
|
|
461
|
+
text-decoration: none;
|
|
462
|
+
|
|
463
|
+
[data-slot="webfetch-link-text"] {
|
|
464
|
+
text-decoration: underline;
|
|
465
|
+
text-underline-offset: 2px;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.webfetch-link-icon {
|
|
469
|
+
display: inline-flex;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
&:focus-visible {
|
|
474
|
+
outline: 2px solid var(--v2-border-border-focus);
|
|
475
|
+
outline-offset: 2px;
|
|
476
|
+
border-radius: 4px;
|
|
477
|
+
|
|
478
|
+
[data-slot="webfetch-link-text"] {
|
|
479
|
+
text-decoration: underline;
|
|
480
|
+
text-underline-offset: 2px;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.webfetch-link-icon {
|
|
484
|
+
display: inline-flex;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|