### TODO: - scrolling chat history; (somewhat works out of box); + - log errors to file; + - give serial id to each msg in chat to track it; (use slice index) + - show msg id next to the msg; + - regen last message; + - delete last message; + - edit message? (including from bot); + - ability to copy message; + - menu with old chats (chat files); + - tab to switch selection between textview and textarea (input and chat); + - basic tools: memorize and recall; - stop stream from the bot; + - sqlitedb instead of chatfiles; + - define tools and sys prompt for them to be used; + - add system prompt without tools (for mistral); + - option to switch between predefined sys prompts; + - sqlite for the bot memory; + - rename current chat; + - help page with all key bindings; + - default config file (api url, path to sysprompts, path to log, limits, etc); + - change temp, min-p and other params from tui; - fullscreen textarea option (bothersome to implement); - consider adding use /completion of llamacpp, since openai endpoint clearly has template|format issues; - export whole chat into a json file; - directoty with sys prompts (charcards png & json); - separate messages that are stored and chat and send to the bot, i.e. option to omit tool calls (there might be a point where they are no longer needed in ctx); - colourschemes, colours or markdown of quotes and styles; - RAG support|implementation; - change card-chat pair with one binding; ### FIX: - bot responding (or haninging) blocks everything; + - programm requires history folder, but it is .gitignore; + - at first run chat table does not exist; run migrations sql on startup; + - Tab is needed to copy paste text into textarea box, use shift+tab to switch focus; (changed tp pgup) + - sometimes bots put additional info around the tool call, have a regexp to match tool call; + - remove all panics from code; + - new chat replaces old ones in db; + - empty input to continue bot msg gens new msg index and bot icon; + - delete last msg: can have unexpected behavior (deletes what appears to be two messages if last bot msg was not generated (should only delete icon in that case)) (should use regen instead of delete in that case); - lets say we have two (or more) agents with the same name across multiple chats. These agents go and ask db for topics they memoriesed. Now they can access topics that aren't meant for them. (so memory should have an option: shareble; that indicates if that memory can be shared across chats); - if option to show sys msg enabled: it show display new tool responses; - when bot generation ended with err: need a way to switch back to the bot_resp_false mode; - no selection focus on modal sys buttons after opening it a second time;