Skip to content

replace golem> PS1 with something nice, maybe? #27

Description

@assapir

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_providertrue/false
  • prompt.show_modeltrue/false
  • prompt.show_tokenstrue/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.rshuman> 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]> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions