feat(bridge): implement presentation-aware handover and robust placeholder resolution
- Upgraded launch_from_cache to automatically trigger LibreOffice/AppleScript launchers after file copy. - Hardened expandPath to resolve [home] and [tmp] placeholders anywhere in strings via global regex. - Enhanced get-device-info telemetry to provide absolute home and tmp paths to the UI. - Exposed native:launch-presentation in preload and implemented explicit LibreOffice (--impress) support on Linux.
This commit is contained in:
@@ -3,10 +3,10 @@ import * as path from 'path';
|
||||
|
||||
export function expandPath(filePath: string): string {
|
||||
if (!filePath) return filePath;
|
||||
if (filePath.startsWith('[home]')) {
|
||||
return path.join(os.homedir(), filePath.replace('[home]', ''));
|
||||
}
|
||||
return filePath;
|
||||
// Resolve all instances of [home] and [tmp] using global regex
|
||||
return filePath
|
||||
.replace(/\[home\]/g, os.homedir())
|
||||
.replace(/\[tmp\]/g, os.tmpdir());
|
||||
}
|
||||
|
||||
export function getHashedPath(cacheRoot: string, hash: string): string {
|
||||
|
||||
Reference in New Issue
Block a user