feat(core): conversation history with bounded length

split llm.rs into a module with separate client and history submodules.
ConversationHistory holds an optional system prompt plus a FIFO of user/
assistant turns capped at max_turns; oldest turns evict on overflow,
system prompt is preserved across truncation and clear().
This commit is contained in:
Bossiara13 2026-04-22 23:16:25 +03:00
parent 23c57b855b
commit 40f2f8b5f9
3 changed files with 123 additions and 0 deletions

View file

@ -0,0 +1,8 @@
mod client;
mod history;
pub use client::{
ChatMessage, ConfigError, LlmClient, LlmError,
DEFAULT_BASE_URL, DEFAULT_MODEL, ENV_BASE_URL, ENV_MODEL, ENV_TOKEN,
};
pub use history::ConversationHistory;