MCPcopy Create free account
hub / github.com/enowdev/enowX-Coder / get_messages

Function get_messages

src-tauri/src/services/chat_service.rs:72–82  ·  view source on GitHub ↗
(db: &SqlitePool, session_id: &str)

Source from the content-addressed store, hash-verified

70}
71
72pub async fn get_messages(db: &SqlitePool, session_id: &str) -> AppResult<Vec<Message>> {
73 let messages = sqlx::query_as::<_, Message>(
74 "SELECT id, session_id, role, content, created_at FROM messages \
75 WHERE session_id = ?1 ORDER BY created_at ASC",
76 )
77 .bind(session_id)
78 .fetch_all(db)
79 .await?;
80
81 Ok(messages)
82}
83
84/// Return a trimmed conversation window suitable for sending to the LLM.
85///

Callers 2

send_message_innerFunction · 0.70
generate_titleFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected