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
55810d7b
Commit
55810d7b
authored
Mar 01, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add visual separator and multiline input support
parent
fc4f93f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
coder
coder
+23
-1
No files found.
coder
View file @
55810d7b
...
@@ -702,17 +702,33 @@ def run_interactive_shell(client: CoderClient) -> None:
...
@@ -702,17 +702,33 @@ def run_interactive_shell(client: CoderClient) -> None:
print
(
f
"{Colors.DIM}Type /quit, /exit or press Ctrl+C to exit.{Colors.RESET}"
)
print
(
f
"{Colors.DIM}Type /quit, /exit or press Ctrl+C to exit.{Colors.RESET}"
)
print
(
f
"{Colors.DIM}Type /clear to clear conversation history.{Colors.RESET}"
)
print
(
f
"{Colors.DIM}Type /clear to clear conversation history.{Colors.RESET}"
)
print
(
f
"{Colors.DIM}Type /help for more commands.{Colors.RESET}"
)
print
(
f
"{Colors.DIM}Type /help for more commands.{Colors.RESET}"
)
print
(
f
"{Colors.DIM}End line with
\\
to continue on next line (multiline){Colors.RESET}"
)
print
(
f
"{Colors.CYAN}{'-' * 60}{Colors.RESET}"
)
print
(
f
"{Colors.CYAN}{'-' * 60}{Colors.RESET}"
)
while
True
:
while
True
:
try
:
try
:
# Colorful prompt
# Colorful prompt
prompt
=
f
"{Colors.BOLD}{Colors.BLUE}CoderCLI>{Colors.RESET} "
prompt
=
f
"{Colors.BOLD}{Colors.BLUE}CoderCLI>{Colors.RESET} "
user_input
=
input
(
prompt
)
.
strip
()
lines
=
[]
while
True
:
line
=
input
(
prompt
)
# Check if line ends with backslash for continuation
if
line
.
rstrip
()
.
endswith
(
'
\\
'
):
lines
.
append
(
line
.
rstrip
()[:
-
1
])
# Remove backslash
prompt
=
f
"{Colors.BLUE} ...>{Colors.RESET} "
# Continuation prompt
else
:
lines
.
append
(
line
)
break
user_input
=
'
\n
'
.
join
(
lines
)
.
strip
()
if
not
user_input
:
if
not
user_input
:
continue
continue
# Print separator after user input
print
(
f
"{Colors.CYAN}{'─' * 40}{Colors.RESET}"
)
# Handle commands with / prefix
# Handle commands with / prefix
cmd
=
user_input
.
lower
()
cmd
=
user_input
.
lower
()
...
@@ -775,6 +791,12 @@ def print_help():
...
@@ -775,6 +791,12 @@ def print_help():
{Colors.YELLOW}/read <path>{Colors.RESET} Read a file directly
{Colors.YELLOW}/read <path>{Colors.RESET} Read a file directly
{Colors.YELLOW}/exec <command>{Colors.RESET} Execute a shell command directly
{Colors.YELLOW}/exec <command>{Colors.RESET} Execute a shell command directly
{Colors.BOLD}{Colors.CYAN}Multiline Input:{Colors.RESET}
End a line with {Colors.YELLOW}
\\
{Colors.RESET} to continue on next line
Example:
CoderCLI> This is a
\\
...> multiline message
{Colors.BOLD}{Colors.CYAN}The assistant can use tools to:{Colors.RESET}
{Colors.BOLD}{Colors.CYAN}The assistant can use tools to:{Colors.RESET}
- {Colors.BLUE}read_file{Colors.RESET}: Read file contents
- {Colors.BLUE}read_file{Colors.RESET}: Read file contents
- {Colors.BLUE}write_file{Colors.RESET}: Write/create files
- {Colors.BLUE}write_file{Colors.RESET}: Write/create files
...
...
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