File size: 2,443 Bytes
cce8120 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | #!/usr/bin/env bash
set -Eeuo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT"
mkdir -p components/layout
cat > components/layout/WorkspaceShell.jsx <<'EOC'
"use client";
import { useState } from "react";
import FileExplorer from "../explorer/FileExplorer";
import CodeEditor from "../editor/CodeEditor";
import AIChatPanel from "../chat/AIChatPanel";
import TerminalPanel from "../terminal/TerminalPanel";
import AgentMonitor from "../dashboards/AgentMonitor";
export default function WorkspaceShell() {
const [left,setLeft]=useState(true);
const [right,setRight]=useState(true);
const [bottom,setBottom]=useState(true);
return (
<div className="workspace-shell">
<header className="workspace-header">
<div className="workspace-logo">
DOLOR3V
</div>
<div className="workspace-title">
Autonomous AI Workspace
</div>
<div className="workspace-actions">
<button>Preview</button>
<button>Build</button>
<button>Deploy</button>
<button>Settings</button>
</div>
</header>
<div className="workspace-body">
{left &&
<aside className="workspace-left">
<FileExplorer/>
</aside>
}
<main className="workspace-main">
<CodeEditor/>
</main>
{right &&
<aside className="workspace-right">
<AIChatPanel/>
<AgentMonitor/>
</aside>
}
</div>
{bottom &&
<footer className="workspace-terminal">
<TerminalPanel/>
</footer>
}
</div>
);
}
EOC
grep -q "workspace-shell" app/globals.css || cat >> app/globals.css <<'EOC'
.workspace-shell{
height:100vh;
display:grid;
grid-template-rows:64px 1fr 260px;
background:#020617;
color:#fff;
}
.workspace-header{
display:flex;
align-items:center;
justify-content:space-between;
padding:0 20px;
background:#0f172a;
border-bottom:1px solid #1e293b;
}
.workspace-logo{
font-size:22px;
font-weight:700;
color:#38bdf8;
}
.workspace-title{
font-size:15px;
font-weight:600;
}
.workspace-actions{
display:flex;
gap:10px;
}
.workspace-actions button{
background:#1e293b;
color:white;
padding:10px 18px;
border:none;
border-radius:8px;
cursor:pointer;
}
.workspace-body{
display:grid;
grid-template-columns:280px 1fr 380px;
overflow:hidden;
}
.workspace-left{
border-right:1px solid #1e293b;
overflow:auto;
}
.workspace-main{
overflow:hidden;
}
.workspace-right{
border-left:1px solid #1e293b;
display:flex;
flex-direction:column;
overflow:auto;
}
.workspace-terminal{
border-top:1px solid #1e293b;
overflow:hidden;
}
EOC
echo "Workspace shell installed."
|