Dax Raad 8 месяцев назад
Родитель
Сommit
49110f7412

+ 3 - 0
packages/opencode/src/cli/ui.ts

@@ -1,3 +1,5 @@
+import { VERSION } from "./version"
+
 export namespace UI {
   const LOGO = [
     `█▀▀█ █▀▀█ █▀▀ █▀▀▄ █▀▀ █▀▀█ █▀▀▄ █▀▀`,
@@ -40,6 +42,7 @@ export namespace UI {
   }
 
   export function logo() {
+    empty()
     for (const row of LOGO) {
       print("   ")
       for (let i = 0; i < row.length; i++) {

+ 1 - 2
packages/opencode/src/index.ts

@@ -32,6 +32,7 @@ yargs(hideBin(process.argv))
         type: "boolean",
       }),
     handler: async (args) => {
+      UI.logo()
       await App.provide({ cwd: process.cwd(), version: VERSION }, async () => {
         const providers = await Provider.list()
         if (Object.keys(providers).length === 0) {
@@ -52,7 +53,6 @@ yargs(hideBin(process.argv))
           const binary = path.join(Global.Path.cache, "tui", blob.name)
           const file = Bun.file(binary)
           if (!(await file.exists())) {
-            console.log("installing tui binary...")
             await Bun.write(file, blob, { mode: 0o755 })
             await fs.chmod(binary, 0o755)
           }
@@ -82,5 +82,4 @@ yargs(hideBin(process.argv))
   .command(GenerateCommand)
   .command(ScrapCommand)
   .command(ProviderCommand)
-  .help()
   .parse()

+ 0 - 2
packages/tui/cmd/opencode/main.go

@@ -2,7 +2,6 @@ package main
 
 import (
 	"context"
-	"fmt"
 	"log/slog"
 	"os"
 	"path/filepath"
@@ -20,7 +19,6 @@ import (
 var Version = "dev"
 
 func main() {
-	fmt.Println(Version)
 	url := os.Getenv("OPENCODE_SERVER")
 	httpClient, err := client.NewClientWithResponses(url)
 	if err != nil {