switch from console.warn to info item (#440)

This commit is contained in:
Olcan 2025-05-19 15:21:31 -07:00 committed by GitHub
parent 96387aba83
commit a756489f86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -89,8 +89,12 @@ export const useShellCommandProcessor = (
if (fs.existsSync(pwdFilePath)) {
const pwd = fs.readFileSync(pwdFilePath, 'utf8').trim();
if (pwd !== targetDir) {
console.warn(
`shell mode is stateless; \`cd ${pwd}\` will not apply to next command`,
addItemToHistory(
{
type: 'info',
text: `WARNING: shell mode is stateless; \`cd ${pwd}\` will not apply to next command`,
},
userMessageTimestamp,
);
}
fs.unlinkSync(pwdFilePath);