Skip to content

Commit cdc61a0

Browse files
refactor: remove HooksList component and related types from HistoryItemDisplay
1 parent d59a0af commit cdc61a0

File tree

3 files changed

+1
-177
lines changed

3 files changed

+1
-177
lines changed

packages/cli/src/ui/components/HistoryItemDisplay.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import { SkillsList } from './views/SkillsList.js';
3232
import { AgentsStatus } from './views/AgentsStatus.js';
3333
import { McpStatus } from './views/McpStatus.js';
3434
import { ChatList } from './views/ChatList.js';
35-
import { HooksList } from './views/HooksList.js';
3635
import { ModelMessage } from './messages/ModelMessage.js';
3736
import { ThinkingMessage } from './messages/ThinkingMessage.js';
3837
import { HintMessage } from './messages/HintMessage.js';
@@ -217,9 +216,6 @@ export const HistoryItemDisplay: React.FC<HistoryItemDisplayProps> = ({
217216
{itemForDisplay.type === 'chat_list' && (
218217
<ChatList chats={itemForDisplay.chats} />
219218
)}
220-
{itemForDisplay.type === 'hooks_list' && (
221-
<HooksList hooks={itemForDisplay.hooks} terminalWidth={terminalWidth} />
222-
)}
223219
</Box>
224220
);
225221
};

packages/cli/src/ui/components/views/HooksList.tsx

Lines changed: 0 additions & 158 deletions
This file was deleted.

packages/cli/src/ui/types.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -348,18 +348,6 @@ export type HistoryItemMcpStatus = HistoryItemBase & {
348348
showSchema: boolean;
349349
};
350350

351-
export type HistoryItemHooksList = HistoryItemBase & {
352-
type: 'hooks_list';
353-
hooks: Array<{
354-
config: { command?: string; type: string; timeout?: number };
355-
source: string;
356-
eventName: string;
357-
matcher?: string;
358-
sequential?: boolean;
359-
enabled: boolean;
360-
}>;
361-
};
362-
363351
// Using Omit<HistoryItem, 'id'> seems to have some issues with typescript's
364352
// type inference e.g. historyItem.type === 'tool_group' isn't auto-inferring that
365353
// 'tools' in historyItem.
@@ -388,8 +376,7 @@ export type HistoryItemWithoutId =
388376
| HistoryItemMcpStatus
389377
| HistoryItemChatList
390378
| HistoryItemThinking
391-
| HistoryItemHint
392-
| HistoryItemHooksList;
379+
| HistoryItemHint;
393380

394381
export type HistoryItem = HistoryItemWithoutId & { id: number };
395382

@@ -413,7 +400,6 @@ export enum MessageType {
413400
AGENTS_LIST = 'agents_list',
414401
MCP_STATUS = 'mcp_status',
415402
CHAT_LIST = 'chat_list',
416-
HOOKS_LIST = 'hooks_list',
417403
HINT = 'hint',
418404
}
419405

0 commit comments

Comments
 (0)