Skip to content

Commit c3732d4

Browse files
authored
Merge pull request #147 from devchat-ai/fix_command_path_replace
Fix command path replace
2 parents 9b7edfb + c737dd0 commit c3732d4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

devchat/engine/command_parser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ class Parameter(BaseModel, extra='forbid'):
1010
description: Optional[str]
1111
enum: Optional[List[str]]
1212
default: Optional[str]
13-
required: Optional[bool]
1413

1514

1615
class Command(BaseModel, extra='forbid'):
1716
description: str
17+
hint: Optional[str]
1818
parameters: Optional[Dict[str, Parameter]]
19+
input: Optional[str]
1920
steps: Optional[List[Dict[str, str]]]
2021

2122

@@ -60,7 +61,7 @@ def parse_command(file_path: str) -> Command:
6061

6162
with open(file_path, 'r', encoding='utf-8') as file:
6263
# replace {curpath} with config_dir
63-
content = file.read().replace('{curpath}', config_dir)
64+
content = file.read().replace('$command_path', config_dir)
6465
config_dict = yaml.safe_load(content)
6566
config = Command(**config_dict)
6667
return config

0 commit comments

Comments
 (0)