fix: keep generation progress out of chat history
This commit is contained in:
@@ -538,13 +538,6 @@ pub(crate) fn compile_big_fish_draft_tx(
|
||||
updated_at: compiled_at,
|
||||
};
|
||||
replace_big_fish_session(ctx, &session, next_session);
|
||||
append_big_fish_system_message(
|
||||
ctx,
|
||||
&input.session_id,
|
||||
format!("big-fish-message-compile-{}", input.compiled_at_micros),
|
||||
reply,
|
||||
input.compiled_at_micros,
|
||||
);
|
||||
|
||||
get_big_fish_session_tx(
|
||||
ctx,
|
||||
@@ -682,32 +675,6 @@ pub(crate) fn replace_big_fish_session(
|
||||
ctx.db.big_fish_creation_session().insert(next);
|
||||
}
|
||||
|
||||
pub(crate) fn append_big_fish_system_message(
|
||||
ctx: &ReducerContext,
|
||||
session_id: &str,
|
||||
message_id: String,
|
||||
text: String,
|
||||
created_at_micros: i64,
|
||||
) {
|
||||
if ctx
|
||||
.db
|
||||
.big_fish_agent_message()
|
||||
.message_id()
|
||||
.find(&message_id)
|
||||
.is_some()
|
||||
{
|
||||
return;
|
||||
}
|
||||
ctx.db.big_fish_agent_message().insert(BigFishAgentMessage {
|
||||
message_id,
|
||||
session_id: session_id.to_string(),
|
||||
role: BigFishAgentMessageRole::Assistant,
|
||||
kind: BigFishAgentMessageKind::ActionResult,
|
||||
text,
|
||||
created_at: Timestamp::from_micros_since_unix_epoch(created_at_micros),
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user