Jay V 8 mēneši atpakaļ
vecāks
revīzija
f5e7f079ea

+ 2 - 2
packages/opencode/src/cli/cmd/auth.ts

@@ -9,14 +9,14 @@ import { map, pipe, sortBy, values } from "remeda"
 
 export const AuthCommand = cmd({
   command: "auth",
-  describe: "manage credentials",
+  describe: "Manage credentials",
   builder: (yargs) =>
     yargs
       .command(AuthLoginCommand)
       .command(AuthLogoutCommand)
       .command(AuthListCommand)
       .demandCommand(),
-  async handler() {},
+  async handler() { },
 })
 
 export const AuthListCommand = cmd({

+ 6 - 6
packages/opencode/src/cli/cmd/run.ts

@@ -29,7 +29,7 @@ export const RunCommand = cmd({
   builder: (yargs: Argv) => {
     return yargs
       .positional("message", {
-        describe: "Message to send",
+        describe: "message to send",
         type: "string",
         array: true,
         default: [],
@@ -46,7 +46,7 @@ export const RunCommand = cmd({
       })
       .option("share", {
         type: "boolean",
-        describe: "Share the session",
+        describe: "share the session",
       })
       .option("model", {
         type: "string",
@@ -90,8 +90,8 @@ export const RunCommand = cmd({
           await Session.share(session.id)
           UI.println(
             UI.Style.TEXT_INFO_BOLD +
-              "~  https://opencode.ai/s/" +
-              session.id.slice(-8),
+            "~  https://opencode.ai/s/" +
+            session.id.slice(-8),
           )
         }
         UI.empty()
@@ -109,8 +109,8 @@ export const RunCommand = cmd({
           UI.println(
             color + `|`,
             UI.Style.TEXT_NORMAL +
-              UI.Style.TEXT_DIM +
-              ` ${type.padEnd(7, " ")}`,
+            UI.Style.TEXT_DIM +
+            ` ${type.padEnd(7, " ")}`,
             "",
             UI.Style.TEXT_NORMAL + title,
           )

+ 2 - 2
packages/opencode/src/cli/cmd/upgrade.ts

@@ -5,10 +5,10 @@ import { Installation } from "../../installation"
 
 export const UpgradeCommand = {
   command: "upgrade [target]",
-  describe: "Upgrade opencode to the latest version or a specific version",
+  describe: "upgrade opencode to the latest version or a specific version",
   builder: (yargs: Argv) => {
     return yargs.positional("target", {
-      describe: "Specific version to upgrade to (e.g., '0.1.48' or 'v0.1.48')",
+      describe: "specific version to upgrade to (e.g., '0.1.48' or 'v0.1.48')",
       type: "string",
     })
   },

+ 16 - 16
packages/opencode/src/index.ts

@@ -36,7 +36,7 @@ const cli = yargs(hideBin(process.argv))
   .usage("\n" + UI.logo())
   .command({
     command: "$0 [project]",
-    describe: "Start opencode TUI",
+    describe: "start opencode TUI",
     builder: (yargs) =>
       yargs.positional("project", {
         type: "string",
@@ -84,21 +84,21 @@ const cli = yargs(hideBin(process.argv))
             },
           })
 
-          ;(async () => {
-            if (Installation.VERSION === "dev") return
-            if (Installation.isSnapshot()) return
-            const config = await Config.global()
-            if (config.autoupdate === false) return
-            const latest = await Installation.latest()
-            if (Installation.VERSION === latest) return
-            const method = await Installation.method()
-            if (method === "unknown") return
-            await Installation.upgrade(method, latest)
-              .then(() => {
-                Bus.publish(Installation.Event.Updated, { version: latest })
-              })
-              .catch(() => {})
-          })()
+            ; (async () => {
+              if (Installation.VERSION === "dev") return
+              if (Installation.isSnapshot()) return
+              const config = await Config.global()
+              if (config.autoupdate === false) return
+              const latest = await Installation.latest()
+              if (Installation.VERSION === latest) return
+              const method = await Installation.method()
+              if (method === "unknown") return
+              await Installation.upgrade(method, latest)
+                .then(() => {
+                  Bus.publish(Installation.Event.Updated, { version: latest })
+                })
+                .catch(() => { })
+            })()
 
           await proc.exited
           server.stop()