feat: rework log view (#625)
* rework process start card * do not auto-insert user message * error and system message cards * nest tool cards * improve tool card rendering * fix tsc errors * spacing * scroll bar * tweaks * put back icon * use run reason constants * fix restore icon display * round diff card * add special plan card rendering * fmt * opacity for thinking text * Louis/logs tweaks (#641) * remove divs * text * status indicator * expandable tool boxes * diffs and raw logs * Tweaks * new files * message * lint --------- Co-authored-by: Louis Knight-Webb <louis@bloop.ai>
This commit is contained in:
committed by
GitHub
parent
abee94189a
commit
a3bffc9d0d
@@ -564,7 +564,7 @@ impl ClaudeLogProcessor {
|
||||
let entry = NormalizedEntry {
|
||||
timestamp: None,
|
||||
entry_type: NormalizedEntryType::SystemMessage,
|
||||
content: format!("Raw output: {trimmed}"),
|
||||
content: trimmed.to_string(),
|
||||
metadata: None,
|
||||
};
|
||||
|
||||
@@ -586,7 +586,7 @@ impl ClaudeLogProcessor {
|
||||
let entry = NormalizedEntry {
|
||||
timestamp: None,
|
||||
entry_type: NormalizedEntryType::SystemMessage,
|
||||
content: format!("Raw output: {}", buffer.trim()),
|
||||
content: buffer.trim().to_string(),
|
||||
metadata: None,
|
||||
};
|
||||
|
||||
|
||||
@@ -543,7 +543,7 @@ impl StandardCodingAgentExecutor for Codex {
|
||||
let entry = NormalizedEntry {
|
||||
timestamp: None,
|
||||
entry_type: NormalizedEntryType::SystemMessage,
|
||||
content: format!("Raw output: {trimmed}"),
|
||||
content: trimmed.to_string(),
|
||||
metadata: None,
|
||||
};
|
||||
|
||||
@@ -977,7 +977,7 @@ mod tests {
|
||||
entries.push(NormalizedEntry {
|
||||
timestamp: None,
|
||||
entry_type: NormalizedEntryType::SystemMessage,
|
||||
content: format!("Raw output: {trimmed}"),
|
||||
content: trimmed.to_string(),
|
||||
metadata: None,
|
||||
});
|
||||
}
|
||||
@@ -1076,11 +1076,7 @@ invalid json line here
|
||||
entries[0].entry_type,
|
||||
NormalizedEntryType::SystemMessage
|
||||
));
|
||||
assert!(
|
||||
entries[0]
|
||||
.content
|
||||
.contains("Raw output: invalid json line here")
|
||||
);
|
||||
assert!(entries[0].content.contains("invalid json line here"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -390,7 +390,7 @@ impl StandardCodingAgentExecutor for Cursor {
|
||||
let entry = NormalizedEntry {
|
||||
timestamp: None,
|
||||
entry_type: NormalizedEntryType::SystemMessage,
|
||||
content: format!("Raw output: `{line}`"),
|
||||
content: line,
|
||||
metadata: None,
|
||||
};
|
||||
let id = entry_index_provider.next();
|
||||
|
||||
@@ -30,7 +30,7 @@ use executors::{
|
||||
script::{ScriptContext, ScriptRequest, ScriptRequestLanguage},
|
||||
},
|
||||
executors::{ExecutorError, StandardCodingAgentExecutor},
|
||||
logs::{NormalizedEntry, NormalizedEntryType, utils::patch::ConversationPatch},
|
||||
logs::utils::patch::ConversationPatch,
|
||||
profile::{ExecutorConfigs, ExecutorProfileId},
|
||||
};
|
||||
use futures::{StreamExt, TryStreamExt, future};
|
||||
@@ -386,21 +386,11 @@ pub trait ContainerService {
|
||||
ExecutorActionType::CodingAgentInitialRequest(request) => {
|
||||
let executor = ExecutorConfigs::get_cached()
|
||||
.get_coding_agent_or_default(&request.executor_profile_id);
|
||||
|
||||
// Inject the initial user prompt before normalization (DB fallback path)
|
||||
let user_entry = create_user_message(request.prompt.clone());
|
||||
temp_store.push_patch(ConversationPatch::add_normalized_entry(0, user_entry));
|
||||
|
||||
executor.normalize_logs(temp_store.clone(), ¤t_dir);
|
||||
}
|
||||
ExecutorActionType::CodingAgentFollowUpRequest(request) => {
|
||||
let executor = ExecutorConfigs::get_cached()
|
||||
.get_coding_agent_or_default(&request.executor_profile_id);
|
||||
|
||||
// Inject the follow-up user prompt before normalization (DB fallback path)
|
||||
let user_entry = create_user_message(request.prompt.clone());
|
||||
temp_store.push_patch(ConversationPatch::add_normalized_entry(0, user_entry));
|
||||
|
||||
executor.normalize_logs(temp_store.clone(), ¤t_dir);
|
||||
}
|
||||
_ => {
|
||||
@@ -649,11 +639,6 @@ pub trait ContainerService {
|
||||
if let Some(executor) =
|
||||
ExecutorConfigs::get_cached().get_coding_agent(&request.executor_profile_id)
|
||||
{
|
||||
// Prepend the initial user prompt as a normalized entry
|
||||
let user_entry = create_user_message(request.prompt.clone());
|
||||
msg_store
|
||||
.push_patch(ConversationPatch::add_normalized_entry(0, user_entry));
|
||||
|
||||
executor.normalize_logs(
|
||||
msg_store,
|
||||
&self.task_attempt_to_current_dir(task_attempt),
|
||||
@@ -671,11 +656,6 @@ pub trait ContainerService {
|
||||
if let Some(executor) =
|
||||
ExecutorConfigs::get_cached().get_coding_agent(&request.executor_profile_id)
|
||||
{
|
||||
// Prepend the follow-up user prompt as a normalized entry
|
||||
let user_entry = create_user_message(request.prompt.clone());
|
||||
msg_store
|
||||
.push_patch(ConversationPatch::add_normalized_entry(0, user_entry));
|
||||
|
||||
executor.normalize_logs(
|
||||
msg_store,
|
||||
&self.task_attempt_to_current_dir(task_attempt),
|
||||
@@ -731,12 +711,3 @@ pub trait ContainerService {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
fn create_user_message(prompt: String) -> NormalizedEntry {
|
||||
NormalizedEntry {
|
||||
timestamp: None,
|
||||
entry_type: NormalizedEntryType::UserMessage,
|
||||
content: prompt,
|
||||
metadata: None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user