@opencode-ai/ui 0.0.0-dev-202608180449 → 0.0.0-dev-17604

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 (119) hide show
  1. package/dist/components/icon.d.ts +6 -0
  2. package/dist/components/scroll-view.d.ts +3 -3
  3. package/dist/context/i18n.d.ts +10 -7
  4. package/dist/i18n/ar.d.ts +0 -2
  5. package/dist/i18n/bg.d.ts +0 -2
  6. package/dist/i18n/br.d.ts +0 -2
  7. package/dist/i18n/bs.d.ts +0 -2
  8. package/dist/i18n/da.d.ts +0 -2
  9. package/dist/i18n/de.d.ts +0 -2
  10. package/dist/i18n/en.d.ts +205 -1
  11. package/dist/i18n/es.d.ts +0 -2
  12. package/dist/i18n/fr.d.ts +0 -2
  13. package/dist/i18n/he.d.ts +197 -0
  14. package/dist/i18n/ja.d.ts +0 -2
  15. package/dist/i18n/km.d.ts +0 -2
  16. package/dist/i18n/ko.d.ts +0 -2
  17. package/dist/i18n/lo.d.ts +0 -2
  18. package/dist/i18n/mk.d.ts +0 -2
  19. package/dist/i18n/mn.d.ts +0 -2
  20. package/dist/i18n/my.d.ts +0 -2
  21. package/dist/i18n/pl.d.ts +0 -2
  22. package/dist/i18n/ru.d.ts +0 -2
  23. package/dist/i18n/sr.d.ts +0 -2
  24. package/dist/i18n/tg.d.ts +0 -2
  25. package/dist/i18n/th.d.ts +0 -2
  26. package/dist/i18n/tr.d.ts +0 -2
  27. package/dist/i18n/zh.d.ts +0 -2
  28. package/dist/i18n/zht.d.ts +0 -2
  29. package/dist/v2/components/icon.d.ts +12 -0
  30. package/package.json +2 -6
  31. package/src/components/accordion.css +0 -24
  32. package/src/components/animated-number.css +29 -11
  33. package/src/components/animated-number.tsx +2 -2
  34. package/src/components/card.css +0 -21
  35. package/src/components/card.tsx +3 -3
  36. package/src/components/icon.tsx +6 -0
  37. package/src/components/list.tsx +4 -2
  38. package/src/components/provider-icon.tsx +1 -1
  39. package/src/components/scroll-view.tsx +5 -20
  40. package/src/components/tabs.css +16 -18
  41. package/src/components/text-shimmer.css +2 -1
  42. package/src/components/toast.tsx +16 -14
  43. package/src/context/i18n.tsx +17 -14
  44. package/src/hooks/create-auto-scroll.tsx +20 -0
  45. package/src/i18n/am.ts +0 -2
  46. package/src/i18n/ar.ts +0 -2
  47. package/src/i18n/az.ts +0 -2
  48. package/src/i18n/bg.ts +0 -2
  49. package/src/i18n/bn.ts +0 -2
  50. package/src/i18n/br.ts +0 -2
  51. package/src/i18n/bs.ts +0 -2
  52. package/src/i18n/ca.ts +0 -2
  53. package/src/i18n/cs.ts +0 -2
  54. package/src/i18n/da.ts +0 -2
  55. package/src/i18n/de.ts +0 -2
  56. package/src/i18n/dv.ts +0 -2
  57. package/src/i18n/dz.ts +0 -2
  58. package/src/i18n/el.ts +0 -2
  59. package/src/i18n/en.ts +14 -4
  60. package/src/i18n/es.ts +0 -2
  61. package/src/i18n/et.ts +0 -2
  62. package/src/i18n/fa.ts +0 -2
  63. package/src/i18n/fi.ts +0 -2
  64. package/src/i18n/fo.ts +0 -2
  65. package/src/i18n/fr.ts +0 -2
  66. package/src/i18n/he.ts +199 -0
  67. package/src/i18n/hi.ts +0 -2
  68. package/src/i18n/hr.ts +0 -2
  69. package/src/i18n/hu.ts +0 -2
  70. package/src/i18n/hy.ts +0 -2
  71. package/src/i18n/id.ts +0 -2
  72. package/src/i18n/is.ts +0 -2
  73. package/src/i18n/it.ts +0 -2
  74. package/src/i18n/ja.ts +0 -2
  75. package/src/i18n/ka.ts +0 -2
  76. package/src/i18n/km.ts +0 -2
  77. package/src/i18n/ko.ts +0 -2
  78. package/src/i18n/lo.ts +0 -2
  79. package/src/i18n/lt.ts +0 -2
  80. package/src/i18n/lv.ts +0 -2
  81. package/src/i18n/mk.ts +0 -2
  82. package/src/i18n/mn.ts +0 -2
  83. package/src/i18n/ms.ts +0 -2
  84. package/src/i18n/my.ts +0 -2
  85. package/src/i18n/ne.ts +0 -2
  86. package/src/i18n/nl.ts +0 -2
  87. package/src/i18n/no.ts +0 -2
  88. package/src/i18n/pa.ts +0 -2
  89. package/src/i18n/pl.ts +0 -2
  90. package/src/i18n/ro.ts +0 -2
  91. package/src/i18n/ru.ts +0 -2
  92. package/src/i18n/si.ts +0 -2
  93. package/src/i18n/sk.ts +0 -2
  94. package/src/i18n/sl.ts +0 -2
  95. package/src/i18n/sq.ts +0 -2
  96. package/src/i18n/sr.ts +0 -2
  97. package/src/i18n/sv.ts +0 -2
  98. package/src/i18n/tg.ts +0 -2
  99. package/src/i18n/th.ts +0 -2
  100. package/src/i18n/tk.ts +0 -2
  101. package/src/i18n/tr.ts +0 -2
  102. package/src/i18n/uk.ts +0 -2
  103. package/src/i18n/ur.ts +0 -2
  104. package/src/i18n/uz.ts +0 -2
  105. package/src/i18n/vi.ts +0 -2
  106. package/src/i18n/zh.ts +0 -2
  107. package/src/i18n/zht.ts +0 -2
  108. package/src/theme/context.tsx +19 -11
  109. package/src/theme/themes/oc-2.json +1 -1
  110. package/src/v2/components/dialog-v2.css +3 -0
  111. package/src/v2/components/dialog-v2.tsx +2 -2
  112. package/src/v2/components/icon.tsx +13 -0
  113. package/src/v2/components/keybind-v2.css +1 -1
  114. package/src/v2/components/line-comment-v2.tsx +2 -0
  115. package/src/v2/components/tabs-v2.css +12 -4
  116. package/src/v2/components/text-shimmer-v2.css +2 -1
  117. package/src/v2/components/toast-v2.tsx +2 -0
  118. package/src/v2/components/tooltip-v2.tsx +3 -2
  119. package/src/v2/styles/theme.css +0 -12
