feat(functions): add qc quick-chat wrapper around aichat #70
Reference in New Issue
Block a user
Delete Branch "feat-qc-aichat-wrapper"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Why: Provide a fast, terminal-friendly LLM helper (
qc= quick-chat) that wrapsaichatbut defaults to a system prompt tuned for concise CLI-appropriate output.What:
functions/qc.fish:aichatis installed (if type -q aichatguards the whole definition).$XDG_CONFIG_HOME(falls back to~/.config), and on first use installs the bundled role by symlinkingscripts/cli-agent.md→roles/cli.md.--role cli, but forwards untouched if the user passes--role/-r/--role=….--wraps aichatso it inherits every aichat flag and tab-completion.-h/--helpprints a boxed banner explaining the wrapper, then dumpsaichat --helpwithaichatrewritten toqc.scripts/cli-agent.md: the bundled "cli" role system prompt.### qctodocs/fish-config.md§5.12 andqc/quick-chat/aichatkeywords todocs/fish-config.index.Also includes an unrelated one-line fix (separate commit):
fix(ls)passes--hyperlink=autotoezafor consistent OSC 8 hyperlink behavior.Manual Verification
aichatinstalled, open a new shell and runqc "say hi in one line"— confirm it responds and that~/.config/aichat/roles/cli.mdnow exists as a symlink toscripts/cli-agent.md.qc --help— confirm the boxed banner renders with aligned borders and that the forwarded help showsUsage: qc [OPTIONS] [TEXT]...(no strayaichat).qc --role coder "hi"(or-r) — confirm it does not inject--role cli(role is respected).<Tab>afterqc— confirm aichat's flag completions appear (inherited via--wraps).set PATH /nonexistentin a throwaway shell,source functions/qc.fish) — confirmqcis not defined.lsstill renders hyperlinked entries correctly after the--hyperlink=autochange.