Skip to content

Commit 84f0c49

Browse files
committed
webui beautification
1 parent 190fba7 commit 84f0c49

File tree

19 files changed

+1287
-136
lines changed

19 files changed

+1287
-136
lines changed

projects/code_genesis/architect.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generation_config:
1212
extra_body:
1313
enable_thinking: false
1414
dashscope_extend_params:
15-
provider: d
15+
provider: b
1616

1717

1818
prompt:

projects/code_genesis/coding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generation_config:
1212
extra_body:
1313
enable_thinking: false
1414
dashscope_extend_params:
15-
provider: d
15+
provider: b
1616

1717

1818
prompt:

projects/code_genesis/file_design.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generation_config:
1212
extra_body:
1313
enable_thinking: false
1414
dashscope_extend_params:
15-
provider: d
15+
provider: b
1616

1717

1818
prompt:

projects/code_genesis/file_order.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generation_config:
1212
extra_body:
1313
enable_thinking: false
1414
dashscope_extend_params:
15-
provider: d
15+
provider: b
1616

1717

1818
prompt:

projects/code_genesis/install.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generation_config:
1212
extra_body:
1313
enable_thinking: false
1414
dashscope_extend_params:
15-
provider: d
15+
provider: b
1616

1717

1818
prompt:

projects/code_genesis/orchestrator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generation_config:
1212
extra_body:
1313
enable_thinking: false
1414
dashscope_extend_params:
15-
provider: d
15+
provider: b
1616

1717

1818
prompt:

projects/code_genesis/refine.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ generation_config:
1010
top_k: 20
1111
max_tokens: 64000
1212
extra_body:
13+
enable_thinking: false
1314
dashscope_extend_params:
1415
provider: b
1516

@@ -48,7 +49,6 @@ prompt:
4849
4950
3. Use your tools effectively
5051
* Use `read_file` to read the original file. When using `read_file`, specify `start_line` and `end_line` to reduce token usage
51-
* When modifying files, prefer `edit_file` for partial edits; if you must rewrite an entire file, use `write_file`
5252
* If an HTTP API is unclear, use `workflow/api_search` to locate the implementation
5353
* Use `search_file_content` to search the project for keywords you care about
5454
* Shell commands must not use system directories (except `/dev/null`)
@@ -58,11 +58,12 @@ prompt:
5858
* Check available tools by looking for tools prefixed with `edgeone-pages-mcp`
5959
6060
Your workflow:
61-
* You need to create a workspace_dir in the current working directory, and move necessary materials to the workspace_dir in the current working directory, filtering out unnecessary files like node_modules, dist, build, etc.
62-
* Compress the workspace_dir into a zip file and name it workspace_dir.zip
61+
* The workspace_dir mentioned in the context is your current working directory (where all generated files are located)
62+
* You need to create a subdirectory called "workspace" inside workspace_dir, and copy necessary materials to it, filtering out unnecessary files like node_modules, dist, build, .npm-cache, etc.
63+
* Compress the workspace subdirectory into a zip file and name it workspace.zip in the workspace_dir
6364
* Once the project is working, use the EdgeOne Pages MCP tools to deploy it
6465
* Follow the deployment documentation provided in the user message
65-
* Upload the workspace_dir.zip to EdgeOne Pages and deploy it
66+
* When calling the deployment tool, first use the shell command `pwd` to get the current working directory path, then use "<current_path>/workspace.zip" as the builtFolderPath parameter
6667
6768
5. If everything is OK, you may exit
6869
* Ignore warnings like unused variables; they don't affect runtime behavior
@@ -75,6 +76,7 @@ prompt:
7576
tools:
7677
shell:
7778
mcp: false
79+
timeout: 10
7880
file_system:
7981
mcp: false
8082
include:
@@ -94,6 +96,8 @@ tools:
9496
args: ["edgeone-pages-mcp"]
9597
env:
9698
EDGEONE_PAGES_API_TOKEN: ""
99+
EDGEONE_PAGES_PROJECT_NAME: ""
100+
NODE_TLS_REJECT_UNAUTHORIZED: "0"
97101
timeout: 600
98102
sse_read_timeout: 600
99103

projects/code_genesis/user_story.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generation_config:
1212
extra_body:
1313
enable_thinking: false
1414
dashscope_extend_params:
15-
provider: d
15+
provider: b
1616

1717

1818
prompt:

projects/code_genesis/workflow.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@ file_order:
3030
next:
3131
- install
3232

33-
orchestrator:
34-
agent:
35-
kwargs:
36-
code_file: workflow/orchestrator.py
37-
agent_config: orchestrator.yaml
38-
next:
39-
- install
40-
4133
install:
4234
agent_config: install.yaml
4335
agent:

projects/code_genesis/workflow/coding.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ def __init__(self,
6161
trust_remote_code: bool = False,
6262
code_file: str = None,
6363
**kwargs):
64+
# Validate and adjust config before passing to parent
65+
config = self._validate_config(config)
6466
super().__init__(config, tag, trust_remote_code, **kwargs)
6567
self.code_file = code_file
6668
index_dir: str = getattr(config, 'index_cache_dir', DEFAULT_INDEX_DIR)
@@ -78,6 +80,39 @@ def __init__(self,
7880
self.find_all_files()
7981
self.error_counter = 0
8082

83+
def _validate_config(self, config: DictConfig) -> DictConfig:
84+
"""Validate config and disable edit_file if credentials are missing."""
85+
from omegaconf import OmegaConf
86+
87+
# Make config mutable for modifications
88+
config = OmegaConf.to_container(config, resolve=True)
89+
90+
# Check edit_file_config.api_key
91+
edit_file_api_key = None
92+
try:
93+
edit_file_api_key = config.get('tools', {}).get(
94+
'file_system', {}).get('edit_file_config', {}).get('api_key')
95+
except Exception:
96+
pass
97+
98+
if not edit_file_api_key:
99+
# Remove edit_file from include list
100+
try:
101+
include_list = config.get('tools',
102+
{}).get('file_system',
103+
{}).get('include', [])
104+
if include_list and 'edit_file' in include_list:
105+
include_list.remove('edit_file')
106+
logger.warning(
107+
'[coding] edit_file_config.api_key not set, removing edit_file from tools'
108+
)
109+
except Exception:
110+
pass
111+
else:
112+
logger.info('[coding] edit_file_config.api_key is configured')
113+
114+
return OmegaConf.create(config)
115+
81116
# async def condense_memory(self, messages):
82117
# return messages
83118

0 commit comments

Comments
 (0)