mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-18 12:13:58 +00:00
feat(cli): add --append-system-prompt-file support
This commit is contained in:
1 parent
efecd7c7d9
commit
45c231a717
8 files changed
+382
-34
No files matched your search
@@ -36,4 +36,34 @@ describe('appendThirdPartyImageAnalysisToolArgs', () => {
|
||||
'extra',
|
||||
]);
|
||||
});
|
||||
|
||||
// File mode: --append-system-prompt-file when user passes --append-system-prompt-file
|
||||
|
||||
it('uses --append-system-prompt-file when user passes --append-system-prompt-file', () => {
|
||||
const result = appendThirdPartyImageAnalysisToolArgs([
|
||||
'-p',
|
||||
'describe',
|
||||
'--append-system-prompt-file',
|
||||
'/tmp/user-prompt.txt',
|
||||
]);
|
||||
|
||||
expect(result).toContain('--append-system-prompt-file');
|
||||
expect(result).not.toContain('--append-system-prompt');
|
||||
const fileFlags = result.filter((arg) => arg === '--append-system-prompt-file');
|
||||
expect(fileFlags.length).toBeGreaterThanOrEqual(2);
|
||||
});
|
||||
|
||||
it('uses --append-system-prompt-file when user passes equals form', () => {
|
||||
const result = appendThirdPartyImageAnalysisToolArgs([
|
||||
'-p',
|
||||
'describe',
|
||||
'--append-system-prompt-file=/tmp/user-prompt.txt',
|
||||
]);
|
||||
|
||||
expect(result).not.toContain('--append-system-prompt');
|
||||
const fileFlags = result.filter(
|
||||
(arg) => arg === '--append-system-prompt-file' || arg.startsWith('--append-system-prompt-file=')
|
||||
);
|
||||
expect(fileFlags.length).toBeGreaterThanOrEqual(2);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user