Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
coderai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
coderai
Commits
905dc92d
Commit
905dc92d
authored
Mar 01, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix single message mode, add --no-prompt flag, disable confirmations in non-interactive mode
parent
14de0c00
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
+24
-5
coder
coder
+24
-5
No files found.
coder
View file @
905dc92d
...
...
@@ -150,6 +150,7 @@ class Config:
confirm_commands
:
Dict
[
str
,
bool
]
=
None
# Per-command confirmation settings
debug
:
bool
=
False
# Show debug output including raw tool calls
max_context
:
int
=
32768
# Maximum context size in tokens
no_prompt
:
bool
=
False
# Don't send system prompt
def
__post_init__
(
self
):
if
self
.
confirm_commands
is
None
:
...
...
@@ -177,6 +178,7 @@ class Config:
config
.
timeout
=
data
.
get
(
'timeout'
,
config
.
timeout
)
config
.
debug
=
data
.
get
(
'debug'
,
config
.
debug
)
config
.
max_context
=
data
.
get
(
'max_context'
,
config
.
max_context
)
config
.
no_prompt
=
data
.
get
(
'no_prompt'
,
config
.
no_prompt
)
except
(
json
.
JSONDecodeError
,
IOError
)
as
e
:
print
(
f
"Warning: Could not load config from {config_path}: {e}"
,
file
=
sys
.
stderr
)
...
...
@@ -200,7 +202,8 @@ class Config:
'micro'
:
self
.
micro
,
'timeout'
:
self
.
timeout
,
'debug'
:
self
.
debug
,
'max_context'
:
self
.
max_context
'max_context'
:
self
.
max_context
,
'no_prompt'
:
self
.
no_prompt
}
with
open
(
config_path
,
'w'
)
as
f
:
...
...
@@ -530,7 +533,10 @@ class CoderClient:
"content"
:
message
})
# Prepare messages with system prompt
# Prepare messages with system prompt (if not disabled)
if
self
.
config
.
no_prompt
:
messages
=
[]
else
:
messages
=
[{
"role"
:
"system"
,
"content"
:
self
.
config
.
system_prompt
}]
messages
.
extend
(
self
.
conversation_history
)
...
...
@@ -1383,6 +1389,13 @@ Examples:
help
=
'Use micro model mode (ultra-minimal prompt for models under 1.5B parameters)'
)
parser
.
add_argument
(
'--no-prompt'
,
action
=
'store_true'
,
dest
=
'no_prompt'
,
help
=
'Do not send system prompt (for custom use cases)'
)
parser
.
add_argument
(
'--timeout'
,
type
=
int
,
...
...
@@ -1451,6 +1464,8 @@ Examples:
config
.
debug
=
True
if
args
.
max_context
:
config
.
max_context
=
args
.
max_context
if
args
.
no_prompt
:
config
.
no_prompt
=
True
# Apply small/tiny model system prompt if enabled
if
config
.
micro
:
...
...
@@ -1484,8 +1499,12 @@ Examples:
message
=
args
.
message
or
args
.
msg_flag
if
message
:
# Single message mode
client
.
chat
(
message
,
stream
=
not
args
.
no_stream
)
# Single message mode - disable confirmations for non-interactive use
client
.
config
.
confirm_all
=
False
result
=
client
.
chat
(
message
,
stream
=
not
args
.
no_stream
)
# Print result if non-streaming (streaming prints internally)
if
args
.
no_stream
and
result
:
print
(
result
)
else
:
# Interactive shell mode
run_interactive_shell
(
client
,
session_manager
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment