feat(ui): 添加底部状态栏和优化代码编辑器空状态

- 新增 StatusBar 组件,显示 Git 分支、诊断信息和连接状态
- 添加 Git API 端点 (GET /api/files/git) 获取分支和 dirty 状态
- 优化 CodeEditor 空状态,添加图标和引导提示
- 修复 Chat 页面高度问题 (h-screen -> h-full)
This commit is contained in:
2025-12-17 17:04:38 +08:00
parent 250d2cb4b5
commit a3ddc39771
7 changed files with 215 additions and 6 deletions
+6 -2
View File
@@ -16,6 +16,7 @@ import {
LSPPanel,
DiagnosticsPanel,
SessionPanel,
StatusBar,
Toaster,
ThemeProvider,
listSessions,
@@ -111,9 +112,9 @@ export function App() {
return (
<ThemeProvider>
<div className="h-screen flex bg-surface-base">
<div className="h-screen flex flex-col bg-surface-base">
{/* 主内容区域:左侧文件浏览器 + 右侧对话框 */}
<div className="flex-1 flex min-w-0">
<div className="flex-1 flex min-w-0 overflow-hidden">
{/* 左侧:IDE(文件浏览器 + 代码编辑器) */}
<div className="hidden md:flex flex-col border-r border-line w-[50%] lg:w-[60%]">
<IDE />
@@ -147,6 +148,9 @@ export function App() {
</div>
{/* 底部状态栏 */}
<StatusBar onDiagnosticsClick={() => setShowDiagnostics(true)} />
{/* 命令面板 */}
{showCommands && <CommandPanel onClose={() => setShowCommands(false)} responsive />}
+1 -1
View File
@@ -154,7 +154,7 @@ export function ChatPage({
);
return (
<div className="flex-1 flex flex-col h-screen">
<div className="flex-1 flex flex-col h-full">
{/* Header */}
<div className="flex items-center justify-between px-4 md:px-6 py-3 border-b border-line bg-surface-subtle">
<h1 className="text-lg font-medium text-fg">Chat</h1>