- rebrand to Pixie (internal id unchanged so permissions/data carry over) - pixel design system v1: tokens, OFL fonts (IBM Plex Mono, VT323, Press Start 2P), icons, sounds, dithering; menu-bar template rendered from the pixel :) mark - buddy: round pixel :) badge beside the cursor; draws marks itself and drags highlights out as a marching-ants selection; mac_step click/double/right/drag with after-state for checking - voice turns stay in the notch ears (no text); board for diagrams - drag-me permission guide with a native draggable app tile (tauri-plugin-drag) - OpenAI provider; Settings Models (live model lists per provider), Usage (tokens + cost per model/day, editable prices), Coding (agent, per-agent model, sandbox/permissions, folder) - code tool: jobs hand coding to Codex CLI, Claude Code or opencode - site and README rebranded; 0.4.1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
48 lines
1.6 KiB
TypeScript
48 lines
1.6 KiB
TypeScript
import type { ReactNode } from 'react';
|
|
|
|
/** Presentational component only: native mic, capture and agents are wired separately. */
|
|
export type AssistantState = 'idle' | 'listening' | 'processing' | 'muted';
|
|
export type AssistantPillProps = {
|
|
state: AssistantState;
|
|
onPrimaryAction: () => void;
|
|
onOpen: () => void;
|
|
assetBase?: string;
|
|
shortcutLabel?: string;
|
|
children?: ReactNode;
|
|
};
|
|
|
|
const statuses: Record<AssistantState, string> = {
|
|
idle: 'Microphone off',
|
|
listening: 'Microphone listening',
|
|
processing: 'Processing request',
|
|
muted: 'Microphone muted',
|
|
};
|
|
|
|
export function AssistantPill({
|
|
state, onPrimaryAction, onOpen, assetBase = '/openclicky-assets',
|
|
shortcutLabel = 'Configure shortcut', children,
|
|
}: AssistantPillProps) {
|
|
return (
|
|
<div className="oc-pill" role="group" aria-label="OpenClicky assistant">
|
|
<button className="oc-pill__mark" type="button" onClick={onOpen} aria-label="Open OpenClicky">
|
|
:)
|
|
</button>
|
|
<button
|
|
className="oc-pill__microphone"
|
|
type="button"
|
|
onClick={onPrimaryAction}
|
|
aria-label={state === 'listening' ? 'Stop listening' : 'Microphone action'}
|
|
disabled={state === 'processing'}
|
|
>
|
|
<img width="24" height="24" style={{ imageRendering: 'pixelated' }}
|
|
src={`${assetBase}/microphone-states/png/${state}-64.png`} alt="" />
|
|
</button>
|
|
<span className="oc-pill__status" role="status" aria-live="polite">{statuses[state]}</span>
|
|
{children}
|
|
<span className="oc-pill__shortcut" aria-label={`Shortcut: ${shortcutLabel}`}>
|
|
{shortcutLabel}
|
|
</span>
|
|
</div>
|
|
);
|
|
}
|