+
{t('ai.chat.toolApprovalHint')}
-
+
+
diff --git a/components/ai/ChatInput.tsx b/components/ai/ChatInput.tsx
index 5c479dea0..cc6a9e943 100644
--- a/components/ai/ChatInput.tsx
+++ b/components/ai/ChatInput.tsx
@@ -7,7 +7,7 @@
*/
import { AtSign, Check, ChevronDown, ChevronRight, Cpu, Expand, Eye, FileText, ImageIcon, MessageSquare, Package, Plus, ShieldCheck, SquareTerminal, X, Zap } from 'lucide-react';
-import { filterQuickMessages, buildSlashCommandItems, filterUserSkillsForSlash, getSlashCommandItemKey, type AIQuickMessage, type SlashCommandItem, type UserSkillSlashOption } from '../../infrastructure/ai/quickMessages';
+import { filterQuickMessages, buildSlashCommandItems, filterUserSkillsForSlash, getSlashCommandItemKey, isSystemStopSlashCommand, type AIQuickMessage, type SlashCommandItem, type UserSkillSlashOption } from '../../infrastructure/ai/quickMessages';
import { SlashCommandPicker } from './SlashCommandPicker';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { useI18n } from '../../application/i18n/I18nProvider';
@@ -460,9 +460,14 @@ const ChatInput: React.FC
= ({
const handleSubmit = useCallback(
(_text: string, _event: FormEvent) => {
+ if (isSystemStopSlashCommand(value)) {
+ onStop?.();
+ onChange('');
+ return;
+ }
onSend();
},
- [onSend],
+ [onSend, onStop, onChange, value],
);
const status: PromptInputStatus = isStreaming ? 'streaming' : 'idle';
diff --git a/components/ai/ChatMessageList.tsx b/components/ai/ChatMessageList.tsx
index c952ae7d5..75a009fc4 100644
--- a/components/ai/ChatMessageList.tsx
+++ b/components/ai/ChatMessageList.tsx
@@ -20,6 +20,12 @@ import { Message, MessageContent, MessageResponse } from '../ai-elements/message
import { ToolCall } from '../ai-elements/tool-call';
import ThinkingBlock from './ThinkingBlock';
import ToolCallGroup from './ToolCallGroup';
+import {
+ VaultArtifactNavigationProvider,
+} from './toolArtifacts/VaultArtifactNavigationContext';
+import { parseVaultToolArtifact } from './toolArtifacts/vaultToolArtifact';
+import { VaultArtifactToolResult } from './toolArtifacts/VaultArtifactToolResult';
+import type { Host, VaultNote } from '../../types';
import {
onApprovalRequest,
onApprovalCleared,
@@ -27,6 +33,10 @@ import {
resolveApproval,
type ApprovalRequest,
} from '../../infrastructure/ai/shared/approvalGate';
+import {
+ buildGrantsFromApproval,
+ resolveCapabilityId,
+} from '../../infrastructure/ai/harness/permissionGrants';
import {
getAIPanelDiagnosticHiddenParts,
getAIPanelProfilerProps,
@@ -38,12 +48,26 @@ interface ChatMessageListProps {
isStreaming?: boolean;
/** Active chat session ID — used to filter standalone MCP approval blocks */
activeSessionId?: string | null;
+ notes?: VaultNote[];
+ hosts?: Host[];
+ onOpenVaultNote?: (noteId: string) => void;
+ onOpenVaultHost?: (hostId: string) => void;
+ onOpenVaultSection?: (section: 'notes' | 'hosts') => void;
}
const MESSAGE_RENDER_BATCH = 50;
const MESSAGE_RENDER_STEP = 50;
-const ChatMessageList: React.FC = ({ messages, isStreaming, activeSessionId }) => {
+const ChatMessageList: React.FC = ({
+ messages,
+ isStreaming,
+ activeSessionId,
+ notes = [],
+ hosts = [],
+ onOpenVaultNote,
+ onOpenVaultHost,
+ onOpenVaultSection,
+}) => {
// Track pending approvals from the approval gate
const [pendingApprovals, setPendingApprovals] = useState
@@ -408,7 +476,13 @@ const ChatMessageList: React.FC