diff options
| author | adamdottv <[email protected]> | 2025-07-08 05:50:10 -0500 |
|---|---|---|
| committer | adamdottv <[email protected]> | 2025-07-08 05:50:18 -0500 |
| commit | ea96ead346d48f35bcffe829a2b5b667305910c3 (patch) | |
| tree | 06127c95a0dd506451ff1a5846767f5fe8d947c1 /packages/tui/cmd | |
| parent | 6100a77b853917292a024ccdd818ff43e0acc0f1 (diff) | |
| download | opencode-ea96ead346d48f35bcffe829a2b5b667305910c3.tar.gz opencode-ea96ead346d48f35bcffe829a2b5b667305910c3.zip | |
feat(tui): handle --model and --prompt flags
Diffstat (limited to 'packages/tui/cmd')
| -rw-r--r-- | packages/tui/cmd/opencode/main.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/tui/cmd/opencode/main.go b/packages/tui/cmd/opencode/main.go index a92835251..e456a3edc 100644 --- a/packages/tui/cmd/opencode/main.go +++ b/packages/tui/cmd/opencode/main.go @@ -9,6 +9,7 @@ import ( "strings" tea "github.com/charmbracelet/bubbletea/v2" + flag "github.com/spf13/pflag" "github.com/sst/opencode-sdk-go" "github.com/sst/opencode-sdk-go/option" "github.com/sst/opencode/internal/app" @@ -23,6 +24,10 @@ func main() { version = "v" + Version } + var model *string = flag.String("model", "", "model to begin with") + var prompt *string = flag.String("prompt", "", "prompt to begin with") + flag.Parse() + url := os.Getenv("OPENCODE_SERVER") appInfoStr := os.Getenv("OPENCODE_APP_INFO") @@ -65,7 +70,7 @@ func main() { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - app_, err := app.New(ctx, version, appInfo, httpClient) + app_, err := app.New(ctx, version, appInfo, httpClient, model, prompt) if err != nil { panic(err) } |
