+ {/* ------------------------------------------------------------------ */}
+ {/* Runtime section */}
+ {/* ------------------------------------------------------------------ */}
+
+ Runtime
+
+
Platform supported: {status?.platform_supported ? 'yes' : 'no'}
+
Enabled: {status?.enabled ? 'yes' : 'no'}
+
Running: {status?.running ? 'yes' : 'no'}
+
Phase: {status?.phase ?? 'unknown'}
+
Debounce: {status?.debounce_ms ?? 0}ms
+
Model: {status?.model_id ?? 'n/a'}
+
App: {status?.app_name ?? 'n/a'}
+
Last error: {status?.last_error ?? 'none'}
+
Current suggestion: {status?.suggestion?.value ?? 'none'}
+
+
+
+
+
+
+
+
+ {/* ------------------------------------------------------------------ */}
+ {/* Test section */}
+ {/* ------------------------------------------------------------------ */}
+
+ Test
+
+
Context Override (optional)
+
+
+
+
+
+
+ {focusDebug && (
+
+ {focusDebug}
+
+ )}
+
+
+ {/* ------------------------------------------------------------------ */}
+ {/* Live Logs section */}
+ {/* ------------------------------------------------------------------ */}
+
+
+
Live Logs
+
+
+
+ {logs.length > 0 ? logs.join('\n') : 'No logs yet.'}
+
+
+
+ {/* ------------------------------------------------------------------ */}
+ {/* Advanced settings */}
+ {/* ------------------------------------------------------------------ */}
+
+
+ {/* ------------------------------------------------------------------ */}
+ {/* Personalization History */}
+ {/* ------------------------------------------------------------------ */}
+
+
+
Personalization History
+
+
+
+ {isHistoryLoading
+ ? 'Loading…'
+ : historyEntries.length === 0
+ ? 'No accepted completions yet. Accept suggestions with Tab to start personalising.'
+ : `${String(historyEntries.length)} accepted completion${historyEntries.length === 1 ? '' : 's'} stored — used to personalise future suggestions.`}
+
+ {historyEntries.length > 0 && (
+
+ {historyEntries.map((entry, idx) => (
+
+
+
+ {new Date(entry.timestamp_ms).toLocaleString()}
+
+ {entry.app_name && (
+
+ {entry.app_name}
+
+ )}
+
+
+ …
+ {entry.context.slice(-40)}
+ →
+
+ {entry.suggestion}
+
+
+
+ ))}
+
+ )}
+
+
+ {/* ------------------------------------------------------------------ */}
+ {/* Feedback messages */}
+ {/* ------------------------------------------------------------------ */}
+ {message &&
{message}
}
+ {error &&
{error}
}
+