Compare commits
3 Commits
codex/work
...
codex/remo
| Author | SHA1 | Date | |
|---|---|---|---|
| e69c637dba | |||
| 728cf36e7c | |||
| 346208dc2b |
14362
frontend/package-lock.json
generated
Normal file
14362
frontend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -20,6 +20,7 @@
|
|||||||
"@dicebear/collection": "^9.4.2",
|
"@dicebear/collection": "^9.4.2",
|
||||||
"@dicebear/core": "^9.4.2",
|
"@dicebear/core": "^9.4.2",
|
||||||
"@lobehub/icons": "^5.2.0",
|
"@lobehub/icons": "^5.2.0",
|
||||||
|
"@lobehub/ui": "^5.6.2",
|
||||||
"@radix-ui/react-dialog": "^1.1.15",
|
"@radix-ui/react-dialog": "^1.1.15",
|
||||||
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
||||||
"@radix-ui/react-label": "^2.1.7",
|
"@radix-ui/react-label": "^2.1.7",
|
||||||
@@ -31,6 +32,7 @@
|
|||||||
"@react-three/drei": "^10.7.6",
|
"@react-three/drei": "^10.7.6",
|
||||||
"@react-three/fiber": "^9.3.0",
|
"@react-three/fiber": "^9.3.0",
|
||||||
"@tailwindcss/vite": "^4.1.13",
|
"@tailwindcss/vite": "^4.1.13",
|
||||||
|
"antd": "^6.3.4",
|
||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"framer-motion": "^12.23.13",
|
"framer-motion": "^12.23.13",
|
||||||
@@ -38,6 +40,7 @@
|
|||||||
"lucide-react": "^0.544.0",
|
"lucide-react": "^0.544.0",
|
||||||
"react": "^19.1.1",
|
"react": "^19.1.1",
|
||||||
"react-dom": "^19.1.1",
|
"react-dom": "^19.1.1",
|
||||||
|
"react-is": "^19.2.0",
|
||||||
"react-markdown": "^10.1.0",
|
"react-markdown": "^10.1.0",
|
||||||
"recharts": "^3.2.1",
|
"recharts": "^3.2.1",
|
||||||
"remark-gfm": "^4.0.1",
|
"remark-gfm": "^4.0.1",
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import { useAgentStore } from './store/agentStore';
|
|||||||
import { useMarketStore } from './store/marketStore';
|
import { useMarketStore } from './store/marketStore';
|
||||||
import { usePortfolioStore } from './store/portfolioStore';
|
import { usePortfolioStore } from './store/portfolioStore';
|
||||||
import { useRuntimeStore } from './store/runtimeStore';
|
import { useRuntimeStore } from './store/runtimeStore';
|
||||||
import { useOpenClawStore } from './store/openclawStore';
|
|
||||||
import { useUIStore } from './store/uiStore';
|
import { useUIStore } from './store/uiStore';
|
||||||
|
|
||||||
const EDITABLE_AGENT_WORKSPACE_FILES = [
|
const EDITABLE_AGENT_WORKSPACE_FILES = [
|
||||||
@@ -139,11 +138,6 @@ export default function LiveTradingApp() {
|
|||||||
addSystemMessage,
|
addSystemMessage,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Make clientRef available to OpenClaw panel via store
|
|
||||||
useEffect(() => {
|
|
||||||
useOpenClawStore.getState().setClientRef(clientRef);
|
|
||||||
}, [clientRef]);
|
|
||||||
|
|
||||||
const runtimeControls = useRuntimeControls({
|
const runtimeControls = useRuntimeControls({
|
||||||
clientRef,
|
clientRef,
|
||||||
currentTickers: tickers,
|
currentTickers: tickers,
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ const AgentFeed = lazy(() => import('./AgentFeed'));
|
|||||||
const StatisticsView = lazy(() => import('./StatisticsView'));
|
const StatisticsView = lazy(() => import('./StatisticsView'));
|
||||||
const StockExplainView = lazy(() => import('./StockExplainView.jsx'));
|
const StockExplainView = lazy(() => import('./StockExplainView.jsx'));
|
||||||
const TraderView = lazy(() => import('./TraderView.jsx'));
|
const TraderView = lazy(() => import('./TraderView.jsx'));
|
||||||
const OpenClawView = lazy(() => import('./OpenClawView.jsx'));
|
|
||||||
|
|
||||||
function ViewLoadingFallback({ label = '加载中...' }) {
|
function ViewLoadingFallback({ label = '加载中...' }) {
|
||||||
return (
|
return (
|
||||||
@@ -137,6 +136,12 @@ export default function AppShell({
|
|||||||
const { setIsRuntimeSettingsOpen, setIsWatchlistPanelOpen } = useRuntimeStore();
|
const { setIsRuntimeSettingsOpen, setIsWatchlistPanelOpen } = useRuntimeStore();
|
||||||
const { setChartTab, setCurrentView, setIsResizing, setLeftWidth } = useUIStore();
|
const { setChartTab, setCurrentView, setIsResizing, setLeftWidth } = useUIStore();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (currentView === 'openclaw') {
|
||||||
|
setCurrentView('statistics');
|
||||||
|
}
|
||||||
|
}, [currentView, setCurrentView]);
|
||||||
|
|
||||||
// Resize handler
|
// Resize handler
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isResizing) return;
|
if (!isResizing) return;
|
||||||
@@ -172,7 +177,7 @@ export default function AppShell({
|
|||||||
currentView === 'room' ? 'show-room' :
|
currentView === 'room' ? 'show-room' :
|
||||||
currentView === 'explain' ? 'show-explain' :
|
currentView === 'explain' ? 'show-explain' :
|
||||||
currentView === 'chart' ? 'show-chart' :
|
currentView === 'chart' ? 'show-chart' :
|
||||||
currentView === 'statistics' ? 'show-statistics' : 'show-openclaw'}`;
|
'show-statistics'}`;
|
||||||
return base;
|
return base;
|
||||||
}, [currentView]);
|
}, [currentView]);
|
||||||
|
|
||||||
@@ -382,12 +387,6 @@ export default function AppShell({
|
|||||||
>
|
>
|
||||||
统计
|
统计
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
className={`view-nav-btn ${currentView === 'openclaw' ? 'active' : ''}`}
|
|
||||||
onClick={() => setCurrentView('openclaw')}
|
|
||||||
>
|
|
||||||
OpenClaw
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={viewClassName}>
|
<div className={viewClassName}>
|
||||||
@@ -491,13 +490,6 @@ export default function AppShell({
|
|||||||
/>
|
/>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* OpenClaw View Panel */}
|
|
||||||
<div className="view-panel">
|
|
||||||
<Suspense fallback={<ViewLoadingFallback label="加载 OpenClaw 视图..." />}>
|
|
||||||
<OpenClawView />
|
|
||||||
</Suspense>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const resolveValue = (updater, currentValue) => (
|
|||||||
*/
|
*/
|
||||||
export const useUIStore = create((set) => ({
|
export const useUIStore = create((set) => ({
|
||||||
// Current view
|
// Current view
|
||||||
currentView: 'traders', // 'traders' | 'room' | 'explain' | 'chart' | 'statistics' | 'openclaw' | 'runtime'
|
currentView: 'traders', // 'traders' | 'room' | 'explain' | 'chart' | 'statistics' | 'runtime'
|
||||||
setCurrentView: (currentView) => set((state) => ({ currentView: resolveValue(currentView, state.currentView) })),
|
setCurrentView: (currentView) => set((state) => ({ currentView: resolveValue(currentView, state.currentView) })),
|
||||||
|
|
||||||
// Chart tab
|
// Chart tab
|
||||||
|
|||||||
@@ -1098,10 +1098,6 @@ export default function GlobalStyles() {
|
|||||||
transform: translateX(-80%);
|
transform: translateX(-80%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.view-slider-five.show-openclaw {
|
|
||||||
transform: translateX(-100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.view-panel {
|
.view-panel {
|
||||||
flex: 0 0 33.333%;
|
flex: 0 0 33.333%;
|
||||||
width: 33.333%;
|
width: 33.333%;
|
||||||
|
|||||||
6
start.sh
6
start.sh
@@ -174,7 +174,11 @@ build_frontend() {
|
|||||||
echo ""
|
echo ""
|
||||||
echo -e "${CYAN}构建前端...${NC}"
|
echo -e "${CYAN}构建前端...${NC}"
|
||||||
if [ -d "frontend" ] && command -v npm >/dev/null 2>&1; then
|
if [ -d "frontend" ] && command -v npm >/dev/null 2>&1; then
|
||||||
(cd frontend && npm install --legacy-peer-deps && npm run build)
|
if [ -f "frontend/package-lock.json" ]; then
|
||||||
|
(cd frontend && npm ci && npm run build)
|
||||||
|
else
|
||||||
|
(cd frontend && npm install && npm run build)
|
||||||
|
fi
|
||||||
echo -e "${GREEN}前端构建完成: ${FRONTEND_DIST}${NC}"
|
echo -e "${GREEN}前端构建完成: ${FRONTEND_DIST}${NC}"
|
||||||
else
|
else
|
||||||
echo -e "${RED}前端构建失败: 需要 npm 和 frontend 目录${NC}"
|
echo -e "${RED}前端构建失败: 需要 npm 和 frontend 目录${NC}"
|
||||||
|
|||||||
Reference in New Issue
Block a user