Merge branch 'main' into feat/image-attachment

This commit is contained in:
LaZzyMan 2026-02-10 14:16:21 +08:00
commit 56030f9291
609 changed files with 26677 additions and 12343 deletions

View file

@ -7,6 +7,9 @@
import * as fs from 'node:fs/promises';
import * as path from 'node:path';
import { ClipboardManager } from '@teddyzhu/clipboard';
import { createDebugLogger } from '@qwen-code/qwen-code-core';
const debugLogger = createDebugLogger('CLIPBOARD_UTILS');
/**
* Checks if the system clipboard contains an image
@ -17,9 +20,7 @@ export async function clipboardHasImage(): Promise<boolean> {
const clipboard = new ClipboardManager();
return clipboard.hasFormat('image');
} catch (error) {
if (process.env['DEBUG']) {
console.error('Error checking clipboard for image:', error);
}
debugLogger.error('Error checking clipboard for image:', error);
return false;
}
}
@ -61,9 +62,7 @@ export async function saveClipboardImage(
return tempFilePath;
} catch (error) {
if (process.env['DEBUG']) {
console.error('Error saving clipboard image:', error);
}
debugLogger.error('Error saving clipboard image:', error);
return null;
}
}