Problem
The REPL prompt says golem> but the golem is the AI, not the human typing. The prompt should reflect who is speaking. Additionally, there is no way to configure what the prompt shows.
Proposed solution
1. Role-based prefixes
Input prompt (human speaks):
human> what files are in this directory
Output prefix (golem responds):
golem: I will list the files...
2. Config system in SQLite
New config table in the existing SQLite database:
CREATE TABLE config (
key TEXT PRIMARY KEY,
value TEXT NOT NULL
);
Generic key-value store. For prompt config:
prompt.show_provider — true/false
prompt.show_model — true/false
prompt.show_tokens — true/false
3. Configurable prompt via /prompt command
human> /prompt
Current prompt: human>
Toggle what to show:
1. provider [off]
2. model [off]
3. tokens [off]
human> /prompt provider
✓ provider enabled
human [anthropic]> /prompt model
✓ model enabled
human [anthropic|sonnet]> /prompt tokens
✓ tokens enabled
human [anthropic|sonnet|1.2k]>
4. Implementation pieces
| Piece |
Where |
Config trait + SqliteConfig |
src/config/ — generic get/set/remove on SQLite config table |
PromptBuilder |
src/prompt.rs or src/banner.rs — builds prompt string from config |
/prompt command |
src/commands/prompt.rs — toggle prompt components |
| Role prefixes |
main.rs — human> for input, golem: for output |
| Response formatting |
engine/react.rs or main.rs — prefix golem output |
Example flow
human> explain ownership in rust
golem: Ownership is Rust's memory management system...
human [anthropic|sonnet|1.8k]> /prompt tokens
✗ tokens disabled
human [anthropic|sonnet]>
Problem
The REPL prompt says
golem>but the golem is the AI, not the human typing. The prompt should reflect who is speaking. Additionally, there is no way to configure what the prompt shows.Proposed solution
1. Role-based prefixes
Input prompt (human speaks):
Output prefix (golem responds):
2. Config system in SQLite
New
configtable in the existing SQLite database:Generic key-value store. For prompt config:
prompt.show_provider—true/falseprompt.show_model—true/falseprompt.show_tokens—true/false3. Configurable prompt via
/promptcommand4. Implementation pieces
Configtrait +SqliteConfigsrc/config/— generic get/set/remove on SQLiteconfigtablePromptBuildersrc/prompt.rsorsrc/banner.rs— builds prompt string from config/promptcommandsrc/commands/prompt.rs— toggle prompt componentsmain.rs—human>for input,golem:for outputengine/react.rsormain.rs— prefix golem outputExample flow