Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/opencode/src/cli/cmd/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export const RunCommand = effectCmd({
const localInstance = yield* InstanceRef
yield* Effect.promise(async () => {
const rawMessage = [...args.message, ...(args["--"] || [])].join(" ")
const interactive = args.mini
const interactive = args.mini || args.interactive
const auto = args.auto || args.yolo || args["dangerously-skip-permissions"]
const thinking = interactive ? (args.thinking ?? true) : (args.thinking ?? false)
const die = (message: string): never => {
Expand All @@ -290,10 +290,10 @@ export const RunCommand = effectCmd({
.join(" ")

if (interactive && args.command) {
die("--mini cannot be used with --command")
die("--interactive cannot be used with --command")
}

if (interactive && args._?.[0] !== "mini") {
if (interactive && !args.interactive && args._?.[0] !== "mini") {
die("--mini must be used without the run subcommand")
}

Expand All @@ -317,7 +317,7 @@ export const RunCommand = effectCmd({
}

if (interactive && !process.stdout.isTTY) {
die("--mini requires a TTY stdout")
die("interactive mode requires a TTY stdout")
}

if (interactive) {
Expand Down
Loading