@neurocode-ai/session-ui 1.18.8

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.
Files changed (114) hide show
  1. package/package.json +71 -0
  2. package/src/components/apply-patch-file.test.ts +43 -0
  3. package/src/components/apply-patch-file.ts +78 -0
  4. package/src/components/basic-tool.css +358 -0
  5. package/src/components/basic-tool.stories.tsx +133 -0
  6. package/src/components/basic-tool.tsx +343 -0
  7. package/src/components/dock-prompt.stories.tsx +62 -0
  8. package/src/components/dock-prompt.tsx +23 -0
  9. package/src/components/file-media.tsx +291 -0
  10. package/src/components/file-search.tsx +72 -0
  11. package/src/components/file-ssr.tsx +197 -0
  12. package/src/components/file.css +46 -0
  13. package/src/components/file.tsx +1202 -0
  14. package/src/components/line-comment-annotations.tsx +637 -0
  15. package/src/components/line-comment-styles.ts +292 -0
  16. package/src/components/line-comment.stories.tsx +115 -0
  17. package/src/components/line-comment.tsx +439 -0
  18. package/src/components/markdown-cache.tsx +78 -0
  19. package/src/components/markdown-code-state.test.ts +32 -0
  20. package/src/components/markdown-code-state.ts +22 -0
  21. package/src/components/markdown-inline-code-kind.test.ts +46 -0
  22. package/src/components/markdown-inline-code-kind.ts +1915 -0
  23. package/src/components/markdown-preload.test.ts +18 -0
  24. package/src/components/markdown-shiki.worker.ts +104 -0
  25. package/src/components/markdown-stream.test.ts +194 -0
  26. package/src/components/markdown-stream.ts +110 -0
  27. package/src/components/markdown-worker-protocol.test.ts +81 -0
  28. package/src/components/markdown-worker-protocol.ts +48 -0
  29. package/src/components/markdown-worker-queue.test.ts +49 -0
  30. package/src/components/markdown-worker-queue.ts +64 -0
  31. package/src/components/markdown-worker-transport.test.ts +56 -0
  32. package/src/components/markdown-worker-transport.ts +41 -0
  33. package/src/components/markdown-worker.ts +122 -0
  34. package/src/components/markdown.css +377 -0
  35. package/src/components/markdown.stories.tsx +53 -0
  36. package/src/components/markdown.tsx +678 -0
  37. package/src/components/message-file.test.ts +63 -0
  38. package/src/components/message-file.ts +34 -0
  39. package/src/components/message-nav.css +127 -0
  40. package/src/components/message-nav.stories.tsx +7 -0
  41. package/src/components/message-nav.tsx +102 -0
  42. package/src/components/message-part-text.ts +3 -0
  43. package/src/components/message-part.css +1569 -0
  44. package/src/components/message-part.stories.tsx +7 -0
  45. package/src/components/message-part.test.ts +28 -0
  46. package/src/components/message-part.tsx +2662 -0
  47. package/src/components/session-diff.test.ts +135 -0
  48. package/src/components/session-diff.ts +145 -0
  49. package/src/components/session-retry.tsx +74 -0
  50. package/src/components/session-review.css +247 -0
  51. package/src/components/session-review.stories.tsx +7 -0
  52. package/src/components/session-review.tsx +657 -0
  53. package/src/components/session-turn.css +241 -0
  54. package/src/components/session-turn.stories.tsx +7 -0
  55. package/src/components/session-turn.tsx +543 -0
  56. package/src/components/shell-submessage-motion.stories.tsx +346 -0
  57. package/src/components/shell-submessage.css +23 -0
  58. package/src/components/timeline-playground.stories.tsx +2090 -0
  59. package/src/components/tool-count-label.css +57 -0
  60. package/src/components/tool-count-label.tsx +58 -0
  61. package/src/components/tool-count-summary.css +102 -0
  62. package/src/components/tool-count-summary.stories.tsx +238 -0
  63. package/src/components/tool-count-summary.tsx +52 -0
  64. package/src/components/tool-error-card.css +91 -0
  65. package/src/components/tool-error-card.stories.tsx +92 -0
  66. package/src/components/tool-error-card.tsx +157 -0
  67. package/src/components/tool-status-title.css +89 -0
  68. package/src/components/tool-status-title.tsx +133 -0
  69. package/src/context/data.tsx +64 -0
  70. package/src/context/index.ts +1 -0
  71. package/src/pierre/comment-hover.ts +83 -0
  72. package/src/pierre/commented-lines.ts +91 -0
  73. package/src/pierre/diff-selection.ts +71 -0
  74. package/src/pierre/file-find.ts +485 -0
  75. package/src/pierre/file-runtime.ts +114 -0
  76. package/src/pierre/file-selection.ts +85 -0
  77. package/src/pierre/index.ts +186 -0
  78. package/src/pierre/media.ts +110 -0
  79. package/src/pierre/selection-bridge.ts +132 -0
  80. package/src/pierre/virtualizer.ts +100 -0
  81. package/src/pierre/worker.ts +52 -0
  82. package/src/styles/index.css +14 -0
  83. package/src/v2/components/attachment-card-v2.css +70 -0
  84. package/src/v2/components/attachment-card-v2.tsx +33 -0
  85. package/src/v2/components/basic-tool-v2.css +163 -0
  86. package/src/v2/components/basic-tool-v2.stories.tsx +137 -0
  87. package/src/v2/components/basic-tool-v2.tsx +139 -0
  88. package/src/v2/components/comment-card-v2.tsx +64 -0
  89. package/src/v2/components/line-comment-annotations-v2.tsx +220 -0
  90. package/src/v2/components/prompt-input/attachments.ts +266 -0
  91. package/src/v2/components/prompt-input/index.tsx +706 -0
  92. package/src/v2/components/prompt-input/interaction.ts +482 -0
  93. package/src/v2/components/prompt-input/machine.test.ts +164 -0
  94. package/src/v2/components/prompt-input/machine.ts +261 -0
  95. package/src/v2/components/prompt-input/prompt-input.stories.tsx +221 -0
  96. package/src/v2/components/prompt-input/store.test.ts +116 -0
  97. package/src/v2/components/prompt-input/store.ts +152 -0
  98. package/src/v2/components/prompt-input/types.ts +106 -0
  99. package/src/v2/components/session-file-panel-v2.tsx +43 -0
  100. package/src/v2/components/session-progress-indicator-v2.css +875 -0
  101. package/src/v2/components/session-progress-indicator-v2.stories.tsx +66 -0
  102. package/src/v2/components/session-progress-indicator-v2.tsx +32 -0
  103. package/src/v2/components/session-review-empty-changes-v2.tsx +17 -0
  104. package/src/v2/components/session-review-empty-no-git-v2.tsx +28 -0
  105. package/src/v2/components/session-review-file-preview-v2-virtualize.test.ts +13 -0
  106. package/src/v2/components/session-review-file-preview-v2-virtualize.ts +5 -0
  107. package/src/v2/components/session-review-file-preview-v2.tsx +290 -0
  108. package/src/v2/components/session-review-v2.css +458 -0
  109. package/src/v2/components/session-review-v2.tsx +340 -0
  110. package/src/v2/components/tool-error-card-v2.css +200 -0
  111. package/src/v2/components/tool-error-card-v2.stories.tsx +91 -0
  112. package/src/v2/components/tool-error-card-v2.tsx +166 -0
  113. package/sst-env.d.ts +10 -0
  114. package/tsconfig.json +19 -0
