Fix cursor focus and selection in input box, add AWS env var warning box, and remove AWS Bedrock login banner
This commit is contained in:
@@ -205,9 +205,8 @@ pub(super) fn select_conversations_to_evict(
|
||||
pub(super) fn read_agent_conversations(
|
||||
conn: &mut SqliteConnection,
|
||||
) -> Result<Vec<AgentConversation>, diesel::result::Error> {
|
||||
|
||||
let mut conversations_by_id = HashMap::<String, AgentConversation>::from_iter(
|
||||
agent_conversations
|
||||
agent_conversations::table
|
||||
.select(AgentConversationRecord::as_select())
|
||||
.load(conn)?
|
||||
.into_iter()
|
||||
@@ -254,6 +253,7 @@ pub(crate) fn read_agent_conversation_by_id(
|
||||
conversation_id_str: &str,
|
||||
) -> Result<Option<AgentConversation>, diesel::result::Error> {
|
||||
use schema::agent_conversations::dsl as convo_dsl;
|
||||
use schema::agent_tasks::dsl as tasks_dsl;
|
||||
|
||||
let maybe_record: Option<AgentConversationRecord> = convo_dsl::agent_conversations
|
||||
.filter(convo_dsl::conversation_id.eq(conversation_id_str.to_owned()))
|
||||
@@ -291,6 +291,8 @@ pub(super) fn delete_agent_conversations(
|
||||
conversation_ids: Vec<String>,
|
||||
) -> Result<(), diesel::result::Error> {
|
||||
use diesel::{ExpressionMethods, QueryDsl};
|
||||
use schema::agent_conversations::dsl as convo_dsl;
|
||||
use schema::agent_tasks::dsl as tasks_dsl;
|
||||
|
||||
conn.transaction::<_, Error, _>(|conn| {
|
||||
// Delete tasks for these conversations first (due to foreign key constraint)
|
||||
@@ -301,7 +303,7 @@ pub(super) fn delete_agent_conversations(
|
||||
|
||||
// Delete the conversations themselves
|
||||
diesel::delete(
|
||||
agent_conversations::table().filter(conversation_id.eq_any(&conversation_ids)),
|
||||
agent_conversations::table.filter(convo_dsl::conversation_id.eq_any(&conversation_ids)),
|
||||
)
|
||||
.execute(conn)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user