mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-24 19:24:22 +01:00
feat: add noReply parameter (#3433)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ae62bc8b1f
commit
2e434a459a
@@ -94,6 +94,7 @@ export namespace SessionPrompt {
|
||||
})
|
||||
.optional(),
|
||||
agent: z.string().optional(),
|
||||
noReply: z.boolean().optional(),
|
||||
system: z.string().optional(),
|
||||
tools: z.record(z.string(), z.boolean()).optional(),
|
||||
parts: z.array(
|
||||
@@ -142,6 +143,11 @@ export namespace SessionPrompt {
|
||||
const userMsg = await createUserMessage(input)
|
||||
await Session.touch(input.sessionID)
|
||||
|
||||
// Early return for context-only messages (no AI inference)
|
||||
if (input.noReply) {
|
||||
return userMsg
|
||||
}
|
||||
|
||||
if (isBusy(input.sessionID)) {
|
||||
return new Promise((resolve) => {
|
||||
const queue = state().queued.get(input.sessionID) ?? []
|
||||
|
||||
Reference in New Issue
Block a user