mirror of
https://github.com/larsbaunwall/vscode-copilot-bridge.git
synced 2025-10-05 22:22:59 +00:00
nit: name error in catch for JSON.stringify fallback
Co-Authored-By: Lars Baunwall <larslb@thinkability.dk>
This commit is contained in:
parent
a636147dd9
commit
4fd1026e4d
1 changed files with 1 additions and 1 deletions
|
|
@ -209,7 +209,7 @@ function toText(content: any): string {
|
|||
if (typeof content === 'string') return content;
|
||||
if (Array.isArray(content)) return content.map(toText).join('\n');
|
||||
if (content && typeof content === 'object' && typeof content.text === 'string') return content.text;
|
||||
try { return JSON.stringify(content); } catch { return String(content); }
|
||||
try { return JSON.stringify(content); } catch (error) { return String(content); }
|
||||
}
|
||||
|
||||
function normalizeMessagesLM(messages: any[], histWindow: number): any[] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue