mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
fix: VSCode detection null check and debug message optimization (#983)
This commit is contained in:
@@ -551,6 +551,11 @@ export const AppContainer = (props: AppContainerProps) => {
|
|||||||
[visionSwitchResolver],
|
[visionSwitchResolver],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// onDebugMessage should log to console, not update footer debugMessage
|
||||||
|
const onDebugMessage = useCallback((message: string) => {
|
||||||
|
console.debug(message);
|
||||||
|
}, []);
|
||||||
|
|
||||||
const performMemoryRefresh = useCallback(async () => {
|
const performMemoryRefresh = useCallback(async () => {
|
||||||
historyManager.addItem(
|
historyManager.addItem(
|
||||||
{
|
{
|
||||||
@@ -628,7 +633,7 @@ export const AppContainer = (props: AppContainerProps) => {
|
|||||||
historyManager.addItem,
|
historyManager.addItem,
|
||||||
config,
|
config,
|
||||||
settings,
|
settings,
|
||||||
setDebugMessage,
|
onDebugMessage,
|
||||||
handleSlashCommand,
|
handleSlashCommand,
|
||||||
shellModeActive,
|
shellModeActive,
|
||||||
() => settings.merged.general?.preferredEditor as EditorType,
|
() => settings.merged.general?.preferredEditor as EditorType,
|
||||||
|
|||||||
@@ -60,7 +60,10 @@ function verifyVSCode(
|
|||||||
if (ide.name !== IDE_DEFINITIONS.vscode.name) {
|
if (ide.name !== IDE_DEFINITIONS.vscode.name) {
|
||||||
return ide;
|
return ide;
|
||||||
}
|
}
|
||||||
if (ideProcessInfo.command.toLowerCase().includes('code')) {
|
if (
|
||||||
|
ideProcessInfo.command &&
|
||||||
|
ideProcessInfo.command.toLowerCase().includes('code')
|
||||||
|
) {
|
||||||
return IDE_DEFINITIONS.vscode;
|
return IDE_DEFINITIONS.vscode;
|
||||||
}
|
}
|
||||||
return IDE_DEFINITIONS.vscodefork;
|
return IDE_DEFINITIONS.vscodefork;
|
||||||
|
|||||||
Reference in New Issue
Block a user