mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 02:15:36 +00:00
fix(cli): match managed prompt files by exact path
This commit is contained in:
1 parent
45c231a717
commit
7fc39f7c03
7 files changed
+135
-57
No files matched your search
@@ -66,4 +66,17 @@ describe('appendThirdPartyImageAnalysisToolArgs', () => {
|
||||
);
|
||||
expect(fileFlags.length).toBeGreaterThanOrEqual(2);
|
||||
});
|
||||
|
||||
it('does not treat unrelated user prompt files as the managed CCS steering prompt', () => {
|
||||
const result = appendThirdPartyImageAnalysisToolArgs([
|
||||
'-p',
|
||||
'describe',
|
||||
'--append-system-prompt-file',
|
||||
'/tmp/user-ccs-prompt-image-analysis-tool-notes.txt',
|
||||
]);
|
||||
|
||||
const filePaths = result.filter((arg, index) => result[index - 1] === '--append-system-prompt-file');
|
||||
expect(filePaths).toContain('/tmp/user-ccs-prompt-image-analysis-tool-notes.txt');
|
||||
expect(filePaths.some((filePath) => filePath.endsWith('/ccs-prompt-image-analysis-tool.txt'))).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user