diff --git a/webui/src/App.tsx b/webui/src/App.tsx
index 935a941..a52f129 100644
--- a/webui/src/App.tsx
+++ b/webui/src/App.tsx
@@ -12,6 +12,7 @@ import Logs from './pages/Logs';
import Skills from './pages/Skills';
import Memory from './pages/Memory';
import TaskAudit from './pages/TaskAudit';
+import Tasks from './pages/Tasks';
export default function App() {
return (
@@ -29,6 +30,7 @@ export default function App() {
} />
} />
} />
+ } />
diff --git a/webui/src/components/Sidebar.tsx b/webui/src/components/Sidebar.tsx
index e220102..d87003a 100644
--- a/webui/src/components/Sidebar.tsx
+++ b/webui/src/components/Sidebar.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { LayoutDashboard, MessageSquare, Settings, Clock, Server, Terminal, Zap, FolderOpen, ClipboardList } from 'lucide-react';
+import { LayoutDashboard, MessageSquare, Settings, Clock, Server, Terminal, Zap, FolderOpen, ClipboardList, ListTodo } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { useAppContext } from '../context/AppContext';
import NavItem from './NavItem';
@@ -22,6 +22,7 @@ const Sidebar: React.FC = () => {
} label={t('nodes')} to="/nodes" />
} label={t('memory')} to="/memory" />
} label={t('taskAudit')} to="/task-audit" />
+ } label={t('tasks')} to="/tasks" />
diff --git a/webui/src/i18n/index.ts b/webui/src/i18n/index.ts
index d5c64b1..7e7e9fb 100644
--- a/webui/src/i18n/index.ts
+++ b/webui/src/i18n/index.ts
@@ -14,6 +14,7 @@ const resources = {
skills: 'Skills',
memory: 'Memory',
taskAudit: 'Task Audit',
+ tasks: 'Tasks',
taskList: 'Task List',
taskDetail: 'Task Detail',
taskQueue: 'Task Queue',
@@ -183,6 +184,7 @@ const resources = {
skills: '技能管理',
memory: '记忆文件',
taskAudit: '任务审计',
+ tasks: '任务管理',
taskList: '任务列表',
taskDetail: '任务详情',
taskQueue: '任务队列',
diff --git a/webui/src/pages/TaskAudit.tsx b/webui/src/pages/TaskAudit.tsx
index 043ba7f..e00c2bf 100644
--- a/webui/src/pages/TaskAudit.tsx
+++ b/webui/src/pages/TaskAudit.tsx
@@ -32,7 +32,6 @@ const TaskAudit: React.FC = () => {
const [loading, setLoading] = useState(false);
const [sourceFilter, setSourceFilter] = useState('all');
const [statusFilter, setStatusFilter] = useState('all');
- const [draft, setDraft] = useState
({ id: '', content: '', priority: 'normal', status: 'todo', source: 'manual', due_at: '' });
const [dailyReport, setDailyReport] = useState('');
const [reportDate, setReportDate] = useState(new Date().toISOString().slice(0,10));
@@ -101,20 +100,6 @@ const TaskAudit: React.FC = () => {
setSelected(null);
setDraft({ id: '', content: '', priority: 'normal', status: 'todo', source: 'manual', due_at: '' });
};
- const saveTask = async (action: 'create'|'update'|'delete') => {
- try {
- const url = `/webui/api/tasks${q}`;
- const payload: any = { action };
- if (action === 'create') payload.item = draft;
- if (action === 'update') { payload.id = draft.id; payload.item = draft; }
- if (action === 'delete') payload.id = draft.id;
- const r = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) });
- if (!r.ok) throw new Error(await r.text());
- await fetchData();
- } catch (e) {
- console.error(e);
- }
- };
const selectedPretty = useMemo(() => selected ? JSON.stringify(selected, null, 2) : '', [selected]);
return (
@@ -138,7 +123,6 @@ const TaskAudit: React.FC = () => {
-
@@ -165,7 +149,7 @@ const TaskAudit: React.FC = () => {
return (