Implement RAG summarization and context pipeline
- Add ContextPipeline for async RAG lookups - Implement RAG result summarization via LLMProcessor - Add CLI flag for PDF ingestion - Strip markdown code blocks from LLM responses - Update TUI context display to use ListItems
This commit is contained in:
+12
-3
@@ -3,7 +3,16 @@ from typing import List, Optional, Union
|
||||
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.containers import Container, Horizontal, Vertical
|
||||
from textual.widgets import Button, DataTable, Footer, Input, Label, ListView, Static
|
||||
from textual.widgets import (
|
||||
Button,
|
||||
DataTable,
|
||||
Footer,
|
||||
Input,
|
||||
Label,
|
||||
ListItem,
|
||||
ListView,
|
||||
Static,
|
||||
)
|
||||
|
||||
from src.llm.models import CharacterStateUpdate, ExtractionResult, LoreUpdate
|
||||
from src.persistence.characters import update_character_state
|
||||
@@ -181,8 +190,8 @@ class ConfirmationApp(App):
|
||||
# Format the update for display
|
||||
display_text = f"Query: {update.query}\nSource: {update.source}\n\n{update.snippet}"
|
||||
|
||||
# Add a new Static widget to the ListView
|
||||
context_pane.mount(Static(display_text))
|
||||
# Add a new ListItem widget to the top of the ListView for 'most recent'
|
||||
context_pane.mount(ListItem(Label(display_text), index=0))
|
||||
|
||||
if hasattr(self.context_queue, "task_done"):
|
||||
self.context_queue.task_done()
|
||||
|
||||
Reference in New Issue
Block a user