mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-04 06:30:53 +00:00
Introduce a config module to manage configuration (#22)
* Introduce a config module to manage configuration * Remove public modifier
This commit is contained in:
parent
e1fac40256
commit
3afaa8033b
10 changed files with 131 additions and 174 deletions
|
|
@ -1,13 +1,5 @@
|
|||
import process from 'node:process';
|
||||
import path from 'node:path'; // Import the 'path' module
|
||||
|
||||
/**
|
||||
* Returns the target directory, using the provided argument or the current working directory.
|
||||
*/
|
||||
export function getTargetDirectory(targetDirArg: string | undefined): string {
|
||||
return targetDirArg || process.cwd();
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortens a path string if it exceeds maxLen, prioritizing the start and end segments.
|
||||
* Example: /path/to/a/very/long/file.txt -> /path/.../long/file.txt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue