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
28b8fa4d
Commit
28b8fa4d
authored
Mar 19, 2026
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix order - import from text.py before calling set_global_args
parent
5b5776d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
main.py
codai/main.py
+4
-4
No files found.
codai/main.py
View file @
28b8fa4d
...
@@ -45,10 +45,7 @@ def main():
...
@@ -45,10 +45,7 @@ def main():
download_model
,
download_model
,
)
)
# Store args globally for access in endpoints
# Import global setters from text module FIRST (before calling them)
set_global_args
(
args
)
# Import global setters from text module
from
codai.api.text
import
(
from
codai.api.text
import
(
set_global_args
,
set_global_args
,
set_global_debug
,
set_global_debug
,
...
@@ -57,6 +54,9 @@ def main():
...
@@ -57,6 +54,9 @@ def main():
)
)
from
codai.api.app
import
set_load_mode
from
codai.api.app
import
set_load_mode
# Store args globally for access in endpoints (both state and text.py)
set_global_args
(
args
)
# Set global variables
# Set global variables
global
global_system_prompt
,
global_tools_closer_prompt
,
global_debug
,
global_dump
,
global_file_path
,
grammar_guided_gen
global
global_system_prompt
,
global_tools_closer_prompt
,
global_debug
,
global_dump
,
global_file_path
,
grammar_guided_gen
...
...
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