skyl / corpora

Corpora is a self-building corpus that can help build other arbitrary corpora
GNU Affero General Public License v3.0
2 stars 0 forks source link

Implement a Generic REPL for Flexible Context Management #40

Open skyl opened 1 week ago

skyl commented 1 week ago

Problem

Currently, the system supports specific REPL sessions such as plan issue and workon file, which limit users to isolated tasks. This structure restricts fluid transitions between different tasks and accumulates context only for a single task at a time. A user cannot seamlessly chat, create issues, and revise files in a unified session without restarting the context for each task.

Goals

Options for Implementation

  1. Unified REPL Session:

    • Develop a main REPL loop where users can start by chatting. Commands such as /plan issue and /workon <filepath> would change the mode to issue planning or file editing, maintaining context across all interactions.
    • Implement a mechanism to switch between multiple files and tasks without clearing the accumulated conversation history.
  2. History and Context Management:

    • Maintain a historical context log that users can access to track prior interactions and decisions.
    • Allow context persistence across different REPL states so interactions in one state can inform actions in another.

This enhancement will empower users to interact with the corpora more dynamically, enabling iterative development and revision without the overhead of restarting context or opening multiple sessions.