diff --git a/desktop/src-tauri/src/managed_agents/discovery.rs b/desktop/src-tauri/src/managed_agents/discovery.rs index e14c17a4d..d6322b863 100644 --- a/desktop/src-tauri/src/managed_agents/discovery.rs +++ b/desktop/src-tauri/src/managed_agents/discovery.rs @@ -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()); } diff --git a/desktop/src-tauri/src/managed_agents/runtime.rs b/desktop/src-tauri/src/managed_agents/runtime.rs index 9ce01203d..c45284a0e 100644 --- a/desktop/src-tauri/src/managed_agents/runtime.rs +++ b/desktop/src-tauri/src/managed_agents/runtime.rs @@ -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, - record_model: Option, -) -> (Option, Option, Option) { - 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. diff --git a/desktop/src/features/channels/ui/ChannelPane.tsx b/desktop/src/features/channels/ui/ChannelPane.tsx index 94710f89f..1faa3e4cf 100644 --- a/desktop/src/features/channels/ui/ChannelPane.tsx +++ b/desktop/src/features/channels/ui/ChannelPane.tsx @@ -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, diff --git a/mobile/lib/features/channels/channel_messages_provider.dart b/mobile/lib/features/channels/channel_messages_provider.dart index b659f9a0f..37cd237d8 100644 --- a/mobile/lib/features/channels/channel_messages_provider.dart +++ b/mobile/lib/features/channels/channel_messages_provider.dart @@ -152,8 +152,7 @@ class ChannelMessagesNotifier extends Notifier>> { 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>> { EventKind.streamMessageEdit, EventKind.huddleParticipantJoined, EventKind.huddleParticipantLeft, + EventKind.agentConversationCompat, + EventKind.agentConversation, }; /// Minimum displayable messages we want after the initial history load.