package/dist/i18n/tg.d.ts CHANGED
@@ -141,8 +141,6 @@ export declare const dict: {
141
141
  "ui.tool.websearch.provider": string;
142
142
  "ui.tool.shell": string;
143
143
  "ui.tool.patch": string;
144
- "ui.tool.todos": string;
145
- "ui.tool.todos.read": string;
146
144
  "ui.tool.questions": string;
147
145
  "ui.tool.questions.numbered": string;
148
146
  "ui.tool.agent": string;
package/dist/i18n/th.d.ts CHANGED
@@ -136,8 +136,6 @@ export declare const dict: {
136
136
  "ui.tool.websearch.provider": string;
137
137
  "ui.tool.shell": string;
138
138
  "ui.tool.patch": string;
139
- "ui.tool.todos": string;
140
- "ui.tool.todos.read": string;
141
139
  "ui.tool.questions": string;
142
140
  "ui.tool.questions.numbered": string;
143
141
  "ui.tool.agent": string;
package/dist/i18n/tr.d.ts CHANGED
@@ -136,8 +136,6 @@ export declare const dict: {
136
136
  "ui.tool.websearch.provider": string;
137
137
  "ui.tool.shell": string;
138
138
  "ui.tool.patch": string;
139
- "ui.tool.todos": string;
140
- "ui.tool.todos.read": string;
141
139
  "ui.tool.questions": string;
142
140
  "ui.tool.questions.numbered": string;
143
141
  "ui.tool.agent": string;
package/dist/i18n/zh.d.ts CHANGED
@@ -136,8 +136,6 @@ export declare const dict: {
136
136
  "ui.tool.websearch.provider": string;
137
137
  "ui.tool.shell": string;
138
138
  "ui.tool.patch": string;
139
- "ui.tool.todos": string;
140
- "ui.tool.todos.read": string;
141
139
  "ui.tool.questions": string;
142
140
  "ui.tool.questions.numbered": string;
143
141
  "ui.tool.agent": string;
@@ -136,8 +136,6 @@ export declare const dict: {
136
136
  "ui.tool.websearch.provider": string;
137
137
  "ui.tool.shell": string;
138
138
  "ui.tool.patch": string;
139
- "ui.tool.todos": string;
140
- "ui.tool.todos.read": string;
141
139
  "ui.tool.questions": string;
142
140
  "ui.tool.questions.numbered": string;
143
141
  "ui.tool.agent": string;
@@ -16,6 +16,10 @@ declare const icons: {
16
16
  viewBox: string;
17
17
  body: string;
18
18
  };
19
+ "branch-out": {
20
+ viewBox: string;
21
+ body: string;
22
+ };
19
23
  "grid-plus": {
20
24
  viewBox: string;
21
25
  body: string;
@@ -120,6 +124,14 @@ declare const icons: {
120
124
  viewBox: string;
121
125
  body: string;
122
126
  };
127
+ "window-analytics": {
128
+ viewBox: string;
129
+ body: string;
130
+ };
131
+ trash: {
132
+ viewBox: string;
133
+ body: string;
134
+ };
123
135
  "outline-sliders": {
124
136
  viewBox: string;
125
137
  body: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencode-ai/ui",
3
- "version": "0.0.0-dev-202608180449",
3
+ "version": "0.0.0-dev-17604",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -124,8 +124,6 @@
124
124
  "dependencies": {
125
125
  "@kobalte/core": "0.13.11",
126
126
  "@pierre/diffs": "1.2.10",
127
- "@shikijs/transformers": "3.9.2",
128
- "@solid-primitives/bounds": "0.1.3",
129
127
  "@solid-primitives/event-listener": "2.4.5",
130
128
  "@solid-primitives/media": "2.3.3",
131
129
  "@solid-primitives/resize-observer": "2.1.3",
@@ -133,14 +131,12 @@
133
131
  "diff": "8.0.2",
134
132
  "dompurify": "3.3.1",
135
133
  "fuzzysort": "3.1.0",
136
- "katex": "0.16.27",
134
+ "katex": "0.16.47",
137
135
  "luxon": "3.6.1",
138
136
  "marked": "18.0.7",
139
137
  "marked-shiki": "1.2.1",
140
138
  "morphdom": "2.7.8",
141
139
  "motion": "12.34.5",
142
- "motion-dom": "12.34.3",
143
- "motion-utils": "12.29.2",
144
140
  "remeda": "2.26.0",
145
141
  "remend": "1.3.0",
146
142
  "shiki": "4.2.0",
@@ -104,30 +104,6 @@
104
104
  }
105
105
  }
106
106
 
107
- body:not([data-new-layout]) [data-component="accordion"] {
108
- [data-slot="accordion-item"] [data-slot="accordion-header"] [data-slot="accordion-trigger"] {
109
- background-color: var(--background-stronger);
110
- border-width: 1px;
111
- border-color: var(--border-weak-base);
112
- color: var(--text-strong);
113
-
114
- &:hover:not([data-disabled]) {
115
- background-color: var(--surface-base-hover);
116
- }
117
-
118
- &:active:not([data-disabled]) {
119
- background-color: var(--surface-base-active);
120
- }
121
- }
122
-
123
- [data-slot="accordion-item"][data-expanded] [data-slot="accordion-content"] {
124
- border-width: 1px;
125
- border-color: var(--border-weak-base);
126
- border-top: 0;
127
- background-color: var(--background-stronger);
128
- }
129
- }
130
-
131
107
  @keyframes slideDown {
132
108
  from {
133
109
  height: 0;
@@ -17,7 +17,7 @@
17
17
  }
18
18
 
19
19
  [data-slot="animated-number-digit"] {
20
- display: inline-block;
20
+ display: inline-grid;
21
21
  width: 1ch;
22
22
  height: 1em;
23
23
  line-height: 1em;
@@ -41,19 +41,12 @@
41
41
  mask-repeat: no-repeat;
42
42
  }
43
43
 
44
+ [data-slot="animated-number-static"],
44
45
  [data-slot="animated-number-strip"] {
45
- display: inline-flex;
46
- flex-direction: column;
47
- transform: translateY(calc(var(--animated-number-offset, 10) * -1em));
48
- transition-property: transform;
49
- transition-duration: var(--animated-number-duration, 560ms);
50
- transition-timing-function: var(--tool-motion-ease, cubic-bezier(0.22, 1, 0.36, 1));
51
- }
52
-
53
- [data-slot="animated-number-strip"][data-animating="false"] {
54
- transition-duration: 0ms;
46
+ grid-area: 1 / 1;
55
47
  }
56
48
 
49
+ [data-slot="animated-number-static"],
57
50
  [data-slot="animated-number-cell"] {
58
51
  display: inline-flex;
59
52
  align-items: center;
@@ -62,6 +55,24 @@
62
55
  height: 1em;
63
56
  line-height: 1em;
64
57
  }
58
+
59
+ [data-slot="animated-number-digit"][data-animating="true"] [data-slot="animated-number-static"] {
60
+ visibility: hidden;
61
+ }
62
+
63
+ [data-slot="animated-number-strip"] {
64
+ display: inline-flex;
65
+ flex-direction: column;
66
+ margin-top: calc(var(--animated-number-offset, 10) * -1em);
67
+ transition-property: margin-top;
68
+ transition-duration: var(--animated-number-duration, 560ms);
69
+ transition-timing-function: var(--tool-motion-ease, cubic-bezier(0.22, 1, 0.36, 1));
70
+ }
71
+
72
+ [data-slot="animated-number-digit"][data-animating="false"] [data-slot="animated-number-strip"] {
73
+ transition-duration: 0ms;
74
+ visibility: hidden;
75
+ }
65
76
  }
66
77
 
67
78
  @media (prefers-reduced-motion: reduce) {
@@ -71,5 +82,12 @@
71
82
 
72
83
  [data-component="animated-number"] [data-slot="animated-number-strip"] {
73
84
  transition-duration: 0ms;
85
+ visibility: hidden;
86
+ }
87
+
88
+ [data-component="animated-number"]
89
+ [data-slot="animated-number-digit"][data-animating]
90
+ [data-slot="animated-number-static"] {
91
+ visibility: visible;
74
92
  }
75
93
  }
@@ -43,10 +43,10 @@ function Digit(props: { value: number; direction: 1 | -1 }) {
43
43
  )
44
44
 
45
45
  return (
46
- <span data-slot="animated-number-digit">
46
+ <span data-slot="animated-number-digit" data-animating={animating() ? "true" : "false"}>
47
+ <span data-slot="animated-number-static">{props.value}</span>
47
48
  <span
48
49
  data-slot="animated-number-strip"
49
- data-animating={animating() ? "true" : "false"}
50
50
  onTransitionEnd={() => {
51
51
  setState("animating", false)
52
52
  setState("step", (value) => normalize(value) + 10)
@@ -92,24 +92,3 @@
92
92
  padding-left: var(--card-indent);
93
93
  }
94
94
  }
95
-
96
- body:not([data-new-layout]) [data-component="card"] {
97
- color: var(--text-strong);
98
- --card-accent: var(--icon-active);
99
-
100
- :where([data-card="title"], [data-slot="card-title"]) {
101
- color: var(--text-strong);
102
- }
103
-
104
- :where([data-slot="card-title-icon"][data-placeholder]) [data-component="icon"] {
105
- color: var(--text-weak);
106
- }
107
-
108
- :where([data-card="description"], [data-slot="card-description"]) {
109
- color: var(--text-base);
110
- }
111
-
112
- &[data-variant="error"] {
113
- --card-accent: var(--icon-critical-base) !important;
114
- }
115
- }
@@ -1,4 +1,4 @@
1
- import { type ComponentProps, splitProps } from "solid-js"
1
+ import { type ComponentProps, Show, splitProps } from "solid-js"
2
2
  import { Icon, type IconProps } from "./icon"
3
3
 
4
4
  type Variant = "normal" | "error" | "warning" | "success" | "info"
@@ -80,11 +80,11 @@ export function CardTitle(props: CardTitleProps) {
80
80
  [split.class ?? ""]: !!split.class,
81
81
  }}
82
82
  >
83
- {show() ? (
83
+ <Show when={show()}>
84
84
  <span data-slot="card-title-icon" data-placeholder={placeholder() || undefined}>
85
85
  <Icon name={name() ?? "dash"} size="small" />
86
86
  </span>
87
- ) : null}
87
+ </Show>
88
88
  {split.children}
89
89
  </div>
90
90
  )
@@ -10,6 +10,7 @@ const icons = {
10
10
  prompt: `<path d="M14.5841 12.0807H17.9193V2.91406H5.6276V6.2474M14.5859 6.2474H2.08594V15.4141H5.0026V17.4974L8.7526 15.4141H14.5859V6.2474Z" stroke="currentColor" stroke-linecap="square"/>`,
11
11
  brain: `<path d="M13.332 8.7487C11.4911 8.7487 9.9987 7.25631 9.9987 5.41536M6.66536 11.2487C8.50631 11.2487 9.9987 12.7411 9.9987 14.582M9.9987 2.78209L9.9987 17.0658M16.004 15.0475C17.1255 14.5876 17.9154 13.4849 17.9154 12.1978C17.9154 11.3363 17.5615 10.5575 16.9913 9.9987C17.5615 9.43991 17.9154 8.66108 17.9154 7.79962C17.9154 6.21199 16.7136 4.90504 15.1702 4.73878C14.7858 3.21216 13.4039 2.08203 11.758 2.08203C11.1171 2.08203 10.5162 2.25337 9.9987 2.55275C9.48117 2.25337 8.88032 2.08203 8.23944 2.08203C6.59353 2.08203 5.21157 3.21216 4.82722 4.73878C3.28377 4.90504 2.08203 6.21199 2.08203 7.79962C2.08203 8.66108 2.43585 9.43991 3.00609 9.9987C2.43585 10.5575 2.08203 11.3363 2.08203 12.1978C2.08203 13.4849 2.87191 14.5876 3.99339 15.0475C4.46688 16.7033 5.9917 17.9154 7.79962 17.9154C8.61335 17.9154 9.36972 17.6698 9.9987 17.2488C10.6277 17.6698 11.384 17.9154 12.1978 17.9154C14.0057 17.9154 15.5305 16.7033 16.004 15.0475Z" stroke="currentColor"/>`,
12
12
  fork: `<path d="M2.91602 7.91406L2.91602 2.91406H7.91602M12.0827 2.91406H17.0827L17.0827 7.91406M9.99935 9.9974L9.99935 17.0807M9.99935 9.9974L3.33268 3.33073M9.99935 9.9974L16.666 3.33073" stroke="currentColor" stroke-linecap="square"/>`,
13
+ "workspace-isolated": `<g transform="translate(2 2)"><path d="M10.5 10.5V5.5H5.5V10.5H10.5Z" fill="currentColor"/><rect x="2.5" y="2.5" width="11" height="11" stroke="currentColor"/></g>`,
13
14
  "bullet-list": `<path d="M9.58329 13.7497H17.0833M9.58329 6.24967H17.0833M6.24996 6.24967C6.24996 7.17015 5.50377 7.91634 4.58329 7.91634C3.66282 7.91634 2.91663 7.17015 2.91663 6.24967C2.91663 5.3292 3.66282 4.58301 4.58329 4.58301C5.50377 4.58301 6.24996 5.3292 6.24996 6.24967ZM6.24996 13.7497C6.24996 14.6701 5.50377 15.4163 4.58329 15.4163C3.66282 15.4163 2.91663 14.6701 2.91663 13.7497C2.91663 12.8292 3.66282 12.083 4.58329 12.083C5.50377 12.083 6.24996 12.8292 6.24996 13.7497Z" stroke="currentColor" stroke-linecap="square"/>`,
14
15
  "check-small": `<path d="M6.5 11.4412L8.97059 13.5L13.5 6.5" stroke="currentColor" stroke-linecap="square"/>`,
15
16
  "chevron-down": `<path d="M6.6665 8.33325L9.99984 11.6666L13.3332 8.33325" stroke="currentColor" stroke-linecap="square"/>`,
@@ -103,6 +104,11 @@ const icons = {
103
104
  link: `<path d="M2.08334 12.0833L1.72979 11.7298L1.37624 12.0833L1.72979 12.4369L2.08334 12.0833ZM7.91668 17.9167L7.56312 18.2702L7.91668 18.6238L8.27023 18.2702L7.91668 17.9167ZM17.9167 7.91666L18.2702 8.27022L18.6238 7.91666L18.2702 7.56311L17.9167 7.91666ZM12.0833 2.08333L12.4369 1.72977L12.0833 1.37622L11.7298 1.72977L12.0833 2.08333ZM8.39646 5.06311L8.0429 5.41666L8.75001 6.12377L9.10356 5.77021L8.75001 5.41666L8.39646 5.06311ZM5.77023 9.10355L6.12378 8.74999L5.41668 8.04289L5.06312 8.39644L5.41668 8.74999L5.77023 9.10355ZM14.2298 10.8964L13.8762 11.25L14.5833 11.9571L14.9369 11.6035L14.5833 11.25L14.2298 10.8964ZM11.6036 14.9369L11.9571 14.5833L11.25 13.8762L10.8965 14.2298L11.25 14.5833L11.6036 14.9369ZM7.14646 12.1464L6.7929 12.5L7.50001 13.2071L7.85356 12.8535L7.50001 12.5L7.14646 12.1464ZM12.8536 7.85355L13.2071 7.49999L12.5 6.79289L12.1465 7.14644L12.5 7.49999L12.8536 7.85355ZM2.08334 12.0833L1.72979 12.4369L7.56312 18.2702L7.91668 17.9167L8.27023 17.5631L2.4369 11.7298L2.08334 12.0833ZM17.9167 7.91666L18.2702 7.56311L12.4369 1.72977L12.0833 2.08333L11.7298 2.43688L17.5631 8.27022L17.9167 7.91666ZM12.0833 2.08333L11.7298 1.72977L8.39646 5.06311L8.75001 5.41666L9.10356 5.77021L12.4369 2.43688L12.0833 2.08333ZM5.41668 8.74999L5.06312 8.39644L1.72979 11.7298L2.08334 12.0833L2.4369 12.4369L5.77023 9.10355L5.41668 8.74999ZM14.5833 11.25L14.9369 11.6035L18.2702 8.27022L17.9167 7.91666L17.5631 7.56311L14.2298 10.8964L14.5833 11.25ZM7.91668 17.9167L8.27023 18.2702L11.6036 14.9369L11.25 14.5833L10.8965 14.2298L7.56312 17.5631L7.91668 17.9167ZM7.50001 12.5L7.85356 12.8535L12.8536 7.85355L12.5 7.49999L12.1465 7.14644L7.14646 12.1464L7.50001 12.5Z" fill="currentColor"/>`,
104
105
  providers: `<path d="M10.0001 4.37562V2.875M13 4.37793V2.87793M7.00014 4.37793V2.875M10 17.1279V15.6279M13 17.1279V15.6279M7 17.1279V15.6279M15.625 13.0029H17.125M15.625 7.00293H17.125M15.625 10.0029H17.125M2.875 10.0029H4.375M2.875 13.0029H4.375M2.875 7.00293H4.375M4.375 4.37793H15.625V15.6279H4.375V4.37793ZM12.6241 10.0022C12.6241 11.4519 11.4488 12.6272 9.99908 12.6272C8.54934 12.6272 7.37408 11.4519 7.37408 10.0022C7.37408 8.55245 8.54934 7.3772 9.99908 7.3772C11.4488 7.3772 12.6241 8.55245 12.6241 10.0022Z" stroke="currentColor" stroke-linecap="square"/>`,
105
106
  models: `<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5 10C12.2917 10 10 12.2917 10 17.5C10 12.2917 7.70833 10 2.5 10C7.70833 10 10 7.70833 10 2.5C10 7.70833 12.2917 10 17.5 10Z" stroke="currentColor"/>`,
107
+ appearance: `<path d="M2.707 14.707L14.707 2.707M2.707 9.06L9.06 2.707M2.707 3.413L3.413 2.707M8.354 14.707L14.707 8.354M14.000 14.706L14.706 14.000" stroke="currentColor" stroke-linecap="square"/>`,
108
+ notifications: `<path d="M15.389 7.278V9.611C15.389 10.593 15.389 11.389 15.389 11.389H11.833M6.056 11.389H2.5C2.5 11.389 2.5 10.593 2.5 9.611V4.278C2.5 3.296 2.5 2.5 2.5 2.5H9.945M6.056 11.389V13.611H8.944H11.833V11.389M6.056 11.389H11.833" stroke="currentColor"/><circle cx="14.5" cy="4.5" r="2" stroke="currentColor" fill="currentColor"/>`,
109
+ extensions: `<path d="M9.166 6.805V9.305M11.834 6.805V9.305M6.5 6.805V9.305M2.5 2.5V13.61H15.833V2.5H2.5Z" stroke="currentColor" stroke-linecap="square"/>`,
110
+ cube: `<path d="M10 2.5L16.5 6.25V13.75L10 17.5L3.5 13.75V6.25L10 2.5Z" stroke="currentColor"/><path d="M10 10L16.5 6.25M10 10V17.5M10 10L3.5 6.25" stroke="currentColor"/>`,
111
+ "post-skill": `<rect x="2.5" y="3.5" width="15" height="13" rx="1.5" stroke="currentColor"/><path d="M5.5 7.5H10.5M5.5 10.5H14.5" stroke="currentColor"/>`,
106
112
  "arrow-undo-down": `<path d="M4.08333 11.0859L1.75 8.7526L4.08333 6.41927M2.33333 8.7526L12.5417 8.7526L12.5417 3.21094L7 3.21094" stroke="currentColor" stroke-width="1" stroke-linecap="square"/>`,
107
113
  }
108
114
 
@@ -367,9 +367,11 @@ export function List<T>(props: ListProps<T> & { ref?: (ref: ListRef) => void })
367
367
  </span>
368
368
  )}
369
369
  </Show>
370
- {props.divider && (i() !== group.items.length - 1 || (showAdd() && isLastGroup())) && (
370
+ <Show
371
+ when={props.divider && (i() !== group.items.length - 1 || (showAdd() && isLastGroup()))}
372
+ >
371
373
  <span data-slot="list-item-divider" />
372
- )}
374
+ </Show>
373
375
  </button>
374
376
  )
375
377
  if (props.itemWrapper) return props.itemWrapper(item, node)
@@ -9,7 +9,7 @@ export type ProviderIconProps = JSX.SVGElementTags["svg"] & {
9
9
 
10
10
  export const ProviderIcon: Component<ProviderIconProps> = (props) => {
11
11
  const [local, rest] = splitProps(props, ["id", "class", "classList"])
12
- const resolved = createMemo(() => (iconNames.includes(local.id as IconName) ? local.id : "synthetic"))
12
+ const resolved = createMemo(() => (iconNames.includes(local.id as IconName) ? local.id : "session.synthetic"))
13
13
  return (
14
14
  <svg
15
15
  data-component="provider-icon"
@@ -1,14 +1,4 @@
1
- import {
2
- createEffect,
3
- createMemo,
4
- mergeProps,
5
- onCleanup,
6
- onMount,
7
- Show,
8
- splitProps,
9
- type Accessor,
10
- type ComponentProps,
11
- } from "solid-js"
1
+ import { createEffect, mergeProps, onCleanup, onMount, Show, splitProps, type ComponentProps } from "solid-js"
12
2
  import { Portal } from "solid-js/web"
13
3
  import { createResizeObserver } from "@solid-primitives/resize-observer"
14
4
  import { createStore } from "solid-js/store"
@@ -27,9 +17,9 @@ export interface ScrollViewProps extends ComponentProps<"div"> {
27
17
  * */
28
18
  thumbVisibility?: ScrollViewThumbVisibility
29
19
  /** Mount the thumb into an external track. Scroll metrics still come from this ScrollView. */
30
- thumbContainer?: HTMLElement | Accessor<HTMLElement | undefined>
20
+ thumbContainer?: HTMLElement
31
21
  /** Element whose hover reveals the thumb. Defaults to the ScrollView root when unset. */
32
- thumbHoverTarget?: HTMLElement | Accessor<HTMLElement | undefined>
22
+ thumbHoverTarget?: HTMLElement
33
23
  }
34
24
 
35
25
  export const scrollKey = (event: Pick<KeyboardEvent, "key" | "altKey" | "ctrlKey" | "metaKey" | "shiftKey">) => {
@@ -128,13 +118,8 @@ export function ScrollView(props: ScrollViewProps) {
128
118
  let viewportRef!: HTMLDivElement
129
119
  let thumbRef!: HTMLDivElement
130
120
 
131
- const resolveEl = (value: HTMLElement | Accessor<HTMLElement | undefined> | undefined) => {
132
- if (typeof value === "function") return value()
133
- return value
134
- }
135
-
136
- const thumbMount = createMemo(() => resolveEl(local.thumbContainer))
137
- const thumbHover = createMemo(() => resolveEl(local.thumbHoverTarget))
121
+ const thumbMount = () => local.thumbContainer
122
+ const thumbHover = () => local.thumbHoverTarget
138
123
  const hoverRoot = () => !local.thumbHoverTarget && !local.thumbContainer
139
124
 
140
125
  const [state, setState] = createStore({
@@ -685,10 +685,10 @@
685
685
  position: relative;
686
686
  }
687
687
 
688
- body[data-new-layout] #review-panel [data-component="tabs"],
689
- body[data-new-layout] #terminal-panel [data-component="tabs"],
690
- body[data-new-layout] #review-panel [data-component="tabs"][data-variant="normal"][data-orientation="horizontal"],
691
- body[data-new-layout] #terminal-panel [data-component="tabs"][data-variant="normal"][data-orientation="horizontal"] {
688
+ :root body #review-panel [data-component="tabs"],
689
+ :root body #terminal-panel [data-component="tabs"],
690
+ :root body #review-panel [data-component="tabs"][data-variant="normal"][data-orientation="horizontal"],
691
+ :root body #terminal-panel [data-component="tabs"][data-variant="normal"][data-orientation="horizontal"] {
692
692
  background-color: var(--v2-background-bg-base);
693
693
 
694
694
  [data-slot="tabs-list"] {
@@ -708,7 +708,7 @@ body[data-new-layout] #terminal-panel [data-component="tabs"][data-variant="norm
708
708
  }
709
709
  }
710
710
 
711
- body[data-new-layout] #review-panel [data-component="tabs"][data-variant="normal"][data-orientation="horizontal"] {
711
+ :root body #review-panel [data-component="tabs"][data-variant="normal"][data-orientation="horizontal"] {
712
712
  [data-slot="tabs-list"] {
713
713
  height: 52px;
714
714
  padding-inline-end: 12px;
@@ -774,7 +774,7 @@ body[data-new-layout] #review-panel [data-component="tabs"][data-variant="normal
774
774
  }
775
775
  }
776
776
 
777
- body[data-new-layout] #review-panel [data-component="tabs"] .session-review-v2-tabs-bar {
777
+ :root body #review-panel [data-component="tabs"] .session-review-v2-tabs-bar {
778
778
  width: 100%;
779
779
  min-width: 0;
780
780
  gap: 8px;
@@ -783,8 +783,9 @@ body[data-new-layout] #review-panel [data-component="tabs"] .session-review-v2-t
783
783
  background-color: var(--v2-background-bg-base);
784
784
  }
785
785
 
786
- body[data-new-layout] #review-panel [data-component="tabs"] .session-review-v2-tabs-bar [data-slot="tabs-list"],
787
- body[data-new-layout]
786
+ :root body #review-panel [data-component="tabs"] .session-review-v2-tabs-bar [data-slot="tabs-list"],
787
+ :root
788
+ body
788
789
  #review-panel
789
790
  [data-component="tabs"][data-variant="normal"][data-orientation="horizontal"]
790
791
  .session-review-v2-tabs-bar
@@ -795,12 +796,7 @@ body[data-new-layout]
795
796
  border-bottom: none;
796
797
  }
797
798
 
798
- body[data-new-layout]
799
- #review-panel
800
- [data-component="tabs"]
801
- .session-review-v2-tabs-bar
802
- [data-slot="tabs-list"]
803
- > .sticky {
799
+ :root body #review-panel [data-component="tabs"] .session-review-v2-tabs-bar [data-slot="tabs-list"] > .sticky {
804
800
  padding-inline-end: 0;
805
801
 
806
802
  [data-component="icon-button-v2"] {
@@ -820,7 +816,8 @@ body[data-new-layout]
820
816
  }
821
817
  }
822
818
 
823
- body[data-new-layout]
819
+ :root
820
+ body
824
821
  #review-panel
825
822
  [data-component="tabs"]
826
823
  .session-review-v2-tabs-bar
@@ -831,7 +828,8 @@ body[data-new-layout]
831
828
  inset-inline-end: 0;
832
829
  }
833
830
 
834
- body[data-new-layout]
831
+ :root
832
+ body
835
833
  #review-panel
836
834
  [data-component="tabs"]
837
835
  .session-review-v2-tabs-bar
@@ -879,11 +877,11 @@ body[data-new-layout]
879
877
  }
880
878
  }
881
879
 
882
- body[data-new-layout] #review-panel [data-component="tabs"] .session-review-v2-open-in-app-slot {
880
+ :root body #review-panel [data-component="tabs"] .session-review-v2-open-in-app-slot {
883
881
  flex-shrink: 0;
884
882
  margin-inline-start: auto;
885
883
  }
886
884
 
887
- body[data-new-layout] #review-panel [data-component="tabs"] .session-review-v2-open-in-app {
885
+ :root body #review-panel [data-component="tabs"] .session-review-v2-open-in-app {
888
886
  flex-shrink: 0;
889
887
  }
