mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 12:11:09 +00:00
Treat undefined same as true for isTrustedFolder (#7073)
This commit is contained in:
parent
b6cca01161
commit
97ce197f38
4 changed files with 39 additions and 5 deletions
|
|
@ -136,6 +136,24 @@ describe('ToolConfirmationMessage', () => {
|
|||
expect(lastFrame()).toContain(alwaysAllowText);
|
||||
});
|
||||
|
||||
it('should show "allow always" when folder trust is undefined', () => {
|
||||
const mockConfig = {
|
||||
isTrustedFolder: () => undefined,
|
||||
getIdeMode: () => false,
|
||||
} as unknown as Config;
|
||||
|
||||
const { lastFrame } = renderWithProviders(
|
||||
<ToolConfirmationMessage
|
||||
confirmationDetails={details}
|
||||
config={mockConfig}
|
||||
availableTerminalHeight={30}
|
||||
terminalWidth={80}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(lastFrame()).toContain(alwaysAllowText);
|
||||
});
|
||||
|
||||
it('should NOT show "allow always" when folder is untrusted', () => {
|
||||
const mockConfig = {
|
||||
isTrustedFolder: () => false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue