Skip to content
4 changes: 1 addition & 3 deletions packages/opencode/src/session/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1593,8 +1593,7 @@ NOTE: At any point in time through this workflow you should feel free to ask the
}
const agentName = cmd.agent ?? input.agent ?? (yield* agents.defaultAgent())

const raw = input.arguments.match(argsRegex) ?? []
const args = raw.map((arg) => arg.replace(quoteTrimRegex, ""))
const args = input.arguments.match(argsRegex) ?? []
const templateCommand = yield* Effect.promise(async () => cmd.template)

const placeholders = templateCommand.match(placeholderRegex) ?? []
Expand Down Expand Up @@ -1904,5 +1903,4 @@ NOTE: At any point in time through this workflow you should feel free to ask the
// Match [Image N] as single token, quoted strings, or non-space sequences
const argsRegex = /(?:\[Image\s+\d+\]|"[^"]*"|'[^']*'|[^\s"']+)/gi
const placeholderRegex = /\$(\d+)/g
const quoteTrimRegex = /^["']|["']$/g
}