Skip to content

Todo in Codebase on better wa to handle one time prompts from CLI #15575

@OpeOginni

Description

@OpeOginni

Description

While making the PR #14442 I came across a TODO https://github.com/anomalyco/opencode/blob/dev/packages/opencode/src/cli/cmd/tui/routes/home.tsx#L19,
https://github.com/anomalyco/opencode/blob/dev/packages/opencode/src/cli/cmd/tui/routes/home.tsx#L79, making use of a module-scoped variable to make sure prompts passed in through navigation and the cli args only get added and submitted once.

On making my PR that allows passing session specific args to work with this, I blindly followed the TODO method but continuing with this improper code would further increase code smell and use of bad practices, so it would be nice to get it fixed as soon as possible and I can make updates on my PR.

This would also make future changes to follow the good practice not the bad one.

Plugins

None

OpenCode version

1.2.15

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

macOS

Terminal

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions