opencode-miniterm 1.0.17 → 1.0.19

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/bun.lock CHANGED
@@ -5,7 +5,7 @@
5
5
  "": {
6
6
  "name": "opencode-miniterm",
7
7
  "dependencies": {
8
- "@opencode-ai/sdk": "^1.2.24",
8
+ "@opencode-ai/sdk": "^1.2.27",
9
9
  "allmark": "^1.0.2",
10
10
  },
11
11
  "devDependencies": {
@@ -47,11 +47,11 @@
47
47
 
48
48
  "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="],
49
49
 
50
- "@opencode-ai/sdk": ["@opencode-ai/sdk@1.2.25", "", {}, "sha512-ikuGWob48OM7LTgfXFqGOZKVOqh50FEjvtIBhXGhGowJhifmjZ+xuq/ypP8nPjTwUX73pbu1C3X9ZBWVkCN9mA=="],
50
+ "@opencode-ai/sdk": ["@opencode-ai/sdk@1.2.27", "", {}, "sha512-Wk0o/I+Fo+wE3zgvlJDs8Fb67KlKqX0PrV8dK5adSDkANq6r4Z25zXJg2iOir+a8ntg3rAcpel1OY4FV/TwRUA=="],
51
51
 
52
52
  "@trivago/prettier-plugin-sort-imports": ["@trivago/prettier-plugin-sort-imports@6.0.2", "", { "dependencies": { "@babel/generator": "^7.28.0", "@babel/parser": "^7.28.0", "@babel/traverse": "^7.28.0", "@babel/types": "^7.28.0", "javascript-natural-sort": "^0.7.1", "lodash-es": "^4.17.21", "minimatch": "^9.0.0", "parse-imports-exports": "^0.2.4" }, "peerDependencies": { "@vue/compiler-sfc": "3.x", "prettier": "2.x - 3.x", "prettier-plugin-ember-template-tag": ">= 2.0.0", "prettier-plugin-svelte": "3.x", "svelte": "4.x || 5.x" }, "optionalPeers": ["@vue/compiler-sfc", "prettier-plugin-ember-template-tag", "prettier-plugin-svelte", "svelte"] }, "sha512-3DgfkukFyC/sE/VuYjaUUWoFfuVjPK55vOFDsxD56XXynFMCZDYFogH2l/hDfOsQAm1myoU/1xByJ3tWqtulXA=="],
53
53
 
54
- "@types/bun": ["@types/bun@1.3.10", "", { "dependencies": { "bun-types": "1.3.10" } }, "sha512-0+rlrUrOrTSskibryHbvQkDOWRJwJZqZlxrUs1u4oOoTln8+WIXBPmAuCF35SWB2z4Zl3E84Nl/D0P7803nigQ=="],
54
+ "@types/bun": ["@types/bun@1.3.11", "", { "dependencies": { "bun-types": "1.3.11" } }, "sha512-5vPne5QvtpjGpsGYXiFyycfpDF2ECyPcTSsFBMa0fraoxiQyMJ3SmuQIGhzPg2WJuWxVBoxWJ2kClYTcw/4fAg=="],
55
55
 
56
56
  "@types/node": ["@types/node@25.3.0", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-4K3bqJpXpqfg2XKGK9bpDTc6xO/xoUP/RBWS7AtRMug6zZFaRekiLzjVtAoZMquxoAbzBvy5nxQ7veS5eYzf8A=="],
57
57
 
@@ -77,7 +77,7 @@
77
77
 
78
78
  "brace-expansion": ["brace-expansion@2.0.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="],
79
79
 
80
- "bun-types": ["bun-types@1.3.10", "", { "dependencies": { "@types/node": "*" } }, "sha512-tcpfCCl6XWo6nCVnpcVrxQ+9AYN1iqMIzgrSKYMB/fjLtV2eyAVEg7AxQJuCq/26R6HpKWykQXuSOq/21RYcbg=="],
80
+ "bun-types": ["bun-types@1.3.11", "", { "dependencies": { "@types/node": "*" } }, "sha512-1KGPpoxQWl9f6wcZh57LvrPIInQMn2TQ7jsgxqpRzg+l0QPOFvJVH7HmvHo/AiPgwXy+/Thf6Ov3EdVn1vOabg=="],
81
81
 
82
82
  "debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="],
83
83
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-miniterm",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "A small front-end terminal UI for OpenCode",
5
5
  "main": "src/index.ts",
6
6
  "bin": {
@@ -29,7 +29,7 @@
29
29
  "typescript": "^5"
30
30
  },
31
31
  "dependencies": {
32
- "@opencode-ai/sdk": "^1.2.25",
32
+ "@opencode-ai/sdk": "^1.2.27",
33
33
  "allmark": "^1.0.2"
34
34
  }
35
35
  }
