Updates
Rolling release / release (push) Successful in 6m25s

This commit is contained in:
2026-09-11 20:16:47 -04:00
parent d8d4f18e10
commit 9b1ceda01f
9 changed files with 57 additions and 11 deletions
@@ -66,6 +66,12 @@ class ArcOverlay {
if (this.status.clutter_text) this.status.clutter_text.ellipsize = Pango.EllipsizeMode.END;
this.header.add_child(this.title); this.header.add_child(new St.Widget({ x_expand: true })); this.header.add_child(this.status);
this.statusLine = new St.Label({ text: 'Super+Shift+J · Hold Talk to speak', style_class: 'jarvis-status-line' });
this.thinkingToggle = new St.Button({ label: 'Thinking', style_class: 'jarvis-thinking-toggle', visible: false, can_focus: true, reactive: true });
this.thinkingToggle.accessible_name = 'Show or hide Jarvis thinking';
this.thinkingToggle.connect('clicked', () => this.toggleThinking());
this.thinking = new St.Label({ text: '', style_class: 'jarvis-thinking', visible: false, x_expand: true, can_focus: true });
this.thinking.accessible_name = 'Jarvis thinking';
if (this.thinking.clutter_text) { this.thinking.clutter_text.line_wrap = true; this.thinking.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; }
this.job = new St.Label({ text: '', style_class: 'jarvis-job', can_focus: true, visible: false }); this.job.accessible_name = 'Jarvis job progress';
this.target = new St.Label({ text: '', style_class: 'jarvis-target', can_focus: true, visible: false }); this.target.accessible_name = 'Computer use target';
this.cursor = new St.Label({ text: '', style_class: 'jarvis-agent-cursor', can_focus: false, visible: false }); this.cursor.accessible_name = 'Visible computer use cursor';
@@ -80,7 +86,7 @@ class ArcOverlay {
const chip = new St.Button({ label: mode, style_class: 'jarvis-chip', can_focus: true, reactive: true }); chip.accessible_name = `${mode} mode`;
chip.connect('clicked', () => this.onMode?.(mode.toLowerCase())); this.chips.add_child(chip);
}
this.root.add_child(this.header); this.root.add_child(this.statusLine); this.root.add_child(this.job); this.root.add_child(this.target); this.root.add_child(this.cursor); this.root.add_child(this.wave); this.root.add_child(this.scroll); this.root.add_child(this.chips);
this.root.add_child(this.header); this.root.add_child(this.statusLine); this.root.add_child(this.thinkingToggle); this.root.add_child(this.thinking); this.root.add_child(this.job); this.root.add_child(this.target); this.root.add_child(this.cursor); this.root.add_child(this.wave); this.root.add_child(this.scroll); this.root.add_child(this.chips);
this.controls = new St.BoxLayout({ style_class: 'jarvis-chips' });
this.talk = new St.Button({ label: 'Talk', style_class: 'jarvis-chip jarvis-talk', reactive: true, can_focus: true });
this.talk.accessible_name = 'Hold Space or Enter to talk';
@@ -91,7 +97,7 @@ class ArcOverlay {
this.talk.connect('button-press-event', () => { this.onTalk?.(true); return Clutter.EVENT_STOP; });
this.talk.connect('button-release-event', () => { this.onTalk?.(false); return Clutter.EVENT_STOP; });
this.controls.add_child(this.talk);
for (const [label, action] of [['Stop', () => this.onStop?.()], ['Close', () => this.hide()]]) {
for (const [label, action] of [['Stop', () => this.onStop?.()], ['Minimize', () => this.minimize()], ['Close', () => this.hide()]]) {
const button = new St.Button({ label, style_class: 'jarvis-chip', reactive: true, can_focus: true });
button.connect('clicked', action); this.controls.add_child(button);
}
@@ -101,7 +107,8 @@ class ArcOverlay {
this.reducedMotion = false;
}
attach() { Main.layoutManager.addChrome(this.root, { affectsStruts: false, trackFullscreen: false }); this.halo = new St.Widget({ style_class: 'jarvis-halo', reactive: false }); Main.layoutManager.addChrome(this.halo, { affectsStruts: false, trackFullscreen: false }); this.halo.hide(); this.hide(); }
show() {
show(force = false) {
if (this.minimized && !force) return;
const monitor = Main.layoutManager.primaryMonitor;
if (monitor) {
const width = Math.min(OVERLAY_WIDTH, monitor.width - 80);
@@ -113,12 +120,27 @@ class ArcOverlay {
this.root.visible = true;
if (!wasVisible) this.entry.grab_key_focus();
}
hide() { this.onTalk?.(false); this.root.visible = false; }
toggle() { this.root.visible ? this.hide() : this.show(); }
clear() { this.transcript.destroy_all_children(); }
addRow(who, text) { const body = safeText(text); const row = new St.Label({ text: `${who === 'J' ? 'J' : 'YOU'} ${body}`, style_class: `jarvis-row jarvis-row-${who === 'J' ? 'jarvis' : 'user'}`, can_focus: true }); row.accessible_name = `${who === 'J' ? 'Jarvis' : 'You'}: ${body}`; if (row.clutter_text) { row.clutter_text.line_wrap = true; row.clutter_text.line_wrap_mode = Pango.WrapMode.WORD_CHAR; row.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; } this.transcript.add_child(row); if (this.transcript.get_n_children() > 100) this.transcript.get_first_child().destroy(); this.show(); return row; }
token(text) { const chunk = safeText(text); if (!chunk) return; let row = this.transcript.get_last_child?.(); if (!row || !String(row.style_class || '').includes('jarvis-row-jarvis')) { row = this.addRow('J', ''); } row.text = `${row.text}${chunk}`; row.accessible_name = `Jarvis: ${row.text}`; this.show(); }
hide() { this.onTalk?.(false); this.root.visible = false; this.minimized = false; }
minimize() { this.onTalk?.(false); this.root.visible = false; this.minimized = true; }
toggle() { this.root.visible ? this.hide() : this.show(true); }
clear() { this.transcript.destroy_all_children(); this.thinking.text = ''; this.thinking.visible = false; this.thinkingToggle.visible = false; }
_followConversation() {
const adjustment = this.scroll?.get_vadjustment?.() || this.scroll?.vadjustment;
if (!adjustment) return;
GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE || GLib.PRIORITY_DEFAULT, () => {
try { adjustment.value = Math.max(0, adjustment.upper - adjustment.page_size); } catch {}
return GLib.SOURCE_REMOVE;
});
}
addRow(who, text) { const body = safeText(text); const row = new St.Label({ text: `${who === 'J' ? 'J' : 'YOU'} ${body}`, style_class: `jarvis-row jarvis-row-${who === 'J' ? 'jarvis' : 'user'}`, can_focus: true }); row.accessible_name = `${who === 'J' ? 'Jarvis' : 'You'}: ${body}`; if (row.clutter_text) { row.clutter_text.line_wrap = true; row.clutter_text.line_wrap_mode = Pango.WrapMode.WORD_CHAR; row.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; } this.transcript.add_child(row); if (this.transcript.get_n_children() > 100) this.transcript.get_first_child().destroy(); this.show(); this._followConversation(); return row; }
token(text) { const chunk = safeText(text); if (!chunk) return; let row = this.transcript.get_last_child?.(); if (!row || !String(row.style_class || '').includes('jarvis-row-jarvis')) { row = this.addRow('J', ''); } row.text = `${row.text}${chunk}`; row.accessible_name = `Jarvis: ${row.text}`; this.show(); this._followConversation(); }
updateThinking(text) { const chunk = safeText(text); if (!chunk) return; this.thinking.text = `${this.thinking.text || ''}${chunk}`; this.thinkingToggle.visible = true; this.thinking.visible = true; this.thinkingToggle.label = 'Thinking ▾'; this.show(); }
toggleThinking() { this.thinking.visible = !this.thinking.visible; this.thinkingToggle.label = this.thinking.visible ? 'Thinking ▾' : 'Thinking ▸'; }
finishThinking() { if (this.thinking.text) { this.thinkingToggle.visible = true; this.thinkingToggle.label = 'Thinking ▸'; this.thinking.visible = false; } }
addToolCall(json) { try { const call = JSON.parse(json); this.addRow('J', `Using ${safeText(call.name || 'tool')}`); } catch { this.addRow('J', `Using ${safeText(json)}`); } this.finishThinking(); }
addToolResult(json) { try { const result = JSON.parse(json); this.addRow('J', `${safeText(result.name || 'tool')} complete`); } catch { this.addRow('J', 'Tool complete'); } this.finishThinking(); }
finalizeReply(text) {
this.finishThinking();
const spoken = safeText(text);
let row = this.transcript.get_last_child?.();
if (row && String(row.style_class || '').includes('jarvis-row-jarvis')) {
@@ -175,6 +197,9 @@ export default class JarvisExtension extends Extension {
['WakeHeard', () => this.overlay.show()],
['PartialTranscript', (text) => this.overlay.addRow('U', text)],
['Token', (text) => this.overlay.token(text)],
['Thinking', (text) => this.overlay.updateThinking(text)],
['ToolCall', (json) => this.overlay.addToolCall(json)],
['ToolResult', (json) => this.overlay.addToolResult(json)],
['Reply', (text) => { this.overlay.finalizeReply(text); this.overlay.show(); }],
['SpeakingLevel', (rms) => this.overlay.level(rms)],
['ListeningLevel', (rms) => this.overlay.level(rms)],
@@ -182,7 +207,7 @@ export default class JarvisExtension extends Extension {
['JobProgress', (id, pct, label) => this.overlay.addJob(id, pct, label)],
['ComputerStep', (json) => this.overlay.addStep(json)],
['ComputerHighlight', (json) => this.overlay.setTarget(json)],
['Error', (code, message) => { this.overlay.addRow('J', message); if (coerceText(code) === 'VOICE_UNAVAILABLE') this.overlay.setConnectionStatus('voice-unavailable'); }],
['Error', (code, message) => { this.overlay.addRow('J', message); this.overlay.finishThinking(); if (coerceText(code) === 'VOICE_UNAVAILABLE') this.overlay.setConnectionStatus('voice-unavailable'); }],
].map(([name, handler]) => proxy.on(name, handler));
proxy.onOwnerChanged = () => { if (this.proxy !== proxy) return; this._syncDaemon(); };
await this._syncDaemon();
@@ -4,6 +4,9 @@
.jarvis-title { font-weight: bold; letter-spacing: 1px; }
.jarvis-local { color: var(--jarvis-accent, #F4B942); font-size: 11px; }
.jarvis-status-line { color: #aeb6c8; font-size: 12px; }
.jarvis-thinking-toggle { color: #9aa8c0; font-size: 12px; padding: 4px 8px; border-radius: 8px; background-color: rgba(255, 255, 255, .05); }
.jarvis-thinking-toggle:hover, .jarvis-thinking-toggle:focus { color: #f6f7fb; background-color: rgba(79, 210, 255, .16); }
.jarvis-thinking { color: #aeb6c8; font-size: 12px; padding: 8px 12px; border-left: 2px solid #4FD2FF; background-color: rgba(79, 210, 255, .06); border-radius: 8px; }
.jarvis-job, .jarvis-target { color: #4FD2FF; font-size: 12px; }
.jarvis-agent-cursor { color: var(--jarvis-accent, #F4B942); font-size: 22px; }
.jarvis-halo { border-top: 2px solid #F4B942; margin: 12px; }