openhorizon-cli 1.0.3 → 1.0.4

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/index.js +7 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -171,7 +171,7 @@ async function* streamCompletion(baseUrl, apiKey, model, messages) {
171
171
  Authorization: `Bearer ${apiKey}`,
172
172
  "x-api-key": apiKey,
173
173
  "x-client": "openhorizon-cli",
174
- "x-client-version": "1.0.3"
174
+ "x-client-version": "1.0.4"
175
175
  },
176
176
  body: JSON.stringify({ model, messages, stream: true })
177
177
  });
@@ -221,7 +221,7 @@ async function runChatLoop(options) {
221
221
  console.log(
222
222
  chalk2.gray(
223
223
  `
224
- Commands: ${chalk2.white("/model")} ${chalk2.white("/clear")} ${chalk2.white("/help")} ${chalk2.white("exit")}
224
+ Commands: ${chalk2.white("/model")} ${chalk2.white("/clear")} ${chalk2.white("/help")} ${chalk2.white("/version")} ${chalk2.white("exit")}
225
225
  `
226
226
  )
227
227
  );
@@ -253,12 +253,12 @@ async function runChatLoop(options) {
253
253
  }
254
254
  if (trimmed === "/version") {
255
255
  console.log(chalk2.blue(`
256
- OpenHorizon CLI version: ${chalk2.bold("1.0.3")}
256
+ OpenHorizon CLI version: ${chalk2.bold("1.0.4")}
257
257
  `));
258
258
  continue;
259
259
  }
260
260
  if (trimmed === "/update") {
261
- await runUpdate("1.0.3");
261
+ await runUpdate("1.0.4");
262
262
  continue;
263
263
  }
264
264
  if (trimmed === "/model") {
@@ -289,9 +289,8 @@ async function runChatLoop(options) {
289
289
  console.log(chalk2.red(" \u276F No response received.\n"));
290
290
  break;
291
291
  }
292
- const rendered = String(await marked(fullResponse)).trimEnd();
293
- process.stdout.write(chalk2.green("\u276F ") + "\n");
294
- process.stdout.write(rendered + "\n");
292
+ const rendered = String(await marked(fullResponse)).trim();
293
+ process.stdout.write(chalk2.green("\u276F ") + rendered + "\n");
295
294
  const usageStr = promptTokens || completionTokens ? chalk2.dim(` \u2191${promptTokens} \u2193${completionTokens} tok \xB7 ${elapsed}s`) : chalk2.dim(` ${elapsed}s`);
296
295
  process.stdout.write(usageStr + "\n\n");
297
296
  appendHistory({
@@ -335,7 +334,7 @@ async function runChatLoop(options) {
335
334
  // src/index.ts
336
335
  dotenv.config();
337
336
  var program = new Command();
338
- var version = "1.0.3";
337
+ var version = "1.0.4";
339
338
  program.name("openhorizon").description("CLI to interact with OpenHorizon AI Models").version(version, "-v, --version", "Output the current version");
340
339
  program.command("version").description("Show the current CLI version").action(() => {
341
340
  console.log(chalk3.blue(`OpenHorizon CLI version: ${chalk3.bold(version)}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openhorizon-cli",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Official CLI for OpenHorizon — chat with AI models directly from your terminal",
5
5
  "type": "module",
6
6
  "bin": {