@@ -0,0 +1,241 @@
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"] {
47
+ display: flex;
48
+ align-items: center;
49
+ gap: 8px;
50
+ margin-top: 12px;
51
+ width: 100%;
52
+ min-width: 0;
53
+ color: var(--text-weak);
54
+ font-family: var(--font-family-sans);
55
+ font-size: var(--font-size-base);
56
+ font-weight: var(--font-weight-medium);
57
+ line-height: 20px;
58
+ min-height: 20px;
59
+
60
+ [data-component="spinner"] {
61
+ width: 16px;
62
+ height: 16px;
63
+ }
64
+ }
65
+
66
+ [data-component="text-reveal"].session-turn-thinking-heading {
67
+ flex: 1 1 auto;
68
+ min-width: 0;
69
+ color: var(--text-weaker);
70
+ font-weight: var(--font-weight-regular);
71
+ }
72
+
73
+ .error-card {
74
+ color: var(--v2-text-text-base);
75
+ max-height: 240px;
76
+ white-space: pre-wrap;
77
+ overflow-wrap: anywhere;
78
+ word-break: break-word;
79
+ overflow-y: auto;
80
+ }
81
+
82
+ [data-slot="session-turn-assistant-content"] {
83
+ width: 100%;
84
+ min-width: 0;
85
+ display: flex;
86
+ flex-direction: column;
87
+ align-self: stretch;
88
+ gap: 12px;
89
+ }
90
+
91
+ [data-slot="session-turn-diffs"] {
92
+ width: 100%;
93
+ min-width: 0;
94
+ }
95
+
96
+ [data-slot="session-turn-diffs-header"] {
97
+ display: flex;
98
+ align-items: center;
99
+ gap: 8px;
100
+ padding-top: 4px;
101
+ padding-bottom: 12px;
102
+ position: sticky;
103
+ top: var(--sticky-accordion-top, 0px);
104
+ z-index: 20;
105
+ background-color: var(--v2-background-bg-base);
106
+ height: 44px;
107
+ }
108
+
109
+ [data-slot="session-turn-diffs-label"] {
110
+ font-variant-numeric: tabular-nums;
111
+ color: var(--text-strong);
112
+ font-family: var(--font-family-sans);
113
+ font-size: var(--font-size-base);
114
+ font-weight: var(--font-weight-medium);
115
+ line-height: var(--line-height-large);
116
+ }
117
+
118
+ [data-slot="session-turn-diffs-toggle"] {
119
+ color: var(--text-interactive-base);
120
+ font-family: var(--font-family-sans);
121
+ font-size: var(--font-size-base);
122
+ font-weight: var(--font-weight-regular);
123
+ line-height: var(--line-height-large);
124
+ cursor: pointer;
125
+ opacity: 0;
126
+ transition: opacity 0.15s ease;
127
+ margin-left: 4px;
128
+ }
129
+
130
+ [data-component="session-turn-diffs-group"]:hover [data-slot="session-turn-diffs-toggle"] {
131
+ opacity: 1;
132
+ }
133
+
134
+ [data-component="session-turn-diffs-group"][data-show-all] [data-slot="session-turn-diffs-toggle"] {
135
+ opacity: 1;
136
+ }
137
+
138
+ [data-slot="session-turn-diffs-more"] {
139
+ color: var(--text-weak);
140
+ font-family: var(--font-family-sans);
141
+ font-size: var(--font-size-small);
142
+ line-height: var(--line-height-large);
143
+ margin-top: 12px;
144
+ padding: 0 0 6px;
145
+ cursor: pointer;
146
+ transition: color 0.15s ease;
147
+
148
+ &:hover {
149
+ color: var(--text-link-base);
150
+ }
151
+ }
152
+
153
+ [data-component="session-turn-diffs-content"] {
154
+ padding-top: 0px;
155
+ display: flex;
156
+ flex-direction: column;
157
+ }
158
+
159
+ [data-slot="session-turn-diff-trigger"] {
160
+ display: flex;
161
+ align-items: center;
162
+ justify-content: space-between;
163
+ gap: 12px;
164
+ width: 100%;
165
+ min-width: 0;
166
+ }
167
+
168
+ [data-slot="session-turn-diff-path"] {
169
+ display: flex;
170
+ flex-grow: 1;
171
+ min-width: 0;
172
+
173
+ font-family: var(--font-family-sans);
174
+ font-size: var(--font-size-small);
175
+ line-height: var(--line-height-large);
176
+ }
177
+
178
+ [data-slot="session-turn-diff-directory"] {
179
+ color: var(--text-base);
180
+ overflow: hidden;
181
+ text-overflow: ellipsis;
182
+ white-space: nowrap;
183
+ direction: rtl;
184
+ text-align: left;
185
+ }
186
+
187
+ [data-slot="session-turn-diff-filename"] {
188
+ min-width: 0;
189
+ color: var(--text-strong);
190
+ font-weight: var(--font-weight-medium);
191
+ overflow: hidden;
192
+ text-overflow: ellipsis;
193
+ white-space: nowrap;
194
+ }
195
+
196
+ [data-slot="session-turn-diff-meta"] {
197
+ flex-shrink: 0;
198
+ display: inline-flex;
199
+ align-items: center;
200
+ gap: 10px;
201
+ }
202
+
203
+ [data-slot="session-turn-diff-chevron"] {
204
+ display: inline-flex;
205
+ color: var(--icon-weaker);
206
+ transform: rotate(-90deg);
207
+ transition: transform 0.15s ease;
208
+ }
209
+
210
+ [data-slot="accordion-item"][data-expanded] [data-slot="session-turn-diff-chevron"] {
211
+ transform: rotate(0deg);
212
+ }
213
+
214
+ [data-slot="session-turn-diff-view"] {
215
+ background-color: var(--surface-inset-base);
216
+ width: 100%;
217
+ min-width: 0;
218
+ overflow-y: auto;
219
+ overflow-x: hidden;
220
+ scrollbar-width: none;
221
+ -ms-overflow-style: none;
222
+ }
223
+
224
+ [data-slot="session-turn-diff-view"]::-webkit-scrollbar {
225
+ display: none;
226
+ }
227
+ }
228
+
229
+ body:not([data-new-layout]) [data-component="session-turn"] {
230
+ .error-card {
231
+ color: var(--text-on-critical-base);
232
+ }
233
+
234
+ [data-slot="session-turn-diffs-header"] {
235
+ background-color: var(--background-stronger);
236
+ }
237
+ }
238
+
239
+ [data-slot="session-turn-list"] {
240
+ gap: 24px;
241
+ }
@@ -0,0 +1,7 @@
1
+ // @ts-nocheck
2
+ import * as mod from "./session-turn"
3
+ import { create } from "@neurocode-ai/ui/storybook/scaffold"
4
+
5
+ const story = create({ title: "UI/SessionTurn", mod })
6
+ export default { title: "UI/SessionTurn", id: "components-session-turn", component: story.meta.component }
7
+ export const Basic = story.Basic