@zyro-sec/session-ui 0.0.0-stage → 1.0.4
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,282 @@
|
|
|
1
|
+
[data-component="session-turn"] {
|
|
2
|
+
--sticky-header-height: calc(var(--session-title-height, 0px) + 24px);
|
|
3
|
+
height: 100%;
|
|
4
|
+
min-height: 0;
|
|
5
|
+
min-width: 0;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: flex-start;
|
|
8
|
+
justify-content: flex-start;
|
|
9
|
+
|
|
10
|
+
[data-slot="session-turn-content"] {
|
|
11
|
+
flex-grow: 1;
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
min-width: 0;
|
|
15
|
+
overflow-y: auto;
|
|
16
|
+
scrollbar-width: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
[data-slot="session-turn-content"]::-webkit-scrollbar {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
[data-slot="session-turn-message-container"] {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
align-items: flex-start;
|
|
27
|
+
align-self: stretch;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
gap: 0px;
|
|
30
|
+
overflow-anchor: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
[data-slot="session-turn-message-content"] {
|
|
34
|
+
margin-top: 0;
|
|
35
|
+
width: 100%;
|
|
36
|
+
min-width: 0;
|
|
37
|
+
max-width: 100%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[data-slot="session-turn-compaction"] {
|
|
41
|
+
width: 100%;
|
|
42
|
+
min-width: 0;
|
|
43
|
+
align-self: stretch;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[data-slot="session-turn-thinking-row"] {
|
|
47
|
+
width: 100%;
|
|
48
|
+
margin-top: 12px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[data-slot="session-turn-thinking"] {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: 8px;
|
|
55
|
+
width: 100%;
|
|
56
|
+
min-width: 0;
|
|
57
|
+
color: var(--v2-text-text-faint);
|
|
58
|
+
font-family: var(--font-family-sans);
|
|
59
|
+
font-size: var(--font-size-base);
|
|
60
|
+
font-weight: var(--font-weight-medium);
|
|
61
|
+
line-height: 20px;
|
|
62
|
+
min-height: 20px;
|
|
63
|
+
|
|
64
|
+
[data-component="spinner"] {
|
|
65
|
+
width: 16px;
|
|
66
|
+
height: 16px;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
[data-component="text-reveal"].session-turn-thinking-heading {
|
|
71
|
+
flex: 1 1 auto;
|
|
72
|
+
min-width: 0;
|
|
73
|
+
color: var(--v2-text-text-faint);
|
|
74
|
+
font-weight: var(--font-weight-regular);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.error-card {
|
|
78
|
+
color: var(--v2-text-text-base);
|
|
79
|
+
max-height: 240px;
|
|
80
|
+
white-space: pre-wrap;
|
|
81
|
+
overflow-wrap: anywhere;
|
|
82
|
+
word-break: break-word;
|
|
83
|
+
overflow-y: auto;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
[data-component="card"]:is([data-kind="session-retry-card"], [data-kind="session-error-card"]) {
|
|
87
|
+
font-size: 13px;
|
|
88
|
+
line-height: var(--line-height-compact);
|
|
89
|
+
letter-spacing: -0.04px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[data-component="card"][data-kind="session-retry-card"] {
|
|
93
|
+
--card-pad-l: 0px;
|
|
94
|
+
--card-pad-r: 0px;
|
|
95
|
+
|
|
96
|
+
&::before {
|
|
97
|
+
display: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[data-slot="session-turn-retry-message"] {
|
|
101
|
+
min-width: 0;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
text-overflow: ellipsis;
|
|
104
|
+
white-space: nowrap;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
[data-slot="session-turn-retry-info"] {
|
|
108
|
+
margin-top: 4px;
|
|
109
|
+
color: var(--v2-text-text-faint);
|
|
110
|
+
font-family: var(--v2-font-family-sans);
|
|
111
|
+
font-size: 13px;
|
|
112
|
+
font-weight: 440;
|
|
113
|
+
line-height: var(--line-height-compact);
|
|
114
|
+
letter-spacing: -0.04px;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
[data-component="card"][data-kind="session-error-card"] {
|
|
119
|
+
--card-pad-y: 0px;
|
|
120
|
+
--card-pad-l: 0px;
|
|
121
|
+
--card-pad-r: 0px;
|
|
122
|
+
|
|
123
|
+
&::before {
|
|
124
|
+
display: none;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
[data-slot="session-turn-assistant-content"] {
|
|
129
|
+
width: 100%;
|
|
130
|
+
min-width: 0;
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
align-self: stretch;
|
|
134
|
+
gap: 12px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
[data-slot="session-turn-diffs"] {
|
|
138
|
+
width: 100%;
|
|
139
|
+
min-width: 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
[data-slot="session-turn-diffs-header"] {
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
gap: 8px;
|
|
146
|
+
padding-top: 4px;
|
|
147
|
+
padding-bottom: 12px;
|
|
148
|
+
position: sticky;
|
|
149
|
+
top: var(--sticky-accordion-top, 0px);
|
|
150
|
+
z-index: 20;
|
|
151
|
+
background-color: var(--v2-background-bg-base);
|
|
152
|
+
height: 44px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
[data-slot="session-turn-diffs-label"] {
|
|
156
|
+
font-variant-numeric: tabular-nums;
|
|
157
|
+
color: var(--v2-text-text-base);
|
|
158
|
+
font-family: var(--font-family-sans);
|
|
159
|
+
font-size: var(--font-size-base);
|
|
160
|
+
font-weight: var(--font-weight-medium);
|
|
161
|
+
line-height: var(--line-height-large);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
[data-slot="session-turn-diffs-toggle"] {
|
|
165
|
+
color: var(--v2-text-text-accent);
|
|
166
|
+
font-family: var(--font-family-sans);
|
|
167
|
+
font-size: var(--font-size-base);
|
|
168
|
+
font-weight: var(--font-weight-regular);
|
|
169
|
+
line-height: var(--line-height-large);
|
|
170
|
+
cursor: pointer;
|
|
171
|
+
transition: opacity 0.15s ease;
|
|
172
|
+
margin-left: 4px;
|
|
173
|
+
|
|
174
|
+
@media (hover: hover) {
|
|
175
|
+
opacity: 0;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
[data-component="session-turn-diffs-group"]:hover [data-slot="session-turn-diffs-toggle"] {
|
|
180
|
+
opacity: 1;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
[data-component="session-turn-diffs-group"][data-show-all] [data-slot="session-turn-diffs-toggle"] {
|
|
184
|
+
opacity: 1;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
[data-slot="session-turn-diffs-more"] {
|
|
188
|
+
color: var(--v2-text-text-faint);
|
|
189
|
+
font-family: var(--font-family-sans);
|
|
190
|
+
font-size: var(--font-size-small);
|
|
191
|
+
line-height: var(--line-height-large);
|
|
192
|
+
margin-top: 12px;
|
|
193
|
+
padding: 0 0 6px;
|
|
194
|
+
cursor: pointer;
|
|
195
|
+
transition: color 0.15s ease;
|
|
196
|
+
|
|
197
|
+
&:hover {
|
|
198
|
+
color: var(--v2-text-text-accent-hover);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
[data-component="session-turn-diffs-content"] {
|
|
203
|
+
padding-top: 0px;
|
|
204
|
+
display: flex;
|
|
205
|
+
flex-direction: column;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
[data-slot="session-turn-diff-trigger"] {
|
|
209
|
+
display: flex;
|
|
210
|
+
align-items: center;
|
|
211
|
+
justify-content: space-between;
|
|
212
|
+
gap: 12px;
|
|
213
|
+
width: 100%;
|
|
214
|
+
min-width: 0;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
[data-slot="session-turn-diff-path"] {
|
|
218
|
+
display: flex;
|
|
219
|
+
flex-grow: 1;
|
|
220
|
+
min-width: 0;
|
|
221
|
+
direction: ltr;
|
|
222
|
+
unicode-bidi: isolate;
|
|
223
|
+
|
|
224
|
+
font-family: var(--font-family-sans);
|
|
225
|
+
font-size: var(--font-size-small);
|
|
226
|
+
line-height: var(--line-height-large);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
[data-slot="session-turn-diff-directory"] {
|
|
230
|
+
color: var(--v2-text-text-muted);
|
|
231
|
+
overflow: hidden;
|
|
232
|
+
text-overflow: ellipsis;
|
|
233
|
+
white-space: nowrap;
|
|
234
|
+
direction: rtl;
|
|
235
|
+
text-align: left;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
[data-slot="session-turn-diff-filename"] {
|
|
239
|
+
min-width: 0;
|
|
240
|
+
color: var(--v2-text-text-base);
|
|
241
|
+
font-weight: var(--font-weight-medium);
|
|
242
|
+
overflow: hidden;
|
|
243
|
+
text-overflow: ellipsis;
|
|
244
|
+
white-space: nowrap;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
[data-slot="session-turn-diff-meta"] {
|
|
248
|
+
flex-shrink: 0;
|
|
249
|
+
display: inline-flex;
|
|
250
|
+
align-items: center;
|
|
251
|
+
gap: 10px;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
[data-slot="session-turn-diff-chevron"] {
|
|
255
|
+
display: inline-flex;
|
|
256
|
+
color: var(--icon-weaker);
|
|
257
|
+
transform: rotate(-90deg);
|
|
258
|
+
transition: transform 0.15s ease;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
[data-slot="accordion-item"][data-expanded] [data-slot="session-turn-diff-chevron"] {
|
|
262
|
+
transform: rotate(0deg);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
[data-slot="session-turn-diff-view"] {
|
|
266
|
+
background-color: var(--surface-inset-base);
|
|
267
|
+
width: 100%;
|
|
268
|
+
min-width: 0;
|
|
269
|
+
overflow-y: auto;
|
|
270
|
+
overflow-x: hidden;
|
|
271
|
+
scrollbar-width: none;
|
|
272
|
+
-ms-overflow-style: none;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
[data-slot="session-turn-diff-view"]::-webkit-scrollbar {
|
|
276
|
+
display: none;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
[data-slot="session-turn-list"] {
|
|
281
|
+
gap: 24px;
|
|
282
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[data-component="shell-submessage"] {
|
|
2
|
+
min-width: 0;
|
|
3
|
+
max-width: 100%;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: baseline;
|
|
6
|
+
vertical-align: baseline;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
[data-component="shell-submessage"] [data-slot="shell-submessage-width"] {
|
|
10
|
+
min-width: 0;
|
|
11
|
+
max-width: 100%;
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
align-items: baseline;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
[data-component="shell-submessage"] [data-slot="shell-submessage-value"] {
|
|
18
|
+
display: inline-block;
|
|
19
|
+
vertical-align: baseline;
|
|
20
|
+
min-width: 0;
|
|
21
|
+
font-family: var(--v2-font-family-code);
|
|
22
|
+
line-height: inherit;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ProviderIcon } from "@zyro-sec/ui/provider-icon"
|
|
2
|
+
import { Tooltip } from "@zyro-sec/ui/tooltip"
|
|
3
|
+
import { Show } from "solid-js"
|
|
4
|
+
|
|
5
|
+
export function TimelineSeparator(props: {
|
|
6
|
+
label: string
|
|
7
|
+
value?: string
|
|
8
|
+
tooltip?: string
|
|
9
|
+
providerID?: string
|
|
10
|
+
variant?: string
|
|
11
|
+
}) {
|
|
12
|
+
const label = () => (
|
|
13
|
+
<bdi
|
|
14
|
+
data-slot="session-timeline-notice-label"
|
|
15
|
+
dir="auto"
|
|
16
|
+
class="block truncate"
|
|
17
|
+
classList={{ "shrink-0": !!props.value }}
|
|
18
|
+
title={props.tooltip ? undefined : props.label}
|
|
19
|
+
>
|
|
20
|
+
{props.label}
|
|
21
|
+
</bdi>
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<div class="flex h-8 w-full items-center gap-3 text-v2-text-text-faint">
|
|
26
|
+
<span class="h-px min-w-0 flex-1 bg-v2-border-border-muted" />
|
|
27
|
+
<span class="flex min-w-0 items-center gap-1 text-[13px] font-[440] leading-text-compact tracking-[-0.04px]">
|
|
28
|
+
<Show when={props.providerID}>
|
|
29
|
+
{(providerID) => <ProviderIcon id={providerID()} class="text-v2-icon-icon-faint" aria-hidden="true" />}
|
|
30
|
+
</Show>
|
|
31
|
+
<span class="flex min-w-0 items-center gap-1.5">
|
|
32
|
+
<Show when={props.tooltip} fallback={label()}>
|
|
33
|
+
{(tooltip) => (
|
|
34
|
+
<Tooltip
|
|
35
|
+
appearance="compact"
|
|
36
|
+
placement="top"
|
|
37
|
+
value={tooltip()}
|
|
38
|
+
class={props.value ? "min-w-0 shrink-0" : "min-w-0"}
|
|
39
|
+
triggerTabIndex={0}
|
|
40
|
+
>
|
|
41
|
+
{label()}
|
|
42
|
+
</Tooltip>
|
|
43
|
+
)}
|
|
44
|
+
</Show>
|
|
45
|
+
<Show when={props.value}>
|
|
46
|
+
{(value) => (
|
|
47
|
+
<bdi data-slot="session-timeline-notice-value" dir="ltr" class="min-w-0 truncate" title={value()}>
|
|
48
|
+
{value()}
|
|
49
|
+
</bdi>
|
|
50
|
+
)}
|
|
51
|
+
</Show>
|
|
52
|
+
<Show when={props.variant && props.variant !== "default" ? props.variant : undefined}>
|
|
53
|
+
{(variant) => (
|
|
54
|
+
<>
|
|
55
|
+
<span class="flex size-1.5 shrink-0 items-center justify-center" aria-hidden="true">
|
|
56
|
+
<span class="size-[2.25px] rounded-full bg-current" />
|
|
57
|
+
</span>
|
|
58
|
+
<span data-slot="session-timeline-notice-variant" class="shrink-0 capitalize">
|
|
59
|
+
{variant()}
|
|
60
|
+
</span>
|
|
61
|
+
</>
|
|
62
|
+
)}
|
|
63
|
+
</Show>
|
|
64
|
+
</span>
|
|
65
|
+
</span>
|
|
66
|
+
<span class="h-px min-w-0 flex-1 bg-v2-border-border-muted" />
|
|
67
|
+
</div>
|
|
68
|
+
)
|
|
69
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[data-component="tool-count-label"] {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: baseline;
|
|
4
|
+
white-space: nowrap;
|
|
5
|
+
gap: 0;
|
|
6
|
+
|
|
7
|
+
[data-slot="tool-count-label-before"] {
|
|
8
|
+
display: inline-block;
|
|
9
|
+
white-space: pre;
|
|
10
|
+
line-height: inherit;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-slot="tool-count-label-word"] {
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: baseline;
|
|
16
|
+
white-space: pre;
|
|
17
|
+
line-height: inherit;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
[data-slot="tool-count-label-stem"] {
|
|
21
|
+
display: inline-block;
|
|
22
|
+
white-space: pre;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[data-slot="tool-count-label-suffix"] {
|
|
26
|
+
display: inline-grid;
|
|
27
|
+
grid-template-columns: 0fr;
|
|
28
|
+
opacity: 0;
|
|
29
|
+
filter: blur(calc(var(--tool-motion-blur, 2px) * 0.42));
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
transform: translateX(-0.04em);
|
|
32
|
+
transition-property: grid-template-columns, opacity, filter, transform;
|
|
33
|
+
transition-duration: 250ms, 250ms, 250ms, 250ms;
|
|
34
|
+
transition-timing-function:
|
|
35
|
+
var(--tool-motion-ease, cubic-bezier(0.22, 1, 0.36, 1)), ease-out, ease-out,
|
|
36
|
+
var(--tool-motion-ease, cubic-bezier(0.22, 1, 0.36, 1));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
[data-slot="tool-count-label-suffix"][data-active="true"] {
|
|
40
|
+
grid-template-columns: 1fr;
|
|
41
|
+
opacity: 1;
|
|
42
|
+
filter: blur(0);
|
|
43
|
+
transform: translateX(0);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[data-slot="tool-count-label-suffix-inner"] {
|
|
47
|
+
min-width: 0;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
white-space: pre;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:root[data-motion="reduce"] {
|
|
54
|
+
[data-component="tool-count-label"] [data-slot="tool-count-label-suffix"] {
|
|
55
|
+
transition-duration: 0ms;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { createMemo } from "solid-js"
|
|
2
|
+
import { AnimatedNumber } from "@zyro-sec/ui/animated-number"
|
|
3
|
+
import { pluralCategory, pluralKey, useI18n, type UiI18nPluralKey } from "@zyro-sec/ui/context/i18n"
|
|
4
|
+
|
|
5
|
+
function split(text: string) {
|
|
6
|
+
const match = /{{\s*count\s*}}/.exec(text)
|
|
7
|
+
|
|
8
|
+
if (!match) return { before: "", after: text }
|
|
9
|
+
|
|
10
|
+
if (match.index === undefined) return { before: "", after: text }
|
|
11
|
+
|
|
12
|
+
return {
|
|
13
|
+
before: text.slice(0, match.index),
|
|
14
|
+
after: text.slice(match.index + match[0].length),
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function common(one: string, other: string) {
|
|
19
|
+
const a = Array.from(one)
|
|
20
|
+
const b = Array.from(other)
|
|
21
|
+
let i = 0
|
|
22
|
+
|
|
23
|
+
while (i < a.length && i < b.length && a[i] === b[i]) i++
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
stem: a.slice(0, i).join(""),
|
|
27
|
+
one: a.slice(i).join(""),
|
|
28
|
+
other: b.slice(i).join(""),
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function AnimatedCountLabel(props: { count: number; plural: UiI18nPluralKey; class?: string }) {
|
|
33
|
+
const i18n = useI18n()
|
|
34
|
+
const category = createMemo(() => pluralCategory(i18n.locale(), Math.round(props.count)))
|
|
35
|
+
|
|
36
|
+
const form = (category: ReturnType<typeof pluralCategory>) =>
|
|
37
|
+
i18n.pluralForm?.(props.plural, category) ?? (i18n.t as (key: string) => string)(pluralKey(props.plural, category))
|
|
38
|
+
|
|
39
|
+
const one = createMemo(() => split(form("one")))
|
|
40
|
+
const other = createMemo(() => split(form("other")))
|
|
41
|
+
const active = createMemo(() => split(form(category())))
|
|
42
|
+
const suffix = createMemo(() => common(one().after, other().after))
|
|
43
|
+
|
|
44
|
+
const splitSuffix = createMemo(
|
|
45
|
+
() =>
|
|
46
|
+
(category() === "one" || category() === "other") &&
|
|
47
|
+
one().before === other().before &&
|
|
48
|
+
(one().after.startsWith(other().after) || other().after.startsWith(one().after)),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
const before = createMemo(() => (splitSuffix() ? one().before : active().before))
|
|
52
|
+
const stem = createMemo(() => (splitSuffix() ? suffix().stem : active().after))
|
|
53
|
+
|
|
54
|
+
const tail = createMemo(() => {
|
|
55
|
+
if (!splitSuffix()) return ""
|
|
56
|
+
|
|
57
|
+
if (category() === "one") return suffix().one
|
|
58
|
+
|
|
59
|
+
return suffix().other
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
const showTail = createMemo(() => splitSuffix() && tail().length > 0)
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<span data-component="tool-count-label" class={props.class}>
|
|
66
|
+
<span data-slot="tool-count-label-before">{before()}</span>
|
|
67
|
+
<AnimatedNumber value={props.count} />
|
|
68
|
+
<span data-slot="tool-count-label-word">
|
|
69
|
+
<span data-slot="tool-count-label-stem">{stem()}</span>
|
|
70
|
+
<span data-slot="tool-count-label-suffix" data-active={showTail() ? "true" : "false"}>
|
|
71
|
+
<span data-slot="tool-count-label-suffix-inner">{tail()}</span>
|
|
72
|
+
</span>
|
|
73
|
+
</span>
|
|
74
|
+
</span>
|
|
75
|
+
)
|
|
76
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
[data-component="tool-count-summary"] {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: baseline;
|
|
4
|
+
white-space: nowrap;
|
|
5
|
+
|
|
6
|
+
[data-slot="tool-count-summary-empty"] {
|
|
7
|
+
display: inline-grid;
|
|
8
|
+
grid-template-columns: 1fr;
|
|
9
|
+
align-items: baseline;
|
|
10
|
+
opacity: 1;
|
|
11
|
+
filter: blur(0);
|
|
12
|
+
transform: translateY(0) scale(1);
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
transform-origin: left center;
|
|
15
|
+
transition-property: grid-template-columns, opacity, filter, transform;
|
|
16
|
+
transition-duration:
|
|
17
|
+
var(--tool-motion-spring-ms, 480ms), var(--tool-motion-fade-ms, 240ms), var(--tool-motion-fade-ms, 280ms),
|
|
18
|
+
var(--tool-motion-spring-ms, 480ms);
|
|
19
|
+
transition-timing-function:
|
|
20
|
+
var(--tool-motion-ease, cubic-bezier(0.22, 1, 0.36, 1)), ease-out, ease-out,
|
|
21
|
+
var(--tool-motion-ease, cubic-bezier(0.22, 1, 0.36, 1));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[data-slot="tool-count-summary-empty"][data-active="false"] {
|
|
25
|
+
grid-template-columns: 0fr;
|
|
26
|
+
opacity: 0;
|
|
27
|
+
filter: blur(calc(var(--tool-motion-blur, 2px) * 0.72));
|
|
28
|
+
transform: translateY(0.05em) scale(0.985);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[data-slot="tool-count-summary-item"] {
|
|
32
|
+
display: inline-grid;
|
|
33
|
+
grid-template-columns: 0fr;
|
|
34
|
+
align-items: baseline;
|
|
35
|
+
opacity: 0;
|
|
36
|
+
filter: blur(var(--tool-motion-blur, 2px));
|
|
37
|
+
transform: translateY(0.06em) scale(0.985);
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
transform-origin: left center;
|
|
40
|
+
transition-property: grid-template-columns, opacity, filter, transform;
|
|
41
|
+
transition-duration:
|
|
42
|
+
var(--tool-motion-spring-ms, 480ms), var(--tool-motion-fade-ms, 280ms), var(--tool-motion-fade-ms, 320ms),
|
|
43
|
+
var(--tool-motion-spring-ms, 480ms);
|
|
44
|
+
transition-timing-function:
|
|
45
|
+
var(--tool-motion-ease, cubic-bezier(0.22, 1, 0.36, 1)), ease-out, ease-out,
|
|
46
|
+
var(--tool-motion-ease, cubic-bezier(0.22, 1, 0.36, 1));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
[data-slot="tool-count-summary-item"][data-active="true"] {
|
|
50
|
+
grid-template-columns: 1fr;
|
|
51
|
+
opacity: 1;
|
|
52
|
+
filter: blur(0);
|
|
53
|
+
transform: translateY(0) scale(1);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[data-slot="tool-count-summary-empty-inner"] {
|
|
57
|
+
min-width: 0;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
white-space: nowrap;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
[data-slot="tool-count-summary-item-inner"] {
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
align-items: baseline;
|
|
65
|
+
min-width: 0;
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
white-space: nowrap;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
[data-slot="tool-count-summary-prefix"] {
|
|
71
|
+
display: inline-flex;
|
|
72
|
+
align-items: baseline;
|
|
73
|
+
justify-content: flex-start;
|
|
74
|
+
max-width: 0;
|
|
75
|
+
margin-right: 0;
|
|
76
|
+
opacity: 0;
|
|
77
|
+
filter: blur(calc(var(--tool-motion-blur, 2px) * 0.55));
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
transform: translateX(-0.08em);
|
|
80
|
+
transition-property: opacity, filter, transform;
|
|
81
|
+
transition-duration:
|
|
82
|
+
calc(var(--tool-motion-fade-ms, 200ms) * 0.75), calc(var(--tool-motion-fade-ms, 220ms) * 0.75),
|
|
83
|
+
calc(var(--tool-motion-fade-ms, 220ms) * 0.6);
|
|
84
|
+
transition-timing-function: ease-out, ease-out, ease-out;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
[data-slot="tool-count-summary-prefix"][data-active="true"] {
|
|
88
|
+
max-width: 1ch;
|
|
89
|
+
margin-right: 0.45ch;
|
|
90
|
+
opacity: 1;
|
|
91
|
+
filter: blur(0);
|
|
92
|
+
transform: translateX(0);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:root[data-motion="reduce"] {
|
|
97
|
+
[data-component="tool-count-summary"] [data-slot="tool-count-summary-empty"],
|
|
98
|
+
[data-component="tool-count-summary"] [data-slot="tool-count-summary-item"],
|
|
99
|
+
[data-component="tool-count-summary"] [data-slot="tool-count-summary-prefix"] {
|
|
100
|
+
transition-duration: 0ms;
|
|
101
|
+
}
|
|
102
|
+
}
|