fix(cli): match managed prompt files by exact path

This commit is contained in:
Tam Nhu Tran committed 2026-04-13 08:39:59 -04:00
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);
});
});