aiexecode 1.0.64 → 1.0.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of aiexecode might be problematic. Click here for more details.

@@ -1,121 +0,0 @@
1
- /**
2
- * History display component for showing message history
3
- */
4
-
5
- import React from 'react';
6
- import { Box, Text } from 'ink';
7
- import { theme } from '../themes/semantic-tokens.js';
8
-
9
- function renderHistoryItem(item, index) {
10
- const { type } = item;
11
-
12
- switch (type) {
13
- case 'user':
14
- return React.createElement(Box, { key: index, marginBottom: 1 },
15
- React.createElement(Text, { color: theme.text.accent, bold: true }, '> '),
16
- React.createElement(Text, { color: theme.text.primary }, item.text)
17
- );
18
-
19
- case 'assistant':
20
- return React.createElement(Box, { key: index, marginBottom: 1 },
21
- React.createElement(Text, { color: theme.status.info, bold: true }, '◆ '),
22
- React.createElement(Text, { color: theme.text.primary }, item.text)
23
- );
24
-
25
- case 'system':
26
- return React.createElement(Box, { key: index, marginBottom: 1 },
27
- React.createElement(Text, { color: theme.text.secondary }, item.text)
28
- );
29
-
30
- case 'error':
31
- return React.createElement(Box, { key: index, marginBottom: 1 },
32
- React.createElement(Text, { color: theme.status.error, bold: true }, '✗ '),
33
- React.createElement(Text, { color: theme.status.error }, item.text)
34
- );
35
-
36
- case 'iteration_start':
37
- return React.createElement(Box, { key: index, marginY: 1, borderStyle: "round", borderColor: theme.border.focused, paddingX: 1 },
38
- React.createElement(Text, { color: theme.text.accent, bold: true },
39
- `🔄 Iteration ${item.iterationNumber}`)
40
- );
41
-
42
- case 'tool_start':
43
- return React.createElement(Box, { key: index, marginBottom: 1 },
44
- React.createElement(Text, { color: theme.status.success, bold: true }, '⚙ '),
45
- React.createElement(Text, { color: theme.status.success }, item.toolName)
46
- );
47
-
48
- case 'tool_result':
49
- return React.createElement(Box, { key: index, marginBottom: 1, marginLeft: 2 },
50
- React.createElement(Text, { color: theme.text.secondary }, item.result.stdout || '')
51
- );
52
-
53
- case 'code_execution':
54
- return React.createElement(Box, { key: index, flexDirection: "column", marginBottom: 1 },
55
- React.createElement(Box, {
56
- borderStyle: "round",
57
- borderColor: theme.status.success,
58
- paddingX: 1
59
- },
60
- React.createElement(Text, { color: theme.status.success }, item.code)
61
- )
62
- );
63
-
64
- case 'code_result':
65
- return React.createElement(Box, { key: index, flexDirection: "column", marginBottom: 1, marginLeft: 2 },
66
- item.stdout && React.createElement(Text, { color: theme.text.primary }, item.stdout),
67
- item.stderr && React.createElement(Text, { color: theme.status.error }, item.stderr),
68
- item.exitCode !== 0 && React.createElement(Text, { color: theme.status.warning },
69
- `Exit code: ${item.exitCode}`)
70
- );
71
-
72
- case 'rag_search':
73
- return React.createElement(Box, { key: index, marginBottom: 1 },
74
- React.createElement(Text, { color: theme.status.info }, '🔍 '),
75
- React.createElement(Text, { color: theme.text.secondary },
76
- `RAG context: ${item.contextLength} chars`)
77
- );
78
-
79
- case 'conversation_restored':
80
- return React.createElement(Box, { key: index, marginBottom: 1 },
81
- React.createElement(Text, { color: theme.status.info },
82
- `🔄 Restored ${item.messageCount} messages`)
83
- );
84
-
85
- case 'verification_result':
86
- return React.createElement(Box, { key: index, flexDirection: "column", marginY: 1,
87
- borderStyle: "round", borderColor: theme.border.default, paddingX: 1 },
88
- React.createElement(Text, { color: theme.text.accent }, `Decision: ${item.result.decision}`),
89
- item.result.improvement_points && React.createElement(Text, { color: theme.text.secondary },
90
- `Next: ${item.result.improvement_points}`)
91
- );
92
-
93
- case 'mission_completed':
94
- return React.createElement(Box, { key: index, marginY: 1 },
95
- React.createElement(Text, { color: theme.status.success, bold: true },
96
- '✅ Mission Complete!')
97
- );
98
-
99
- case 'mission_failed':
100
- return React.createElement(Box, { key: index, marginY: 1 },
101
- React.createElement(Text, { color: theme.status.error, bold: true },
102
- `❌ Mission Failed: ${item.reason}`)
103
- );
104
-
105
- default:
106
- return React.createElement(Box, { key: index, marginBottom: 1 },
107
- React.createElement(Text, { color: theme.text.secondary },
108
- JSON.stringify(item))
109
- );
110
- }
111
- }
112
-
113
- export function HistoryDisplay({ history = [] }) {
114
- if (history.length === 0) {
115
- return null;
116
- }
117
-
118
- return React.createElement(Box, { flexDirection: "column", marginBottom: 1 },
119
- history.map((item, index) => renderHistoryItem(item, index))
120
- );
121
- }
@@ -1,69 +0,0 @@
1
- /**
2
- * MainContent - Displays history and pending items with Static optimization
3
- */
4
-
5
- import React, { useMemo } from 'react';
6
- import { Box, Static } from 'ink';
7
- import { Header } from './Header.js';
8
- import { HistoryItemDisplay } from './HistoryItemDisplay.js';
9
- import { useUIState } from '../contexts/UIStateContext.js';
10
- import { useAppContext } from '../contexts/AppContext.js';
11
- import { createDebugLogger } from '../../util/debug_log.js';
12
-
13
- const debugLog = createDebugLogger('ui_components.log', 'MainContent');
14
-
15
- // pendingHistoryItems 렌더링 활성화 여부
16
- const RENDER_PENDING_HISTORY = false;
17
-
18
- export const MainContent = React.memo(function MainContent() {
19
- debugLog('MainContent rendering');
20
- const appContext = useAppContext();
21
- const uiState = useUIState();
22
-
23
- const { history, pendingHistoryItems, mainAreaWidth, historyRemountKey } = uiState;
24
- debugLog(`MainContent - history: ${history.length}, pending: ${pendingHistoryItems.length}, width: ${mainAreaWidth}`);
25
-
26
- // Memoize static items to prevent re-creation on every render
27
- const staticItems = useMemo(() => {
28
- debugLog(`MainContent - rebuilding staticItems with ${history.length} history items`);
29
- return [
30
- React.createElement(Header, {
31
- key: "app-header",
32
- version: appContext.version
33
- }),
34
- ...history.map((item, index) =>
35
- React.createElement(HistoryItemDisplay, {
36
- key: item.id || `history-${index}`,
37
- item,
38
- isPending: false,
39
- terminalWidth: mainAreaWidth,
40
- nextItem: history[index + 1]
41
- })
42
- )
43
- ];
44
- }, [history, mainAreaWidth, appContext.version]);
45
-
46
- return React.createElement(React.Fragment, null,
47
- // Static area for immutable history with key for controlled remounting
48
- React.createElement(Static, {
49
- key: historyRemountKey || 0,
50
- items: staticItems
51
- }, (item) => item),
52
-
53
- // Dynamic area for pending/streaming content
54
- RENDER_PENDING_HISTORY && React.createElement(Box, {
55
- flexDirection: "column",
56
- width: mainAreaWidth
57
- },
58
- pendingHistoryItems.map((item, index) =>
59
- React.createElement(HistoryItemDisplay, {
60
- key: `pending-${index}`,
61
- item,
62
- isPending: true,
63
- terminalWidth: mainAreaWidth,
64
- nextItem: pendingHistoryItems[index + 1]
65
- })
66
- )
67
- )
68
- );
69
- });
@@ -1,33 +0,0 @@
1
- /**
2
- * DefaultAppLayout - Main application layout
3
- */
4
-
5
- import React from 'react';
6
- import { Box } from 'ink';
7
- import { MainContent } from '../components/MainContent.js';
8
- import { Composer } from '../components/Composer.js';
9
- import { Notifications } from '../components/Notifications.js';
10
- import { Footer } from '../components/Footer.js';
11
- import { useUIState } from '../contexts/UIStateContext.js';
12
- import { useAppContext } from '../contexts/AppContext.js';
13
-
14
- export function DefaultAppLayout({ onSubmit, onClearScreen, commands, buffer }) {
15
- const uiState = useUIState();
16
- const appContext = useAppContext();
17
-
18
- return React.createElement(Box, {
19
- flexDirection: "column",
20
- padding: 0,
21
- ref: uiState.rootUiRef
22
- },
23
- React.createElement(MainContent),
24
- React.createElement(Notifications),
25
- React.createElement(Composer, {
26
- onSubmit,
27
- onClearScreen,
28
- commands,
29
- buffer
30
- }),
31
- React.createElement(Footer, { model: appContext.model })
32
- );
33
- }