Skip to content

Commit 82f8a1e

Browse files
welkeyeverAsterDY
authored andcommitted
fix: make default Config works fine even if without .env
1 parent 62042cc commit 82f8a1e

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ output/*
4040
debug/
4141
target/
4242
tmp/
43-
tmp_compress
43+
tmp_*/
4444

4545
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
4646
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,13 @@ refactoring guidance.
5353
## Running through Coze OpenAPI
5454
1. Set .env file for configuration on ABCoder's working directory. Taking Coze as an example:
5555
```
56-
REPO_DIR={YOU_REPO_PATH}
57-
CACHE_DIR={YOUR_CACHE_PATH}
58-
TOOLS_DIR={ABCODER_PATH}/tools
56+
# Base directory for other XXX_DIRs, default to current directory
57+
WORK_DIR=./
58+
59+
# DIRs below support both relative and absolute paths, and relative paths are relative to WORK_DIR
60+
REPO_DIR=tmp_repos
61+
CACHE_DIR=tmp_caches
62+
TOOLS_DIR=tools
5963
EXCLUDE_DIRS=target,gen-codes
6064
6165
# coze|ollama

src/config/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ fn default_work_dir() -> String {
5454
}
5555

5656
fn default_repo_dir() -> String {
57-
"tmp".to_string()
57+
"tmp_repos".to_string()
5858
}
5959

6060
fn default_tools_dir() -> String {
6161
"tools".to_string()
6262
}
6363

6464
fn default_cache_dir() -> String {
65-
"tmp_compress".to_string()
65+
"tmp_caches".to_string()
6666
}
6767

6868
fn default_parser_dir() -> String {

0 commit comments

Comments
 (0)