Fix task marker visibility gaps

This commit is contained in:
klopez4212
2026-06-30 08:15:45 +01:00
parent 347d110fb8
commit e5c886b65b
4 changed files with 9 additions and 28 deletions
@@ -382,7 +382,7 @@ pub fn create_time_agent_command_override(
let picked = picked_command
.map(str::trim)
.filter(|value| !value.is_empty())?;
let inherited_command = effective_agent_command(persona_id, personas, None);
let inherited_command = effective_agent_command(persona_id, personas, None, None);
return (picked != inherited_command).then(|| picked.to_string());
}
@@ -1675,28 +1675,6 @@ pub(crate) fn managed_agent_auth_tag_for_owner(
.map_err(|error| format!("failed to compute NIP-OA auth tag: {error}"))
}
/// Resolve the effective system prompt, model, and provider from the *live*
/// persona for **display and model-discovery only** — the ModelPicker shows the
/// current persona model as selected. The spawn and deploy paths deliberately
/// do NOT use this; they read the pinned record snapshot so a running agent
/// stays on the config it was created with. The linked persona wins here; the
/// record values are the fallback when no persona is linked or it was deleted.
pub(crate) fn resolve_effective_prompt_model_provider(
persona_id: Option<&str>,
personas: &[crate::managed_agents::types::PersonaRecord],
record_prompt: Option<String>,
record_model: Option<String>,
) -> (Option<String>, Option<String>, Option<String>) {
match persona_id.and_then(|pid| personas.iter().find(|p| p.id == pid)) {
Some(p) => (
Some(p.system_prompt.clone()),
p.model.clone(),
p.provider.clone(),
),
None => (record_prompt, record_model, None),
}
}
/// Spawn an agent process without holding any locks on records or runtimes.
/// Returns the child process and log path on success. The caller is responsible
/// for updating `ManagedAgentRecord` fields and inserting into the runtimes map.
@@ -11,9 +11,7 @@ import {
MessageTimeline,
type MessageTimelineHandle,
} from "@/features/messages/ui/MessageTimeline";
import {
getHiddenAgentConversationMessageIds,
} from "@/features/agents/agentConversations";
import { getHiddenAgentConversationMessageIds } from "@/features/agents/agentConversations";
import { buildDirectMessageIntro } from "@/features/channels/lib/dmParticipantDisplay";
import {
getDmHuddleMemberPubkeys,
@@ -535,10 +533,14 @@ export const ChannelPane = React.memo(function ChannelPane({
if (threadScrollTargetId) {
hiddenIds.delete(threadScrollTargetId);
}
if (channelFind.activeMatch?.messageId) {
hiddenIds.delete(channelFind.activeMatch.messageId);
}
return hiddenIds;
}, [
agentConversationMarkers,
baseVisibleMessages,
channelFind.activeMatch?.messageId,
targetMessageId,
threadScrollTargetId,
threadSourceMessages,
@@ -152,8 +152,7 @@ class ChannelMessagesNotifier extends Notifier<AsyncValue<List<NostrEvent>>> {
content.contains('member_removed');
}
/// Kinds that are metadata rather than displayable content (deletions,
/// reactions, edits, legacy pre-migration messages).
/// reactions, edits, legacy pre-migration messages, task markers).
static const _metadataKinds = {
EventKind.deletion,
EventKind.reaction,
@@ -161,6 +160,8 @@ class ChannelMessagesNotifier extends Notifier<AsyncValue<List<NostrEvent>>> {
EventKind.streamMessageEdit,
EventKind.huddleParticipantJoined,
EventKind.huddleParticipantLeft,
EventKind.agentConversationCompat,
EventKind.agentConversation,
};
/// Minimum displayable messages we want after the initial history load.