@@ -5,7 +5,8 @@
5
5
  --text-shimmer-index: 0;
6
6
  --text-shimmer-angle: 90deg;
7
7
  --text-shimmer-spread: 5.2ch;
8
- --text-shimmer-size: 360%;
8
+ --text-shimmer-gutter: calc(var(--text-shimmer-spread) + 1ch);
9
+ --text-shimmer-size: calc(200% + var(--text-shimmer-gutter) + var(--text-shimmer-gutter));
9
10
  --text-shimmer-base-color: var(--text-weak);
10
11
  --text-shimmer-peak-color: var(--text-strong);
11
12
  --text-shimmer-sweep: linear-gradient(
@@ -1,7 +1,7 @@
1
1
  import { Toast as Kobalte, toaster } from "@kobalte/core/toast"
2
2
  import type { ToastRootProps, ToastCloseButtonProps, ToastTitleProps, ToastDescriptionProps } from "@kobalte/core/toast"
3
3
  import type { ComponentProps, JSX } from "solid-js"
4
- import { Show } from "solid-js"
4
+ import { For, Show } from "solid-js"
5
5
  import { Portal } from "solid-js/web"
6
6
  import { useI18n } from "../context/i18n"
7
7
  import { Icon, type IconProps } from "./icon"
@@ -136,19 +136,21 @@ export function showToast(options: ToastOptions | string) {
136
136
  </Show>
137
137
  <Show when={opts.actions?.length}>
138
138
  <Toast.Actions>
139
- {opts.actions!.map((action) => (
140
- <button
141
- data-slot="toast-action"
142
- onClick={() => {
143
- if (typeof action.onClick === "function") {
144
- action.onClick()
145
- }
146
- toaster.dismiss(props.toastId)
147
- }}
148
- >
149
- {action.label}
150
- </button>
151
- ))}
139
+ <For each={opts.actions}>
140
+ {(action) => (
141
+ <button
142
+ data-slot="toast-action"
143
+ onClick={() => {
144
+ if (typeof action.onClick === "function") {
145
+ action.onClick()
146
+ }
147
+ toaster.dismiss(props.toastId)
148
+ }}
149
+ >
150
+ {action.label}
151
+ </button>
152
+ )}
153
+ </For>
152
154
  </Toast.Actions>
153
155
  </Show>
154
156
  </Toast.Content>
@@ -1,26 +1,24 @@
1
1
  import { createContext, useContext, type Accessor, type ParentProps } from "solid-js"
2
2
  import { I18nProvider } from "@kobalte/core/i18n"
3
3
  import { dict as en } from "../i18n/en"
4
+ import type { Key, LocaleKey, PluralCategory, PluralKey, PluralLookupKey } from "../i18n/en"
4
5
 
5
- export type UiI18nKey = keyof typeof en
6
-
7
- export const UI_PLURAL_KEYS = [
8
- "ui.sessionTurn.diffs.changed",
9
- "ui.messagePart.context.read",
10
- "ui.messagePart.context.search",
11
- "ui.messagePart.context.list",
12
- ] as const
13
- export type UiI18nPluralKey = (typeof UI_PLURAL_KEYS)[number]
14
- export type UiPluralCategory = "zero" | "one" | "two" | "few" | "many" | "other"
15
- export type UiI18nPluralLookupKey = `${UiI18nPluralKey}.${UiPluralCategory}`
6
+ export type UiI18nKey = Key
7
+ export type UiI18nPluralKey = PluralKey
8
+ export type UiPluralCategory = PluralCategory
9
+ export type UiI18nPluralLookupKey = PluralLookupKey
10
+ export type UiI18nLocaleKey = LocaleKey
11
+ type UiTranslationKey<Value extends string> = Value extends UiI18nPluralLookupKey ? never : Value
16
12
 
17
13
  export type UiI18nParams = Record<string, string | number | boolean>
14
+ export type UiTranslate = <Value extends string>(key: UiTranslationKey<Value>, params?: UiI18nParams) => string
18
15
 
19
16
  export type UiI18n = {
20
17
  locale: Accessor<string>
21
18
  layoutLocale?: Accessor<string>
22
- t: (key: UiI18nKey, params?: UiI18nParams) => string
19
+ t: UiTranslate
23
20
  plural: (key: UiI18nPluralKey, count: number, params?: UiI18nParams) => string
21
+ pluralForm?: (key: UiI18nPluralKey, category: UiPluralCategory, params?: UiI18nParams) => string
24
22
  }
25
23
 
26
24
  const rules = new Map<string, Intl.PluralRules>()
@@ -50,11 +48,16 @@ function resolveTemplate(text: string, params?: UiI18nParams) {
50
48
  const fallback: UiI18n = {
51
49
  locale: () => "en",
52
50
  t: (key, params) => {
53
- const value = en[key] ?? String(key)
51
+ const value = en[key as UiI18nKey] ?? String(key)
54
52
  return resolveTemplate(value, params)
55
53
  },
56
54
  plural: (key, count, params) =>
57
- fallback.t(pluralKey(key, pluralCategory(fallback.locale(), count)), { ...params, count }),
55
+ fallback.pluralForm!(key, pluralCategory(fallback.locale(), count), { ...params, count }),
56
+ pluralForm: (key, category, params) => {
57
+ const values = en as Partial<Record<UiI18nLocaleKey, string>>
58
+ const value = values[pluralKey(key, category)] ?? values[`${key}.other`] ?? `${key}.other`
59
+ return resolveTemplate(value, params)
60
+ },
58
61
  }
59
62
 
60
63
  const Context = createContext<UiI18n>(fallback)
@@ -186,6 +186,26 @@ export function createAutoScroll(options: AutoScrollOptions) {
186
186
  },
187
187
  )
188
188
 
189
+ createEffect(() => {
190
+ const el = store.scrollRef
191
+ if (!el) return
192
+ const root = el.closest("main")
193
+ if (!root) return
194
+ let connected = el.isConnected
195
+ const contains = (node: Node) => node === el || (node instanceof Element && node.contains(el))
196
+ const observer = new MutationObserver((records) => {
197
+ records.forEach((record) => {
198
+ if ([...record.removedNodes].some(contains)) connected = false
199
+ if (!record.addedNodes.length || ![...record.addedNodes].some(contains)) return
200
+ const reattached = !connected
201
+ connected = true
202
+ if (reattached) scrollToBottom(false)
203
+ })
204
+ })
205
+ observer.observe(root, { childList: true })
206
+ onCleanup(() => observer.disconnect())
207
+ })
208
+
189
209
  createEffect(
190
210
  on(options.working, (working: boolean) => {
191
211
  settling = false
package/src/i18n/am.ts CHANGED
@@ -142,8 +142,6 @@ export const dict: Record<string, string> = {
142
142
  "ui.tool.websearch.provider": "{{provider}}ድር ፍለጋ",
143
143
  "ui.tool.shell": "ሼል",
144
144
  "ui.tool.patch": "Patch",
145
- "ui.tool.todos": "የሚደረጉ ነገሮች",
146
- "ui.tool.todos.read": "ወደ-ድርጊት አንብብ",
147
145
  "ui.tool.questions": "ጥያቄዎች",
148
146
  "ui.tool.questions.numbered": "ጥያቄዎች {{number}}",
149
147
  "ui.tool.agent": "{{type}} ወኪል",
package/src/i18n/ar.ts CHANGED
@@ -167,8 +167,6 @@ export const dict = {
167
167
  "ui.tool.websearch.provider": "{{provider}} بحث الويب",
168
168
  "ui.tool.shell": "Shell",
169
169
  "ui.tool.patch": "تطبيق رقعة",
170
- "ui.tool.todos": "المهام",
171
- "ui.tool.todos.read": "قراءة المهام",
172
170
  "ui.tool.questions": "أسئلة",
173
171
  "ui.tool.questions.numbered": "أسئلة {{number}}",
174
172
  "ui.tool.agent": "وكيل {{type}}",
package/src/i18n/az.ts CHANGED
@@ -143,8 +143,6 @@ export const dict: Record<string, string> = {
143
143
  "ui.tool.websearch.provider": "{{provider}} Veb axtarışı",
144
144
  "ui.tool.shell": "Shell",
145
145
  "ui.tool.patch": "Patch",
146
- "ui.tool.todos": "Tapşırıqlar",
147
- "ui.tool.todos.read": "Tapşırıqları oxu",
148
146
  "ui.tool.questions": "Suallar",
149
147
  "ui.tool.questions.numbered": "Suallar {{number}}",
150
148
  "ui.tool.agent": "{{type}} Agent",
package/src/i18n/bg.ts CHANGED
@@ -143,8 +143,6 @@ export const dict = {
143
143
  "ui.tool.websearch.provider": "{{provider}} Търсене в мрежата",
144
144
  "ui.tool.shell": "Shell",
145
145
  "ui.tool.patch": "Patch",
146
- "ui.tool.todos": "Задачи",
147
- "ui.tool.todos.read": "Прочетете задачи",
148
146
  "ui.tool.questions": "Въпроси",
149
147
  "ui.tool.questions.numbered": "Въпроси {{number}}",
150
148
  "ui.tool.agent": "{{type}} Агент",
package/src/i18n/bn.ts CHANGED
@@ -145,8 +145,6 @@ export const dict: Record<string, string> = {
145
145
  "ui.tool.websearch.provider": "{{provider}} Web Search",
146
146
  "ui.tool.shell": "শেল",
147
147
  "ui.tool.patch": "প্যাচ",
148
- "ui.tool.todos": "করণীয়",
149
- "ui.tool.todos.read": "করণীয় পড়ুন",
150
148
  "ui.tool.questions": "প্রশ্ন",
151
149
  "ui.tool.questions.numbered": "প্রশ্ন {{number}}",
152
150
  "ui.tool.agent": "{{type}} এজেন্ট",