bump 1.4.3

This commit is contained in:
Andrew Pareles 2025-06-06 01:00:30 -07:00
parent 584dc18ede
commit 9bf0646abe
2 changed files with 24 additions and 11 deletions

View file

@ -1,8 +1,8 @@
{ {
"nameShort": "Void", "nameShort": "Void",
"nameLong": "Void", "nameLong": "Void",
"voidVersion": "1.4.2", "voidVersion": "1.4.3",
"voidRelease": "0037", "voidRelease": "0038",
"applicationName": "void", "applicationName": "void",
"dataFolderName": ".void-editor", "dataFolderName": ".void-editor",
"win32MutexName": "voideditor", "win32MutexName": "voideditor",

View file

@ -43,15 +43,28 @@ const validateURI = (uriStr: unknown) => {
if (uriStr === null) throw new Error(`Invalid LLM output: uri was null.`) if (uriStr === null) throw new Error(`Invalid LLM output: uri was null.`)
if (typeof uriStr !== 'string') throw new Error(`Invalid LLM output format: Provided uri must be a string, but it's a(n) ${typeof uriStr}. Full value: ${JSON.stringify(uriStr)}.`) if (typeof uriStr !== 'string') throw new Error(`Invalid LLM output format: Provided uri must be a string, but it's a(n) ${typeof uriStr}. Full value: ${JSON.stringify(uriStr)}.`)
const uri = URI.file(uriStr) // Check if it's already a full URI with scheme (e.g., vscode-remote://, file://, etc.)
return uri // Look for :// pattern which indicates a scheme is present
// // Try to parse as full URI first (for remote schemes like ssh://, wsl://, etc.) // Examples of supported URIs:
// try { // - vscode-remote://wsl+Ubuntu/home/user/file.txt (WSL)
// const uri = URI.parse(uriStr) // - vscode-remote://ssh-remote+myserver/home/user/file.txt (SSH)
// return uri // - file:///home/user/file.txt (local file with scheme)
// } catch (e) { // - /home/user/file.txt (local file path, will be converted to file://)
// // If parsing as URI fails, treat as file path (backwards compatibility) // - C:\Users\file.txt (Windows local path, will be converted to file://)
// } if (uriStr.includes('://')) {
try {
const uri = URI.parse(uriStr)
return uri
} catch (e) {
// If parsing fails, it's a malformed URI
throw new Error(`Invalid URI format: ${uriStr}. Error: ${e}`)
}
} else {
// No scheme present, treat as file path
// This handles regular file paths like /home/user/file.txt or C:\Users\file.txt
const uri = URI.file(uriStr)
return uri
}
} }
const validateOptionalURI = (uriStr: unknown) => { const validateOptionalURI = (uriStr: unknown) => {