@shunagent/shun 0.1.146 → 0.1.147

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 (2) hide show
  1. package/dist/cli.js +7 -3
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -7714,7 +7714,7 @@ const clean$1 = (text2) => stripTerminalSequences(text2).replace(/[\x00-\x1f\x7f
7714
7714
  const accent = (text2) => `\x1B[38;5;205m${text2}\x1B[0m`;
7715
7715
  const muted = (text2) => `\x1B[2m${text2}\x1B[0m`;
7716
7716
  const bold = (text2) => `\x1B[1m${text2}\x1B[0m`;
7717
- const version$1 = "0.1.146";
7717
+ const version$1 = "0.1.147";
7718
7718
  class WelcomeHeader {
7719
7719
  state = { title: "", model: "", workspace: "", running: false, compact: false, ready: false };
7720
7720
  update(state) {
@@ -7941,6 +7941,10 @@ Paste your key · Esc to cancel`, "", true);
7941
7941
  const saved = await call("provider.save", input);
7942
7942
  return saved.providers.find((item) => !config.providers.some((previous) => previous.id === item.id)).id;
7943
7943
  }
7944
+ async function selectModel(call, providerId2, model2, taskId) {
7945
+ if (taskId) await call("model.select", { providerId: providerId2, model: model2, taskId });
7946
+ return call("model.select", { providerId: providerId2, model: model2 });
7947
+ }
7944
7948
  async function chooseSession(call, workspace, choose) {
7945
7949
  const tasks = recentConversations(await call("task.list"));
7946
7950
  const scoped = tasks.filter((task) => task.workspace === workspace);
@@ -8266,7 +8270,7 @@ async function runTui(call, options = {}) {
8266
8270
  }
8267
8271
  let model2 = await choose("Choose model", [...models.map((model22) => ({ value: model22, label: model22 })), { value: "__custom__", label: "Enter a model ID…" }]);
8268
8272
  if (model2 === "__custom__") model2 = await ask("Model ID");
8269
- await call("model.select", { providerId: providerId2, model: model2, ...taskId ? { taskId } : {} });
8273
+ await selectModel(call, providerId2, model2, taskId);
8270
8274
  if (taskId && snapshot?.task.id === taskId) {
8271
8275
  snapshot.task.providerId = providerId2;
8272
8276
  snapshot.task.model = model2;
@@ -8694,7 +8698,7 @@ ${activeRun ? "Task continues running in Shun.\n" : ""}Resume this conversation:
8694
8698
  process.off("SIGTERM", onSignal);
8695
8699
  process.off("SIGINT", onSignal);
8696
8700
  }
8697
- const version = "0.1.146";
8701
+ const version = "0.1.147";
8698
8702
  const args = process.argv.slice(2);
8699
8703
  async function main() {
8700
8704
  if (args.includes("--version") || args.includes("-v")) {
package/package.json CHANGED
@@ -60,5 +60,5 @@
60
60
  "mcp",
61
61
  "developer-tools"
62
62
  ],
63
- "version": "0.1.146"
63
+ "version": "0.1.147"
64
64
  }