feat: Action Log hidden by default, click header to toggle
- showAIActionLog state defaults to false - Action Log header clickable (cursor-pointer), shows '-' when visible, '+' when hidden - Body always rendered with CSS class 'hidden' toggled, avoids deep ternary nesting that exceeded Babel 8 maxTargets limit
This commit is contained in:
@@ -7234,6 +7234,7 @@ const App = () => {
|
||||
const [aiSuggestions, setAiSuggestions] = useState([]);
|
||||
const [showAiTypeahead, setShowAiTypeahead] = useState(false);
|
||||
const [showAISuggestions, setShowAISuggestions] = useState(true);
|
||||
const [showAIActionLog, setShowAIActionLog] = useState(false);
|
||||
const [selectedProviderId, setSelectedProviderId] = useState('');
|
||||
const [exportSettings, setExportSettings] = useState({
|
||||
sampleRate: '44100',
|
||||
@@ -16206,21 +16207,22 @@ const App = () => {
|
||||
}), "Undo"))), /*#__PURE__*/React.createElement("div", {
|
||||
className: "flex-1 min-h-0 flex flex-col overflow-hidden mt-1"
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: "text-[10px] font-bold text-zinc-400 uppercase shrink-0 pb-0.5"
|
||||
className: "text-[10px] font-bold text-zinc-400 uppercase shrink-0 pb-0.5 cursor-pointer hover:text-zinc-200 select-none",
|
||||
onClick: () => setShowAIActionLog(!showAIActionLog)
|
||||
}, /*#__PURE__*/React.createElement("span", {
|
||||
className: "inline-flex items-center gap-1"
|
||||
}, /*#__PURE__*/React.createElement("i", {
|
||||
"data-lucide": "list",
|
||||
className: "w-3 h-3"
|
||||
}), " Action Log")), /*#__PURE__*/React.createElement("div", {
|
||||
}), " Action Log", showAIActionLog ? " \u2212" : " +")), /*#__PURE__*/React.createElement("div", {
|
||||
ref: actionLogContainerRef,
|
||||
className: "flex-1 overflow-y-auto no-scrollbar bg-[#0f0f0f] rounded border border-zinc-800 select-text"
|
||||
className: "flex-1 overflow-y-auto no-scrollbar bg-[#0f0f0f] rounded border border-zinc-800 select-text" + (showAIActionLog ? '' : ' hidden')
|
||||
}, aiActionLog.length === 0 ? /*#__PURE__*/React.createElement("div", {
|
||||
className: "text-xs text-zinc-600 italic select-text"
|
||||
}, "Chưa có hành động nào.") : aiActionLog.map((entry, i) => /*#__PURE__*/React.createElement("div", {
|
||||
className: "text-xs text-zinc-600 italic select-text p-1"
|
||||
}, "Ch\u01B0a c\u00F3 h\u00E0nh \u0111\u1ED9ng n\u00E0o.") : aiActionLog.map(function(entry, i) { return /*#__PURE__*/React.createElement("div", {
|
||||
key: i,
|
||||
className: `text-xs font-mono py-0.5 border-b border-zinc-900 last:border-0 ${entry.type === 'error' ? 'text-red-400' : entry.type === 'status' ? 'text-zinc-400 italic' : entry.type === 'undo' ? 'text-amber-400' : 'text-zinc-300'}`
|
||||
}, new Date(entry.time).toLocaleTimeString(), entry.text)))), showAISuggestions ? /*#__PURE__*/React.createElement("div", {
|
||||
className: 'text-xs font-mono py-0.5 border-b border-zinc-900 last:border-0 ' + (entry.type === 'error' ? 'text-red-400' : entry.type === 'status' ? 'text-zinc-400 italic' : entry.type === 'undo' ? 'text-amber-400' : 'text-zinc-300')
|
||||
}, new Date(entry.time).toLocaleTimeString(), entry.text); }))), showAISuggestions ? /*#__PURE__*/React.createElement("div", {
|
||||
className: "flex flex-col gap-1 mb-1 shrink-0"
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: "flex items-center gap-1 text-[10px] font-bold text-zinc-400 uppercase"
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user