@@ -99,6 +99,7 @@ async function handleKey(state: State, key: Key, str?: string) {
99
99
  config.agentID = selected.id;
100
100
  saveConfig();
101
101
  const activeDisplay = await getActiveDisplay(state.client);
102
+ console.log();
102
103
  console.log(activeDisplay);
103
104
  console.log();
104
105
  }
@@ -116,6 +116,7 @@ async function handleKey(state: State, key: Key, str?: string) {
116
116
  config.modelID = selected.modelID;
117
117
  saveConfig();
118
118
  const activeDisplay = await getActiveDisplay(state.client);
119
+ console.log();
119
120
  console.log(activeDisplay);
120
121
  console.log();
121
122
  }
@@ -135,6 +135,7 @@ async function handleKey(state: State, key: Key, str?: string) {
135
135
  if (selected) {
136
136
  config.sessionIDs[process.cwd()] = selected.id;
137
137
  saveConfig();
138
+ console.log();
138
139
  console.log(`Switched to session: ${selected.id.substring(0, 8)}...`);
139
140
  if (selected.title) {
140
141
  console.log(` Title: ${selected.title}`);
package/src/input.ts CHANGED
@@ -59,8 +59,9 @@ export function renderLine(): void {
59
59
  // Move to the start of the line (i.e. the prompt position)
60
60
  process.stdout.write(ansi.CURSOR_HOME);
61
61
  if (oldWrappedRows > 0) {
62
- if (cursorPosition < inputBuffer.length) {
63
- process.stdout.write(ansi.CURSOR_DOWN(oldWrappedRows - oldCursorRow));
62
+ let rowsToMove = oldWrappedRows - oldCursorRow;
63
+ if (cursorPosition < inputBuffer.length && rowsToMove > 0) {
64
+ process.stdout.write(ansi.CURSOR_DOWN(rowsToMove));
64
65
  }
65
66
  process.stdout.write(ansi.CURSOR_UP(oldWrappedRows));
66
67
  }
package/src/server.ts CHANGED
@@ -342,6 +342,7 @@ function processDelta(state: State, partID: string, delta: string) {
342
342
 
343
343
  async function processDiff(state: State, diff: FileDiff[]) {
344
344
  const parts: string[] = [];
345
+
345
346
  for (const file of diff) {
346
347
  const newAfter = file.after ?? "";
347
348
  const oldAfter = state.lastFileAfter.get(file.file);
@@ -358,18 +359,19 @@ async function processDiff(state: State, diff: FileDiff[]) {
358
359
  }
359
360
 
360
361
  if (parts.length > 0) {
361
- state.accumulatedResponse.push({ key: "diff", title: "files", text: parts.join("\n") });
362
+ const diffText = parts.join("\n");
363
+ state.accumulatedResponse.push({ key: "diff", title: "files", text: diffText });
362
364
 
363
- const diffText = ansi.stripAnsiCodes(parts.join("\n"));
364
- await writeToLog(`${diffText}\n\n`);
365
+ await writeToLog(`${ansi.stripAnsiCodes(diffText)}\n\n`);
365
366
 
366
367
  render(state);
367
368
  }
368
369
  }
369
370
 
370
371
  async function processTodos(state: State, todos: Todo[]) {
371
- let todoListText = "Todo:\n";
372
+ const parts: string[] = [];
372
373
 
374
+ parts.push("Todo:");
373
375
  for (let todo of todos) {
374
376
  let todoText = "";
375
377
  if (todo.status === "completed") {
@@ -378,13 +380,13 @@ async function processTodos(state: State, todos: Todo[]) {
378
380
  todoText += "- [ ] ";
379
381
  }
380
382
  todoText += todo.content;
381
- todoListText += todoText + "\n";
383
+ parts.push(todoText);
382
384
  }
383
385
 
386
+ const todoListText = parts.join("\n");
384
387
  state.accumulatedResponse.push({ key: "todo", title: "files", text: todoListText });
385
388
 
386
- const cleanTodoText = ansi.stripAnsiCodes(todoListText);
387
- await writeToLog(`${cleanTodoText}\n`);
389
+ await writeToLog(`${ansi.stripAnsiCodes(todoListText)}\n\n`);
388
390
 
389
391
  render(state);
390
392
  }