@satori-sh/cli 0.0.20 → 0.0.22

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/dist/index.js CHANGED
@@ -365,7 +365,7 @@ ${instruction}`);
365
365
  return;
366
366
  }
367
367
  const info = await getInfoDisplay();
368
- const { runInteractiveApp } = await import("./ui-AFMM6JTQ.js");
368
+ const { runInteractiveApp } = await import("./ui-WNITSTPS.js");
369
369
  await runInteractiveApp({
370
370
  initialPrompt,
371
371
  options,
@@ -14,6 +14,7 @@ async function loadLogo() {
14
14
  }
15
15
 
16
16
  // src/ui.tsx
17
+ import { jsx, jsxs } from "@opentui/solid/jsx-runtime";
17
18
  async function runInteractiveApp({
18
19
  initialPrompt,
19
20
  options,
@@ -27,7 +28,7 @@ async function runInteractiveApp({
27
28
  const logoHeight = logo.endsWith("\n") ? logo.slice(0, -1).split("\n").length : logo.split("\n").length;
28
29
  const splitHeight = Math.max(1, rows - logoHeight - 1);
29
30
  render(
30
- () => /* @__PURE__ */ React.createElement(
31
+ () => /* @__PURE__ */ jsx(
31
32
  App,
32
33
  {
33
34
  initialPrompt,
@@ -127,125 +128,136 @@ function App({ initialPrompt, options, processUserInput, infoLine, infoDisplay }
127
128
  const messagesHeight = () => Math.max(1, inputBoxTop() - messagesTop() - 1);
128
129
  const messagesWidth = () => Math.min(dimensions().width - 2, inputBoxWidth() + 10);
129
130
  const messagesLeft = () => Math.max(1, inputBoxLeft() - 5);
130
- return /* @__PURE__ */ React.createElement("box", { width: "100%", height: "100%", flexDirection: "column" }, /* @__PURE__ */ React.createElement(
131
- "scrollbox",
132
- {
133
- id: "messages",
134
- width: messagesWidth(),
135
- height: messagesHeight(),
136
- position: "absolute",
137
- left: messagesLeft(),
138
- top: messagesTop(),
139
- paddingLeft: 1,
140
- paddingRight: 1,
141
- focused: true,
142
- stickyScroll: true,
143
- stickyStart: "bottom"
144
- },
145
- /* @__PURE__ */ React.createElement("box", { width: "100%", flexDirection: "column" }, /* @__PURE__ */ React.createElement(For, { each: messages() }, (message) => /* @__PURE__ */ React.createElement(
146
- "box",
131
+ return /* @__PURE__ */ jsxs("box", { width: "100%", height: "100%", flexDirection: "column", children: [
132
+ /* @__PURE__ */ jsx(
133
+ "scrollbox",
147
134
  {
148
- width: "100%",
149
- flexDirection: "row",
150
- justifyContent: message.role === "prompt" ? "flex-start" : "flex-end",
151
- marginBottom: 1
152
- },
153
- /* @__PURE__ */ React.createElement(
154
- "box",
155
- {
156
- paddingLeft: 1,
157
- paddingRight: 1,
158
- paddingTop: 1,
159
- paddingBottom: 1,
160
- backgroundColor: message.role === "prompt" ? promptBg : void 0
161
- },
162
- /* @__PURE__ */ React.createElement(
163
- "text",
135
+ id: "messages",
136
+ width: messagesWidth(),
137
+ height: messagesHeight(),
138
+ position: "absolute",
139
+ left: messagesLeft(),
140
+ top: messagesTop(),
141
+ paddingLeft: 1,
142
+ paddingRight: 1,
143
+ focused: true,
144
+ stickyScroll: true,
145
+ stickyStart: "bottom",
146
+ children: /* @__PURE__ */ jsx("box", { width: "100%", flexDirection: "column", children: /* @__PURE__ */ jsx(For, { each: messages(), children: (message) => /* @__PURE__ */ jsx(
147
+ "box",
164
148
  {
165
- fg: message.role === "prompt" ? promptFg : responseFg,
166
149
  width: "100%",
167
- wrapMode: "word",
168
- selectable: false
169
- },
170
- message.text
171
- )
172
- )
173
- )))
174
- ), /* @__PURE__ */ React.createElement(
175
- "box",
176
- {
177
- id: "input-box",
178
- width: inputBoxWidth(),
179
- height: inputBoxHeight(),
180
- position: "absolute",
181
- left: inputBoxLeft(),
182
- top: inputBoxTop(),
183
- paddingLeft: 1,
184
- paddingRight: 1,
185
- paddingTop: 1,
186
- flexDirection: "column"
187
- },
188
- /* @__PURE__ */ React.createElement(For, { each: !isFullScreen() && showIntro() ? [
189
- "Use Satori just like you would use ChatGPT.",
190
- "Except, it stores your conversations in a long term memory.",
191
- "The memories you store here can be accessed through the SDK."
192
- ] : [] }, (line) => /* @__PURE__ */ React.createElement("text", { fg: "cyan" }, line)),
193
- /* @__PURE__ */ React.createElement(
150
+ flexDirection: "row",
151
+ justifyContent: message.role === "prompt" ? "flex-start" : "flex-end",
152
+ marginBottom: 1,
153
+ children: /* @__PURE__ */ jsx(
154
+ "box",
155
+ {
156
+ paddingLeft: 1,
157
+ paddingRight: 1,
158
+ paddingTop: 1,
159
+ paddingBottom: 1,
160
+ backgroundColor: message.role === "prompt" ? promptBg : void 0,
161
+ children: /* @__PURE__ */ jsx(
162
+ "text",
163
+ {
164
+ fg: message.role === "prompt" ? promptFg : responseFg,
165
+ width: "100%",
166
+ wrapMode: "word",
167
+ selectable: false,
168
+ children: message.text
169
+ }
170
+ )
171
+ }
172
+ )
173
+ }
174
+ ) }) })
175
+ }
176
+ ),
177
+ /* @__PURE__ */ jsxs(
194
178
  "box",
195
179
  {
196
180
  id: "input-box",
197
181
  width: inputBoxWidth(),
198
- height: 5,
199
- backgroundColor: "#1a1a1a",
182
+ height: inputBoxHeight(),
183
+ position: "absolute",
184
+ left: inputBoxLeft(),
185
+ top: inputBoxTop(),
186
+ paddingLeft: 1,
187
+ paddingRight: 1,
188
+ paddingTop: 1,
200
189
  flexDirection: "column",
201
- justifyContent: "center"
202
- },
203
- /* @__PURE__ */ React.createElement(
204
- "input",
205
- {
206
- id: "input",
207
- width: "100%",
208
- height: 1,
209
- placeholder: "Type a message and press Enter...",
210
- focusedBackgroundColor: "#1a1a1a",
211
- onInput: (value) => setInputValue(value),
212
- onSubmit: () => submitPrompt(inputValue()),
213
- ref: (r) => {
214
- inputRef = r;
215
- }
216
- }
217
- ),
218
- /* @__PURE__ */ React.createElement("box", { flexDirection: "row", flexShrink: 0, paddingTop: 1 }, /* @__PURE__ */ React.createElement("text", { fg: "#ffffff" }, modelText))
190
+ children: [
191
+ /* @__PURE__ */ jsx(For, { each: !isFullScreen() && showIntro() ? [
192
+ "Use Satori just like you would use ChatGPT.",
193
+ "Except, it stores your conversations in a long term memory.",
194
+ "The memories you store here can be accessed through the SDK."
195
+ ] : [], children: (line) => /* @__PURE__ */ jsx("text", { fg: "cyan", children: line }) }),
196
+ /* @__PURE__ */ jsxs(
197
+ "box",
198
+ {
199
+ id: "input-box",
200
+ width: inputBoxWidth(),
201
+ height: 5,
202
+ backgroundColor: "#1a1a1a",
203
+ flexDirection: "column",
204
+ justifyContent: "center",
205
+ children: [
206
+ /* @__PURE__ */ jsx(
207
+ "input",
208
+ {
209
+ id: "input",
210
+ width: "100%",
211
+ height: 1,
212
+ placeholder: "Type a message and press Enter...",
213
+ focusedBackgroundColor: "#1a1a1a",
214
+ onInput: (value) => setInputValue(value),
215
+ onSubmit: () => submitPrompt(inputValue()),
216
+ ref: (r) => {
217
+ inputRef = r;
218
+ }
219
+ }
220
+ ),
221
+ /* @__PURE__ */ jsx("box", { flexDirection: "row", flexShrink: 0, paddingTop: 1, children: /* @__PURE__ */ jsx("text", { fg: "#ffffff", children: modelText }) })
222
+ ]
223
+ }
224
+ )
225
+ ]
226
+ }
227
+ ),
228
+ /* @__PURE__ */ jsx(Show, { when: isLoading(), children: /* @__PURE__ */ jsx(
229
+ "box",
230
+ {
231
+ id: "spinner",
232
+ position: "absolute",
233
+ left: inputBoxLeft(),
234
+ top: inputBoxTop() + inputBoxHeight(),
235
+ paddingLeft: 1,
236
+ children: /* @__PURE__ */ jsx("text", { fg: "#00ffff", children: cliSpinners.dots.frames[spinnerFrame()] })
237
+ }
238
+ ) }),
239
+ /* @__PURE__ */ jsxs(
240
+ "box",
241
+ {
242
+ id: "footer",
243
+ width: dimensions().width,
244
+ height: 1,
245
+ position: "absolute",
246
+ bottom: 0,
247
+ left: 0,
248
+ backgroundColor: "#000000",
249
+ paddingLeft: 1,
250
+ paddingRight: 1,
251
+ flexDirection: "row",
252
+ justifyContent: "space-between",
253
+ alignItems: "center",
254
+ children: [
255
+ /* @__PURE__ */ jsx("text", { fg: "#00ffff", wrapMode: "none", width: "100%", children: usageText }),
256
+ /* @__PURE__ */ jsx("box", { flexShrink: 0, paddingLeft: 1, children: /* @__PURE__ */ jsx("text", { fg: "#00ffff", children: versionText }) })
257
+ ]
258
+ }
219
259
  )
220
- ), /* @__PURE__ */ React.createElement(Show, { when: isLoading() }, /* @__PURE__ */ React.createElement(
221
- "box",
222
- {
223
- id: "spinner",
224
- position: "absolute",
225
- left: inputBoxLeft(),
226
- top: inputBoxTop() + inputBoxHeight(),
227
- paddingLeft: 1
228
- },
229
- /* @__PURE__ */ React.createElement("text", { fg: "#00ffff" }, cliSpinners.dots.frames[spinnerFrame()])
230
- )), /* @__PURE__ */ React.createElement(
231
- "box",
232
- {
233
- id: "footer",
234
- width: dimensions().width,
235
- height: 1,
236
- position: "absolute",
237
- bottom: 0,
238
- left: 0,
239
- backgroundColor: "#000000",
240
- paddingLeft: 1,
241
- paddingRight: 1,
242
- flexDirection: "row",
243
- justifyContent: "space-between",
244
- alignItems: "center"
245
- },
246
- /* @__PURE__ */ React.createElement("text", { fg: "#00ffff", wrapMode: "none", width: "100%" }, usageText),
247
- /* @__PURE__ */ React.createElement("box", { flexShrink: 0, paddingLeft: 1 }, /* @__PURE__ */ React.createElement("text", { fg: "#00ffff" }, versionText))
248
- ));
260
+ ] });
249
261
  }
250
262
  export {
251
263
  runInteractiveApp
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@satori-sh/cli",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "description": "CLI tool for Satori memory server",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",