Revert "feat: theme-aware terminal + agent knowledge doc"
Build & Push Portfolio Image / build-push (push) Successful in 29s

This reverts commit 72cc1bbe76.
This commit is contained in:
Story Crater Bot
2026-08-31 22:41:25 -07:00
parent 72cc1bbe76
commit 9f900df351
2 changed files with 12 additions and 286 deletions
+12 -46
View File
@@ -4,21 +4,6 @@ import { motion } from 'framer-motion'
import { useEffect, useRef, useState } from 'react'
import { useTerminal } from '@/lib/TerminalContext'
function useTheme() {
const [isDark, setIsDark] = useState(true)
useEffect(() => {
const check = () => setIsDark(document.documentElement.classList.contains('dark'))
check()
const observer = new MutationObserver(check)
observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] })
return () => observer.disconnect()
}, [])
return isDark
}
const commands: Record<string, string> = {
help: `Available commands:
ls - List services
@@ -65,7 +50,6 @@ export function InteractiveTerminal() {
const { isOpen, setIsOpen } = useTerminal()
const [isMac, setIsMac] = useState(true)
const terminalRef = useRef<HTMLDivElement>(null)
const isDark = useTheme()
useEffect(() => {
// Detect if user is on Mac
@@ -117,23 +101,13 @@ export function InteractiveTerminal() {
<motion.div
initial={{ opacity: 0, y: 10 }}
animate={{ opacity: 1, y: 0 }}
className={`rounded-lg shadow-2xl w-96 h-96 flex flex-col border ${
isDark
? 'bg-gray-950 border-gray-700'
: 'bg-white border-gray-300'
}`}
className="bg-gray-950 border border-gray-700 rounded-lg shadow-2xl w-96 h-96 flex flex-col"
>
<div className={`border-b px-4 py-3 flex justify-between items-center ${
isDark
? 'bg-gray-900 border-gray-700'
: 'bg-gray-100 border-gray-300'
}`}>
<span className={`font-mono text-xs ${isDark ? 'text-gray-300' : 'text-gray-700'}`}>
Poimen (Agent Terminal)
</span>
<div className="bg-gray-900 border-b border-gray-700 px-4 py-3 flex justify-between items-center">
<span className="text-gray-300 font-mono text-xs">Poimen (Agent Terminal)</span>
<button
onClick={() => setIsOpen(false)}
className={isDark ? 'text-gray-400 hover:text-white' : 'text-gray-500 hover:text-gray-900'}
className="text-gray-400 hover:text-white"
>
</button>
@@ -141,31 +115,25 @@ export function InteractiveTerminal() {
<div
ref={terminalRef}
className={`flex-1 overflow-y-auto px-4 py-3 font-mono text-sm space-y-2 ${
isDark ? 'text-gray-200' : 'text-gray-800'
}`}
className="flex-1 overflow-y-auto px-4 py-3 font-mono text-sm text-gray-200 space-y-2"
>
{history.length === 0 && (
<div className={isDark ? 'text-gray-500' : 'text-gray-400'}>
type &apos;help&apos; for commands
</div>
<div className="text-gray-500">type 'help' for commands</div>
)}
{history.map((entry, i) => (
<div key={i}>
<div className={isDark ? 'text-green-400' : 'text-green-600'}>
<span className={isDark ? 'text-red-400' : 'text-red-600'}></span> % {entry.cmd}
</div>
<div className={`whitespace-pre-wrap text-xs mt-1 ${isDark ? 'text-gray-300' : 'text-gray-700'}`}>
<div className="text-green-400"><span className="text-red-400"></span> % {entry.cmd}</div>
<div className="text-gray-300 whitespace-pre-wrap text-xs mt-1">
{entry.output}
</div>
</div>
))}
</div>
<div className={`border-t px-4 py-2 ${isDark ? 'border-gray-700' : 'border-gray-300'}`}>
<div className="border-t border-gray-700 px-4 py-2">
<div className="flex items-center">
<span className={`font-mono text-sm ${isDark ? 'text-red-400' : 'text-red-600'}`}></span>
<span className={`font-mono text-sm ml-2 ${isDark ? 'text-green-400' : 'text-green-600'}`}>% </span>
<span className="text-red-400 font-mono text-sm"></span>
<span className="text-green-400 font-mono text-sm ml-2">% </span>
<input
type="text"
value={input}
@@ -174,9 +142,7 @@ export function InteractiveTerminal() {
if (e.key === 'Enter') handleCommand(input)
}}
placeholder=""
className={`flex-1 bg-transparent font-mono text-sm outline-none ml-1 ${
isDark ? 'text-green-400' : 'text-green-600'
}`}
className="flex-1 bg-transparent text-green-400 font-mono text-sm outline-none ml-1"
autoFocus
/>
</div>