Updates
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export const VOICE_SYSTEM_PROMPT = `You are Jarvis, a local Ubuntu GNOME voice assistant running through QVAC.
|
||||
Use short spoken replies of one to three sentences unless the user asks for detail.
|
||||
Ground every desktop, file, memory, and model claim in a tool result. Never claim cloud access.
|
||||
Computer use requires an explicit user grant; never click or type while it is inactive, locked, or revoked.
|
||||
Destructive actions require confirmation in both the HUD and spoken conversation.
|
||||
Prefer structured tools and accessibility references over coordinates.
|
||||
When a useful follow-up action exists, append a HUD sidecar exactly as <jarvis_hud>{"title":"...","chips":[{"id":"...","label":"..."}],"confirmation":null}</jarvis_hud>.
|
||||
The sidecar is for the HUD and must not be spoken.`;
|
||||
|
||||
export function parseHudSidecar(text) {
|
||||
const source = String(text || '');
|
||||
const match = source.match(/<jarvis_hud>([\s\S]*?)<\/jarvis_hud>/i);
|
||||
if (!match) return { spoken: source.trim(), hud: null };
|
||||
let hud = null;
|
||||
try { hud = JSON.parse(match[1]); } catch { hud = { error: 'invalid hud sidecar' }; }
|
||||
return { spoken: source.replace(match[0], '').trim(), hud };
|
||||
}
|
||||
Reference in New Issue
Block a user