Commit 49bc83eb by 黄南光

大幅优化本体论系统

1 parent 0a91ca92
...@@ -16,17 +16,16 @@ ...@@ -16,17 +16,16 @@
"port": 8099 "port": 8099
}, },
{ {
"name": "onto-v3", "name": "onto-8102",
"runtimeExecutable": "./.venv/Scripts/python.exe", "runtimeExecutable": "./.venv/Scripts/python.exe",
"runtimeArgs": [ "runtimeArgs": [
"-m", "scripts/serve_8102.py"
"uvicorn",
"app.main:app",
"--host",
"127.0.0.1",
"--port",
"8102"
], ],
"env": {
"PORT": "8102",
"WEB_DIST": "dist_8102",
"ONTO_WORKSPACE": "default"
},
"port": 8102 "port": 8102
}, },
{ {
......
...@@ -320,7 +320,10 @@ def _object_write_revert(args: dict, result: dict) -> None: ...@@ -320,7 +320,10 @@ def _object_write_revert(args: dict, result: dict) -> None:
def object_write(args: dict, ctx: dict) -> dict: def object_write(args: dict, ctx: dict) -> dict:
e = objects.write(args["object_type"], str(args["key"]), args["property"], args.get("value"), e = objects.write(args["object_type"], str(args["key"]), args["property"], args.get("value"),
action_run_id=ctx.get("run_id", "")) action_run_id=ctx.get("run_id", ""))
return {"edit_id": e["id"], "from": e["prev"], "to": e["value"]} ot = objects.object_type(args["object_type"])
return {"edit_id": e["id"], "from": e["prev"], "to": e["value"],
"summary": f"{ot['name']}「{args['key']}」的「{args['property']}」"
f"已从 {e['prev']!r} 改为 {e['value']!r}(编辑记录 #{e['id']})"}
def _object_create_preview(args: dict) -> dict: def _object_create_preview(args: dict) -> dict:
...@@ -344,7 +347,9 @@ def _object_create_revert(args: dict, result: dict) -> None: ...@@ -344,7 +347,9 @@ def _object_create_revert(args: dict, result: dict) -> None:
preview=_object_create_preview, revert=_object_create_revert, risk_level="high") preview=_object_create_preview, revert=_object_create_revert, risk_level="high")
def object_create(args: dict, ctx: dict) -> dict: def object_create(args: dict, ctx: dict) -> dict:
e = objects.create(args["object_type"], args.get("values") or {}, action_run_id=ctx.get("run_id", "")) e = objects.create(args["object_type"], args.get("values") or {}, action_run_id=ctx.get("run_id", ""))
return {"edit_id": e["id"], "key": e["object_key"]} ot = objects.object_type(args["object_type"])
return {"edit_id": e["id"], "key": e["object_key"],
"summary": f"已在业务库新建{ot['name']}「{e['object_key']}」(编辑记录 #{e['id']})"}
def _task_preview(args: dict) -> dict: def _task_preview(args: dict) -> dict:
...@@ -380,7 +385,8 @@ def task_create(args: dict, ctx: dict) -> dict: ...@@ -380,7 +385,8 @@ def task_create(args: dict, ctx: dict) -> dict:
due_at=due, object_ref=args.get("object_ref", ""), due_at=due, object_ref=args.get("object_ref", ""),
source_type="action", source_id=ctx.get("run_id", ""), source_type="action", source_id=ctx.get("run_id", ""),
context={"action_run": ctx.get("run_id", "")}) context={"action_run": ctx.get("run_id", "")})
return {"task_id": t["id"]} who = args.get("assignee") or f"角色「{args.get('role') or '未指定'}」"
return {"task_id": t["id"], "summary": f"已派发任务 #{t['id']}「{args['title']}」给 {who}"}
def _notify_preview(args: dict) -> dict: def _notify_preview(args: dict) -> dict:
...@@ -396,7 +402,7 @@ def _notify_preview(args: dict) -> dict: ...@@ -396,7 +402,7 @@ def _notify_preview(args: dict) -> dict:
def notify_send(args: dict, ctx: dict) -> dict: def notify_send(args: dict, ctx: dict) -> dict:
nid = notify.send(args["recipient"], args["title"], args.get("body", ""), nid = notify.send(args["recipient"], args["title"], args.get("body", ""),
link=f"#/inbox?run={ctx.get('run_id', '')}") link=f"#/inbox?run={ctx.get('run_id', '')}")
return {"notification_id": nid} return {"notification_id": nid, "summary": f"已通知 {args['recipient']}:{args['title']}(通知 #{nid})"}
def _sop_start_preview(args: dict) -> dict: def _sop_start_preview(args: dict) -> dict:
...@@ -462,7 +468,25 @@ def webhook_call(args: dict, ctx: dict) -> dict: ...@@ -462,7 +468,25 @@ def webhook_call(args: dict, ctx: dict) -> dict:
body = resp.text[:2000] body = resp.text[:2000]
if resp.status_code >= 400: if resp.status_code >= 400:
raise RuntimeError(f"外部端点返回 {resp.status_code}:{body[:300]}") raise RuntimeError(f"外部端点返回 {resp.status_code}:{body[:300]}")
return {"status": resp.status_code, "body": body} return {"status": resp.status_code, "body": body,
"summary": f"外部端点「{ep['display_name'] or ep['name']}」返回 {resp.status_code}"}
def _audit_log_preview(args: dict) -> dict:
return {"summary": f"往「审计日志」表写一行:{args.get('message', '')}",
"changes": [{"table": "onto_sop_audit_log", "property": "message", "from": None,
"to": args.get("message")}]}
@tool("audit.write_log", "写审计日志", "把一条说明写进专门的审计日志表(onto_sop_audit_log),"
"用来演示定时任务 / 流程卡的写操作全链路留痕:写完直接返回新记录的 id。",
{"type": "object", "properties": {"message": _s("要记录的内容")}, "required": ["message"]},
preview=_audit_log_preview, risk_level="low")
def audit_write_log(args: dict, ctx: dict) -> dict:
from ..governance import sop_audit
row = sop_audit.write(str(args["message"]), action_run_id=ctx.get("run_id", ""))
return {"log_id": row["id"], "message": row["message"], "created_at": row["created_at"],
"summary": f"审计日志 #{row['id']} 已写入:{row['message']}"}
def actor_label() -> str: def actor_label() -> str:
......
...@@ -87,6 +87,20 @@ class LlmCall(Base): ...@@ -87,6 +87,20 @@ class LlmCall(Base):
ok: Mapped[int] = mapped_column(Integer, default=1) ok: Mapped[int] = mapped_column(Integer, default=1)
class SopAuditLog(Base):
"""业务侧的写操作演示表:给「记录审计日志」动作用——定时任务 / 流程卡跑起来,
这张表就多一行,界面上能直接看到新记录的 id、内容、来自哪次流程运行 / 哪张审批单。"""
__tablename__ = "onto_sop_audit_log"
id: Mapped[str] = mapped_column(String(64), primary_key=True)
workspace: Mapped[str] = mapped_column(String(64), default="default", index=True)
message: Mapped[str] = mapped_column(Text, default="")
sop_run_id: Mapped[str] = mapped_column(String(64), default="", index=True)
action_run_id: Mapped[str] = mapped_column(String(64), default="", index=True)
actor_id: Mapped[str] = mapped_column(String(128), default="")
actor_name: Mapped[str] = mapped_column(String(128), default="")
created_at: Mapped[dt.datetime] = mapped_column(DateTime, default=now, index=True)
class BizRole(Base): class BizRole(Base):
"""业务角色(如「区域负责人」):动作审批、SOP 人工任务按它派发。成员在「成员与角色」里挂上业务角色。""" """业务角色(如「区域负责人」):动作审批、SOP 人工任务按它派发。成员在「成员与角色」里挂上业务角色。"""
__tablename__ = "onto_biz_role" __tablename__ = "onto_biz_role"
......
"""SOP 审计日志表:专门给「记录审计日志」这个演示动作写数据用。
只追加,且每次写完都顺手记一条到通用审计日志(onto_audit_log),
这样「运行监控 → 审计与成本」页面不用改一行代码就能看到它。
"""
from __future__ import annotations
from sqlalchemy import func, select
from ..core import identity
from ..core.dbx import iso, new_id, session
from . import audit
from .models import SopAuditLog
def write(message: str, *, sop_run_id: str = "", action_run_id: str = "") -> dict:
a = identity.current()
rid = new_id("sal")
with session() as s:
row = SopAuditLog(id=rid, workspace=a.workspace, message=(message or "")[:2000],
sop_run_id=sop_run_id, action_run_id=action_run_id,
actor_id=a.id, actor_name=a.name)
s.add(row)
s.commit()
out = _dict(row)
audit.record("sop.audit_log", "sop_audit_log", rid,
f"写入审计日志 #{rid}:{message}"[:400])
return out
def _dict(r: SopAuditLog) -> dict:
return {"id": r.id, "workspace": r.workspace, "message": r.message,
"sop_run_id": r.sop_run_id, "action_run_id": r.action_run_id,
"actor_id": r.actor_id, "actor_name": r.actor_name, "created_at": iso(r.created_at)}
def query(*, workspace: str = "default", limit: int = 100, offset: int = 0) -> dict:
with session() as s:
stmt = select(SopAuditLog).where(SopAuditLog.workspace == workspace)
total = s.scalar(select(func.count()).select_from(stmt.subquery())) or 0
rows = s.scalars(stmt.order_by(SopAuditLog.id.desc()).offset(offset).limit(limit)).all()
return {"total": total, "items": [_dict(r) for r in rows]}
...@@ -348,6 +348,19 @@ def advance(run_id: str) -> dict: ...@@ -348,6 +348,19 @@ def advance(run_id: str) -> dict:
return _advance(run_id, run) return _advance(run_id, run)
def _effects_note(result: dict | None) -> str:
"""执行完的效果摘要:只用工具自己给的 summary(常常带着新记录的 id),
这样流程卡的运行记录一眼就能看出「写了什么」,不用点开「输出」翻 JSON。
工具没给 summary 就返回空串,让调用方退回动作的预览文案,不瞎编「xxx 完成」。"""
parts = []
for e in (result or {}).get("effects") or []:
if not e.get("ok"):
parts.append(f"{e.get('tool')} 失败:{str(e.get('error') or '')[:120]}")
elif (e.get("result") or {}).get("summary"):
parts.append(str(e["result"]["summary"]))
return ";".join(parts)
def _action_outcome(step: dict, sr_id: str, ar: dict) -> tuple[str, str, dict] | None: def _action_outcome(step: dict, sr_id: str, ar: dict) -> tuple[str, str, dict] | None:
"""动作已经有结果时(自动执行的动作在提议当下就执行完了)决定流程往哪走。 """动作已经有结果时(自动执行的动作在提议当下就执行完了)决定流程往哪走。
...@@ -522,7 +535,8 @@ def _advance(run_id: str, run: dict) -> dict: ...@@ -522,7 +535,8 @@ def _advance(run_id: str, run: dict) -> dict:
_finish(run_id, "rejected" if ar["status"] in ("rejected", "cancelled") else "failed", _finish(run_id, "rejected" if ar["status"] in ("rejected", "cancelled") else "failed",
error=how) error=how)
break break
_update_step(sid, status="done", output=out, note=f"{how}:{ar['preview'].get('summary', '')}") _update_step(sid, status="done", output=out,
note=f"{how}:{_effects_note(out.get('result')) or ar['preview'].get('summary', '')}")
if step.get("output"): if step.get("output"):
env[step["output"]] = out env[step["output"]] = out
_set_run(run_id, vars=env) _set_run(run_id, vars=env)
...@@ -652,7 +666,8 @@ def _on_action(ar: dict) -> None: ...@@ -652,7 +666,8 @@ def _on_action(ar: dict) -> None:
return return
nxt, how, out = decided nxt, how, out = decided
if nxt: if nxt:
_resume(run["id"], sr["id"], nxt, out, step.get("output", ""), note=how) note = f"{how}:{_effects_note(out.get('result')) or (ar.get('preview') or {}).get('summary', '')}"
_resume(run["id"], sr["id"], nxt, out, step.get("output", ""), note=note)
return return
_update_step(sr["id"], status="failed", output=out, note=how, error=ar.get("error", "")) _update_step(sr["id"], status="failed", output=out, note=how, error=ar.get("error", ""))
_set_run(run["id"], status="running") _set_run(run["id"], status="running")
......
"""演示用:新建一个「记录审计日志」动作 + 一张只有一步的流程卡 + 一个定时任务,
串起来就是「到点 -> 流程卡跑起来 -> 自动执行的动作 -> 写进 onto_sop_audit_log 表」。
跑法(对着 8101 用的库,workspace=default):
./.venv/Scripts/python.exe scripts/seed_audit_demo.py
可以重复跑:已存在同名积木 / 流程卡 / 监控就跳过,不会建重复的。
"""
from __future__ import annotations
import os
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
os.chdir(ROOT)
sys.path.insert(0, str(ROOT))
os.environ.setdefault("ONTO_WORKSPACE", "default")
import app.capability.builtins # noqa: E402,F401 给 registry 注册内置函数/工具(含 audit.write_log)
ACTION_NAME = "记录审计日志"
SOP_TITLE = "审计日志定时巡检"
WATCH_TITLE = "定时写审计日志"
LOG_MESSAGE = "定时任务「审计日志定时巡检」自动触发:验证 定时任务 → 流程卡 → 动作 → 写库 全链路可追溯"
def ensure_action() -> str:
from app.kernel import service as ksvc
existing = ksvc.rt_find(ACTION_NAME, "action") or ksvc.find(ACTION_NAME, "action")
if existing:
print(f"[跳过] 动作「{ACTION_NAME}」已存在:{existing['id']}")
return existing["id"]
spec = {
"params": [{"name": "message", "label": "日志内容", "type": "text", "required": True}],
"effects": [{"tool": "audit.write_log", "args": {"message": "$message"}}],
"approval": {"mode": "auto"},
}
c = ksvc.create_concept("action", ACTION_NAME, description="把一条说明写进「审计日志」表,用来演示写操作全链路留痕。",
spec=spec)
print(f"[新建] 动作「{ACTION_NAME}」:{c['id']}(草稿)")
r = ksvc.publish(note=f"新增「{ACTION_NAME}」动作")
print(f"[发布] 本体第 {r['revision']} 版")
return c["id"]
def ensure_sop() -> str:
from app.sop import engine as sop_engine, service as sop_service
existing = next((d for d in sop_service.list_defs() if d["title"] == SOP_TITLE), None)
if existing and existing["status"] == "published":
print(f"[跳过] 流程卡「{SOP_TITLE}」已发布:{existing['id']}")
return existing["id"]
if existing is None:
spec = {"steps": [
{"id": "log", "type": "action", "title": "写审计日志", "action": ACTION_NAME,
"params": {"message": LOG_MESSAGE}, "next": "end"},
{"id": "end", "type": "end", "title": "结束", "outcome": "已写入审计日志"},
]}
d = sop_service.create(SOP_TITLE, description="定时任务专用的演示流程卡:只有一步,把一条日志写进审计表。",
spec=spec)
print(f"[新建] 流程卡「{SOP_TITLE}」:{d['id']}(草稿)")
else:
d = existing
print(f"[沿用] 流程卡「{SOP_TITLE}」草稿:{d['id']}")
run = sop_engine.start(d["id"], {}, mode="dry_run", trigger="dry_run", wait=True)
if run["status"] != "done":
raise SystemExit(f"试运行没通过:{run.get('status')} {run.get('error')}")
print(f"[试运行] 通过:{run['id']}")
item = sop_service.submit_publish(d["id"], note="定时任务演示用,首个版本")
print(f"[提交发布] 审核项:{item['id']}")
from app.governance import review
out = review.decide(item["id"], True, "管理员自审:演示用流程卡,风险为写一条日志")
print(f"[发布] 流程卡「{SOP_TITLE}」v{out['result']['version']}")
return d["id"]
def ensure_watch(sop_id: str) -> str:
from app.watch import service as watch_service
existing = next((w for w in watch_service.list_watches() if w["title"] == WATCH_TITLE), None)
if existing:
print(f"[跳过] 定时任务「{WATCH_TITLE}」已存在:{existing['id']}")
return existing["id"]
w = watch_service.create({
"title": WATCH_TITLE,
"description": "每 15 分钟跑一次「审计日志定时巡检」流程卡,用来验证定时任务全链路可追溯。",
"schedule": {"kind": "interval", "every_minutes": 15},
"source": {"kind": "sop", "sop": sop_id},
"strategies": [{"kind": "run_sop", "sop": sop_id, "params": {}}],
"enabled": True,
})
print(f"[新建] 定时任务「{WATCH_TITLE}」:{w['id']},下次触发 {w['next_fire_at']}")
return w["id"]
if __name__ == "__main__":
from app.core.db import init_db
init_db()
aid = ensure_action()
sid = ensure_sop()
wid = ensure_watch(sid)
print("done", {"action": aid, "sop": sid, "watch": wid})
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
"preview": "vite preview", "preview": "vite preview",
"test": "vitest run", "test": "vitest run",
"build:8107": "tsc -b && vite build --outDir dist_8107 --emptyOutDir", "build:8107": "tsc -b && vite build --outDir dist_8107 --emptyOutDir",
"build:8101": "tsc -b && vite build --outDir dist_8101 --emptyOutDir" "build:8101": "tsc -b && vite build --outDir dist_8101 --emptyOutDir",
"build:8102": "tsc -b && vite build --outDir dist_8102 --emptyOutDir"
}, },
"dependencies": { "dependencies": {
"@codemirror/lang-sql": "^6.10.0", "@codemirror/lang-sql": "^6.10.0",
......
import { import {
Activity, AlarmClock, Blocks, Bot, Boxes, Brain, ChevronDown, ChevronLeft, ClipboardCheck, Database, FileText, FlaskConical, FunctionSquare, Activity, AlarmClock, Blocks, Bot, Boxes, Brain, ChevronDown, ChevronLeft, ClipboardCheck, Database, FileText, FlaskConical, FunctionSquare,
GitBranch, GitCommit, LayoutDashboard, LayoutGrid, ListChecks, Menu, MessageSquareText, Monitor, Moon, Network, Rocket, GitBranch, GitCommit, Hammer, LayoutDashboard, LayoutGrid, ListChecks, Menu, MessageSquareText, Monitor, Moon, Network, Rocket,
Settings, ShieldCheck, Sun, UserRound, Users, Wand2, Workflow, Zap, Presentation, Settings, ShieldCheck, Sun, UserRound, Users, Wand2, Workflow, Zap,
} from "lucide-react"; } from "lucide-react";
import { useCallback, useEffect, useRef, useState } from "react"; import { useCallback, useEffect, useRef, useState } from "react";
import { Badge, PageErrorBoundary, Segmented, Toaster } from "@/components/ui"; import { Badge, PageErrorBoundary, Segmented, Toaster } from "@/components/ui";
...@@ -30,6 +30,7 @@ import { DialogHost } from "@/lib/dialog"; ...@@ -30,6 +30,7 @@ import { DialogHost } from "@/lib/dialog";
import { import {
currentUserId, currentWorkspace, onUserChange, onWorkspaceChange, setCurrentUserId, setCurrentWorkspace, currentUserId, currentWorkspace, onUserChange, onWorkspaceChange, setCurrentUserId, setCurrentWorkspace,
} from "@/lib/identity"; } from "@/lib/identity";
import { useDemoMode, setUiMode } from "@/lib/mode";
import { go, parseHash } from "@/lib/nav"; import { go, parseHash } from "@/lib/nav";
import { onto, type InboxCounts, type Me, type UserRec, type WorkspaceRec } from "@/lib/onto"; import { onto, type InboxCounts, type Me, type UserRec, type WorkspaceRec } from "@/lib/onto";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
...@@ -92,6 +93,11 @@ const NAV: { group: string; items: NavItem[] }[] = [ ...@@ -92,6 +93,11 @@ const NAV: { group: string; items: NavItem[] }[] = [
] }, ] },
]; ];
const ALL = NAV.flatMap((g) => g.items); const ALL = NAV.flatMap((g) => g.items);
/**
* 演示模式额外收起的业务入口。搭建类的 15 个由 builder 总闸统一关掉(见下面的 `builder`),
* 这里只列「是业务页、但对外汇报时不想展开」的两个。收起的只是菜单,页面仍可 URL 直达。
*/
const DEMO_HIDE = new Set<PageKey>(["objects", "memory"]);
/** 旧链接兼容:合并掉的页面跳到新位置(带上页签)。 */ /** 旧链接兼容:合并掉的页面跳到新位置(带上页签)。 */
const REDIRECT: Record<string, [PageKey, Record<string, string>]> = { const REDIRECT: Record<string, [PageKey, Record<string, string>]> = {
home: ["desk", { tab: "build" }], runtime: ["monitor", {}], home: ["desk", { tab: "build" }], runtime: ["monitor", {}],
...@@ -122,6 +128,7 @@ export default function App() { ...@@ -122,6 +128,7 @@ export default function App() {
const [uid, setUid] = useState(currentUserId()); const [uid, setUid] = useState(currentUserId());
const [ws, setWs] = useState(currentWorkspace()); const [ws, setWs] = useState(currentWorkspace());
const [spaces, setSpaces] = useState<WorkspaceRec[]>([]); const [spaces, setSpaces] = useState<WorkspaceRec[]>([]);
const demo = useDemoMode();
const { theme, setTheme, sidebarCollapsed, toggleSidebar, graphFocus } = useAppStore(); const { theme, setTheme, sidebarCollapsed, toggleSidebar, graphFocus } = useAppStore();
const refresh = useCallback(() => { const refresh = useCallback(() => {
...@@ -167,8 +174,10 @@ export default function App() { ...@@ -167,8 +174,10 @@ export default function App() {
const nav = (k: PageKey) => { go(k); setMobileNavOpen(false); }; const nav = (k: PageKey) => { go(k); setMobileNavOpen(false); };
// 业务人员只看业务入口:搭建期的概念(管道、积木、提案、MCP)对他们没有意义,只会让人不知道从哪下手。 // 业务人员只看业务入口:搭建期的概念(管道、积木、提案、MCP)对他们没有意义,只会让人不知道从哪下手。
// 身份还没加载出来时按业务人员处理 —— 宁可晚一点多出几个入口,也不能先给看不该看的 // 身份还没加载出来时按业务人员处理 —— 宁可晚一点多出几个入口,也不能先给看不该看的
const builder = !!me && (me.permissions.includes("build") || !!me.roles?.includes("admin")); // 演示模式按业务人员渲染:搭建期的入口、工作台的「搭建进度」页签一并收起(纯显示,权限不变)
const allowed = (n: NavItem) => builder || (n.biz && (!n.perm || n.perm.some((p) => me?.permissions.includes(p)))) const builder = !demo && !!me && (me.permissions.includes("build") || !!me.roles?.includes("admin"));
const allowed = (n: NavItem) => (!demo || !DEMO_HIDE.has(n.key))
&& (builder || (n.biz && (!n.perm || n.perm.some((p) => me?.permissions.includes(p)))))
const navGroups = NAV.map((g) => ({ ...g, items: g.items.filter(allowed) })) const navGroups = NAV.map((g) => ({ ...g, items: g.items.filter(allowed) }))
.filter((g) => g.items.length) .filter((g) => g.items.length)
.map((g) => (!builder && g.group ? { ...g, group: g.items.length === 1 ? "" : g.group } : g)); .map((g) => (!builder && g.group ? { ...g, group: g.items.length === 1 ? "" : g.group } : g));
...@@ -284,6 +293,14 @@ export default function App() { ...@@ -284,6 +293,14 @@ export default function App() {
<Badge tone="bg-warn/10 text-warn"><ClipboardCheck className="h-3 w-3" />待审批 {counts.approvals}</Badge> <Badge tone="bg-warn/10 text-warn"><ClipboardCheck className="h-3 w-3" />待审批 {counts.approvals}</Badge>
</button> </button>
)} )}
{/* 演示模式只收菜单,不改权限、不改数据;被收起的页面仍可 URL 直达 */}
<button className="btn btn-ghost btn-sm shrink-0" onClick={() => setUiMode(demo ? "dev" : "demo")}
title={demo
? "演示模式:左侧只留工作台、提问、流程卡、审批与待办、监控与定时。点一下切回开发模式"
: "开发模式:所有入口都在。点一下切到演示模式,收起建模、数据接入、运行、设置等入口"}>
{demo ? <Presentation className={I} /> : <Hammer className={I} />}
<span className="max-sm:hidden">{demo ? "演示模式" : "开发模式"}</span>
</button>
<UserMenu me={me} users={users} uid={uid} /> <UserMenu me={me} users={users} uid={uid} />
</div> </div>
</header> </header>
......
...@@ -4,8 +4,9 @@ import { ...@@ -4,8 +4,9 @@ import {
AlarmClock, Bell, Bot, CheckCircle2, ClipboardList, ExternalLink, GitPullRequest, Radar, RefreshCw, Rocket, ShieldCheck, Undo2, User, Workflow, AlarmClock, Bell, Bot, CheckCircle2, ClipboardList, ExternalLink, GitPullRequest, Radar, RefreshCw, Rocket, ShieldCheck, Undo2, User, Workflow,
XCircle, XCircle,
} from "lucide-react"; } from "lucide-react";
import { useCallback, useEffect, useState } from "react"; import { useCallback, useEffect, useState, type ReactNode } from "react";
import { Badge, Card, CardHeader, Empty, Field, Modal, Segmented, Spinner } from "@/components/ui"; import { Badge, Card, CardHeader, Empty, Field, Modal, Segmented, Spinner } from "@/components/ui";
import { useDemoMode } from "@/lib/mode";
import { go, useHashParams } from "@/lib/nav"; import { go, useHashParams } from "@/lib/nav";
import { import {
errText, fmtTime, onto, PRIORITY_TONE, STATUS_LABEL, STATUS_TONE, type ActionRun, type InboxCounts, type NotificationRec, errText, fmtTime, onto, PRIORITY_TONE, STATUS_LABEL, STATUS_TONE, type ActionRun, type InboxCounts, type NotificationRec,
...@@ -18,8 +19,12 @@ import { EffectList } from "../ask/ActionCard"; ...@@ -18,8 +19,12 @@ import { EffectList } from "../ask/ActionCard";
type Tab = "approvals" | "releases" | "tasks" | "reviews" | "runs" | "notifications"; type Tab = "approvals" | "releases" | "tasks" | "reviews" | "runs" | "notifications";
/** 演示模式下收起的页签:本体变更提案与 AI 草案审核属于搭建期内容,不在对外汇报的主线里。 */
const DEMO_HIDE_TABS: Tab[] = ["releases", "reviews"];
export function InboxPage({ onChanged }: { onChanged?: () => void }) { export function InboxPage({ onChanged }: { onChanged?: () => void }) {
const params = useHashParams(); const params = useHashParams();
const demo = useDemoMode();
const [tab, setTab] = useState<Tab>((params.get("tab") as Tab) || (params.get("task") ? "tasks" : "approvals")); const [tab, setTab] = useState<Tab>((params.get("tab") as Tab) || (params.get("task") ? "tasks" : "approvals"));
const [counts, setCounts] = useState<InboxCounts | null>(null); const [counts, setCounts] = useState<InboxCounts | null>(null);
const refreshCounts = useCallback(() => { const refreshCounts = useCallback(() => {
...@@ -30,6 +35,16 @@ export function InboxPage({ onChanged }: { onChanged?: () => void }) { ...@@ -30,6 +35,16 @@ export function InboxPage({ onChanged }: { onChanged?: () => void }) {
useEffect(() => { const t = params.get("tab") as Tab; if (t) setTab(t); }, [params]); useEffect(() => { const t = params.get("tab") as Tab; if (t) setTab(t); }, [params]);
const badge = (n?: number) => (n ? <Badge tone="bg-bad/10 text-bad">{n}</Badge> : undefined); const badge = (n?: number) => (n ? <Badge tone="bg-bad/10 text-bad">{n}</Badge> : undefined);
// 演示模式下若从旧链接带着被收起的页签进来,回落到待审批动作
const cur: Tab = demo && DEMO_HIDE_TABS.includes(tab) ? "approvals" : tab;
const tabs: { key: Tab; label: string; badge?: ReactNode }[] = [
{ key: "approvals", label: "待审批动作", badge: badge(counts?.approvals) },
{ key: "releases", label: "变更提案", badge: badge(counts?.releases) },
{ key: "tasks", label: "我的待办", badge: badge(counts?.tasks) },
{ key: "reviews", label: "审核队列", badge: badge(counts?.reviews) },
{ key: "runs", label: "审批历史" },
{ key: "notifications", label: "通知", badge: badge(counts?.notifications) },
];
return ( return (
<div className="space-y-4"> <div className="space-y-4">
<div className="flex flex-wrap items-center gap-3"> <div className="flex flex-wrap items-center gap-3">
...@@ -38,20 +53,14 @@ export function InboxPage({ onChanged }: { onChanged?: () => void }) { ...@@ -38,20 +53,14 @@ export function InboxPage({ onChanged }: { onChanged?: () => void }) {
<p className="text-label text-muted">任何写操作都不会被偷偷执行:AI、流程卡、外部 Agent 提议的动作先成审批单,附上依据和影响面,人批了才执行,拒绝就关闭,全程留痕。</p> <p className="text-label text-muted">任何写操作都不会被偷偷执行:AI、流程卡、外部 Agent 提议的动作先成审批单,附上依据和影响面,人批了才执行,拒绝就关闭,全程留痕。</p>
</div> </div>
</div> </div>
<Segmented value={tab} onChange={setTab} options={[ <Segmented value={cur} onChange={setTab}
{ key: "approvals", label: "待审批动作", badge: badge(counts?.approvals) }, options={tabs.filter((o) => !demo || !DEMO_HIDE_TABS.includes(o.key))} />
{ key: "releases", label: "变更提案", badge: badge(counts?.releases) }, {cur === "approvals" && <Approvals focus={params.get("run") || ""} onChanged={refreshCounts} />}
{ key: "tasks", label: "我的待办", badge: badge(counts?.tasks) }, {cur === "releases" && <Releases />}
{ key: "reviews", label: "审核队列", badge: badge(counts?.reviews) }, {cur === "tasks" && <Tasks focus={params.get("task") || ""} onChanged={refreshCounts} />}
{ key: "runs", label: "审批历史" }, {cur === "reviews" && <Reviews onChanged={refreshCounts} />}
{ key: "notifications", label: "通知", badge: badge(counts?.notifications) }, {cur === "runs" && <Runs focus={params.get("run") || ""} onChanged={refreshCounts} />}
]} /> {cur === "notifications" && <Notifications onChanged={refreshCounts} />}
{tab === "approvals" && <Approvals focus={params.get("run") || ""} onChanged={refreshCounts} />}
{tab === "releases" && <Releases />}
{tab === "tasks" && <Tasks focus={params.get("task") || ""} onChanged={refreshCounts} />}
{tab === "reviews" && <Reviews onChanged={refreshCounts} />}
{tab === "runs" && <Runs focus={params.get("run") || ""} onChanged={refreshCounts} />}
{tab === "notifications" && <Notifications onChanged={refreshCounts} />}
</div> </div>
); );
} }
...@@ -97,9 +106,16 @@ export function RunDetail({ run, onDone }: { run: ActionRun; onDone: () => void ...@@ -97,9 +106,16 @@ export function RunDetail({ run, onDone }: { run: ActionRun; onDone: () => void
{run.evidence?.length > 0 && ( {run.evidence?.length > 0 && (
<div> <div>
<p className="mb-1 text-label font-medium text-muted">依据</p> <p className="mb-1 text-label font-medium text-muted">依据</p>
<ul className="space-y-0.5">{run.evidence.map((e, i) => ( <ul className="space-y-1.5">{run.evidence.map((e, i) => (
<li key={i} className="flex gap-1.5"><Badge>{{ data: "数据", rule: "规则", doc: "原文", note: "说明" }[e.kind] || e.kind}</Badge> <li key={i} className="rounded-md bg-ink/[0.03] p-2">
<span className="min-w-0 flex-1">{e.text}</span>{e.ref && <code className="text-caption text-muted">{e.ref}</code>}</li> <div className="flex flex-wrap items-start gap-1.5">
<Badge>{{ data: "数据", rule: "规则", doc: "原文", note: "说明", ask: "AI 建议" }[e.kind] || e.kind}</Badge>
<span className="min-w-0 flex-1 whitespace-pre-wrap break-words">{e.text}</span>
</div>
{e.ref && (
<pre className="mt-1 max-h-32 overflow-auto whitespace-pre-wrap break-all rounded bg-ink/5 px-1.5 py-1 font-mono text-caption text-muted">{e.ref}</pre>
)}
</li>
))}</ul> ))}</ul>
</div> </div>
)} )}
...@@ -130,13 +146,28 @@ export function RunDetail({ run, onDone }: { run: ActionRun; onDone: () => void ...@@ -130,13 +146,28 @@ export function RunDetail({ run, onDone }: { run: ActionRun; onDone: () => void
</div> </div>
{run.result?.effects && ( {run.result?.effects && (
<div> <div>
<p className="mb-1 text-label font-medium text-muted">执行结果</p> <p className="mb-1 text-label font-medium text-muted">执行结果(数据库实际发生了什么)</p>
<ul className="space-y-1.5">
{run.result.effects.map((e: any, i: number) => ( {run.result.effects.map((e: any, i: number) => (
<p key={i} className="flex items-center gap-1.5"> <li key={i} className="rounded-md bg-ink/[0.03] p-2">
{e.ok ? <CheckCircle2 className="h-3.5 w-3.5 text-ok" /> : <XCircle className="h-3.5 w-3.5 text-bad" />} <div className="flex items-start gap-1.5">
<code>{e.tool}</code> {e.ok ? JSON.stringify(e.result) : e.error} {e.ok ? <CheckCircle2 className="mt-0.5 h-3.5 w-3.5 shrink-0 text-ok" /> : <XCircle className="mt-0.5 h-3.5 w-3.5 shrink-0 text-bad" />}
<div className="min-w-0 flex-1">
<code className="text-caption text-muted">{e.tool}</code>
<p className="whitespace-pre-wrap break-words">
{e.ok ? (e.result?.summary || "已执行") : e.error}
</p> </p>
</div>
</div>
{e.ok && e.result && Object.keys(e.result).length > 0 && (
<details className="mt-1">
<summary className="cursor-pointer text-caption text-muted">详细结果(含新记录 id)</summary>
<pre className="mt-1 max-h-40 overflow-auto whitespace-pre-wrap break-all rounded bg-ink/5 p-1.5 font-mono text-caption">{JSON.stringify(e.result, null, 2)}</pre>
</details>
)}
</li>
))} ))}
</ul>
</div> </div>
)} )}
{run.approvals.filter((a) => a.status !== "pending").map((a) => ( {run.approvals.filter((a) => a.status !== "pending").map((a) => (
......
...@@ -3,6 +3,7 @@ import { ...@@ -3,6 +3,7 @@ import {
} from "lucide-react"; } from "lucide-react";
import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { Badge, Card, CardHeader, Empty, Field, Modal, Segmented, Spinner } from "@/components/ui"; import { Badge, Card, CardHeader, Empty, Field, Modal, Segmented, Spinner } from "@/components/ui";
import { useDemoMode } from "@/lib/mode";
import { go, useHashParams } from "@/lib/nav"; import { go, useHashParams } from "@/lib/nav";
import { import {
errText, fmtTime, onto, PRIORITY_TONE, STATUS_LABEL, STATUS_TONE, type ConceptBrief, type DraftRef, type Me, type Recipe, type SopBrief, type SopDef, type SopIssue, type SopRun, errText, fmtTime, onto, PRIORITY_TONE, STATUS_LABEL, STATUS_TONE, type ConceptBrief, type DraftRef, type Me, type Recipe, type SopBrief, type SopDef, type SopIssue, type SopRun,
...@@ -207,6 +208,7 @@ function SopEditor({ id, cat, canEdit, me, onChanged, initialRun }: { ...@@ -207,6 +208,7 @@ function SopEditor({ id, cat, canEdit, me, onChanged, initialRun }: {
const [busy, setBusy] = useState(false); const [busy, setBusy] = useState(false);
const [runModal, setRunModal] = useState<"" | "dry" | "live">(""); const [runModal, setRunModal] = useState<"" | "dry" | "live">("");
const [runPreset, setRunPreset] = useState<Record<string, any>>({}); const [runPreset, setRunPreset] = useState<Record<string, any>>({});
const demo = useDemoMode();
// 带着参数进来(提问里的「运行这个流程」):已发布就开正式运行框,没发布就开试运行框,参数预先填好 // 带着参数进来(提问里的「运行这个流程」):已发布就开正式运行框,没发布就开试运行框,参数预先填好
useEffect(() => { useEffect(() => {
if (!initialRun || !d) return; if (!initialRun || !d) return;
...@@ -343,7 +345,8 @@ function SopEditor({ id, cat, canEdit, me, onChanged, initialRun }: { ...@@ -343,7 +345,8 @@ function SopEditor({ id, cat, canEdit, me, onChanged, initialRun }: {
<span>引用了 {val.draft_refs!.length} 个还没发布的积木: <span>引用了 {val.draft_refs!.length} 个还没发布的积木:
{val.draft_refs!.slice(0, 5).map((r) => <b key={`${r.kind}:${r.name}`} className="mx-0.5">「{r.name}」</b>)} {val.draft_refs!.slice(0, 5).map((r) => <b key={`${r.kind}:${r.name}`} className="mx-0.5">「{r.name}」</b>)}
—— 试运行可以用,正式运行和提交发布前要先发布本体。</span> —— 试运行可以用,正式运行和提交发布前要先发布本体。</span>
<button className="btn btn-sm ml-auto" onClick={() => go("publish")}><Rocket className="h-3.5 w-3.5" />去发布本体</button> {/* 演示模式收起:发布页的入口本身已经收起来了 */}
{!demo && <button className="btn btn-sm ml-auto" onClick={() => go("publish")}><Rocket className="h-3.5 w-3.5" />去发布本体</button>}
</div> </div>
)} )}
{(val.errors.length > 0 || val.warnings.length > 0) && ( {(val.errors.length > 0 || val.warnings.length > 0) && (
......
import { ArrowRight, CheckCircle2, ClipboardList, Lightbulb, MessageSquareText, Pin, Play, Send, ShieldCheck, Sparkles, TrendingDown, TrendingUp } from "lucide-react"; import { ArrowRight, CheckCircle2, ClipboardList, Lightbulb, MessageSquareText, Pin, Play, Send, ShieldCheck, Sparkles, TrendingDown, TrendingUp } from "lucide-react";
import { useCallback, useEffect, useState } from "react"; import { useCallback, useEffect, useState } from "react";
import { Badge, Card, CardHeader, Empty, Spinner } from "@/components/ui"; import { Badge, Card, CardHeader, Empty, Spinner } from "@/components/ui";
import { useDemoMode } from "@/lib/mode";
import { go } from "@/lib/nav"; import { go } from "@/lib/nav";
import { errText, fmtTime, onto, PRIORITY_TONE, type MemPattern, type Workbench } from "@/lib/onto"; import { errText, fmtTime, onto, PRIORITY_TONE, type MemPattern, type Workbench } from "@/lib/onto";
import { toast } from "@/store/useAppStore"; import { toast } from "@/store/useAppStore";
...@@ -28,6 +29,7 @@ export function WorkbenchPage() { ...@@ -28,6 +29,7 @@ export function WorkbenchPage() {
const [w, setW] = useState<Workbench | null>(null); const [w, setW] = useState<Workbench | null>(null);
const [q, setQ] = useState(""); const [q, setQ] = useState("");
const [running, setRunning] = useState(""); const [running, setRunning] = useState("");
const demo = useDemoMode();
const load = useCallback(() => { void onto.workbench().then(setW).catch((e) => toast("error", "加载失败", errText(e))); }, []); const load = useCallback(() => { void onto.workbench().then(setW).catch((e) => toast("error", "加载失败", errText(e))); }, []);
useEffect(load, [load]); useEffect(load, [load]);
if (!w) return <div className="p-8"><Spinner /></div>; if (!w) return <div className="p-8"><Spinner /></div>;
...@@ -66,7 +68,9 @@ export function WorkbenchPage() { ...@@ -66,7 +68,9 @@ export function WorkbenchPage() {
} catch (e) { toast("error", "操作失败", errText(e)); } } catch (e) { toast("error", "操作失败", errText(e)); }
}; };
const today = new Date().toLocaleDateString("zh-CN", { month: "long", day: "numeric", weekday: "long" }); const today = new Date().toLocaleDateString("zh-CN", { month: "long", day: "numeric", weekday: "long" });
const todoCount = w.todo.approvals_total + w.todo.releases.length + w.todo.tasks.length; // 演示模式不展示本体变更提案(搭建期内容),件数也跟着不算
const releases = demo ? [] : w.todo.releases;
const todoCount = w.todo.approvals_total + releases.length + w.todo.tasks.length;
return ( return (
<div className="mx-auto max-w-6xl space-y-4"> <div className="mx-auto max-w-6xl space-y-4">
...@@ -145,7 +149,7 @@ export function WorkbenchPage() { ...@@ -145,7 +149,7 @@ export function WorkbenchPage() {
<span className="shrink-0 text-caption text-muted">{fmtTime(r.created_at)}</span> <span className="shrink-0 text-caption text-muted">{fmtTime(r.created_at)}</span>
</button> </button>
))} ))}
{w.todo.releases.map((r) => ( {releases.map((r) => (
<button key={r.id} className="flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-ink/[0.03]" onClick={() => go("inbox", { tab: "releases" })}> <button key={r.id} className="flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-ink/[0.03]" onClick={() => go("inbox", { tab: "releases" })}>
<Badge>变更</Badge><span className="min-w-0 flex-1 truncate text-body">{r.title}</span> <Badge>变更</Badge><span className="min-w-0 flex-1 truncate text-body">{r.title}</span>
</button> </button>
...@@ -203,7 +207,8 @@ export function WorkbenchPage() { ...@@ -203,7 +207,8 @@ export function WorkbenchPage() {
</div> </div>
</Card> </Card>
<Card> <Card>
<CardHeader title="最近动态" right={<button className="btn btn-ghost btn-sm" onClick={() => go("monitor", { tab: "audit" })}>全部<ArrowRight className="h-3.5 w-3.5" /></button>} /> {/* 演示模式收起「全部」:它跳运行监控,那个入口本身已经收起来了 */}
<CardHeader title="最近动态" right={!demo && <button className="btn btn-ghost btn-sm" onClick={() => go("monitor", { tab: "audit" })}>全部<ArrowRight className="h-3.5 w-3.5" /></button>} />
<div className="divide-y divide-line"> <div className="divide-y divide-line">
{w.feed.map((f, i) => ( {w.feed.map((f, i) => (
<p key={i} className="flex gap-2 px-4 py-2 text-label"> <p key={i} className="flex gap-2 px-4 py-2 text-label">
......
/**
* 界面模式。演示模式只收起左侧「搭建类」入口和几处指向它们的按钮,
* 让对外汇报时只剩「工作台 / 提问 / 流程卡 / 审批与待办 / 监控与定时」这条主线。
*
* 只影响显示:权限、路由、数据一概不动 —— 被收起的页面照样能用 URL 直达(`#/modeling` 等),
* 自己开发时切回开发模式即可。默认开发模式,不设就是完整的。
*/
import { useEffect, useState } from "react";
export type UiMode = "demo" | "dev";
const KEY = "onto.ui.mode";
const listeners = new Set<(m: UiMode) => void>();
export function currentUiMode(): UiMode {
try {
return localStorage.getItem(KEY) === "demo" ? "demo" : "dev";
} catch {
return "dev";
}
}
export function setUiMode(m: UiMode) {
try { localStorage.setItem(KEY, m); } catch { /* 隐私模式 */ }
listeners.forEach((fn) => fn(m));
}
export function onUiModeChange(fn: (m: UiMode) => void): () => void {
listeners.add(fn);
return () => listeners.delete(fn);
}
/** 当前是否演示模式,随右上角的切换实时更新。 */
export function useDemoMode(): boolean {
const [m, setM] = useState(currentUiMode);
useEffect(() => onUiModeChange(setM), []);
return m === "demo";
}
{"root":["./src/app.tsx","./src/main.tsx","./src/__tests__/asktrace.test.ts","./src/__tests__/specops.test.ts","./src/components/ui.tsx","./src/features/ask/actioncard.tsx","./src/features/ask/agenttrace.tsx","./src/features/ask/askanswer.tsx","./src/features/ask/askpage.tsx","./src/features/ask/trace.ts","./src/features/audit/auditpage.tsx","./src/features/capability/capabilitypage.tsx","./src/features/data/pipelinepage.tsx","./src/features/documents/documentspage.tsx","./src/features/documents/usejobstream.ts","./src/features/eval/evalpage.tsx","./src/features/graph/duplicatespanel.tsx","./src/features/graph/filterpanel.tsx","./src/features/graph/grapheditor.tsx","./src/features/graph/graphpage.tsx","./src/features/graph/nodesearch.tsx","./src/features/graph/propertypanel.tsx","./src/features/graph/sigmagraph.tsx","./src/features/home/homepage.tsx","./src/features/inbox/inboxpage.tsx","./src/features/kernel/bindingeditor.tsx","./src/features/mcp/mcppage.tsx","./src/features/members/memberspage.tsx","./src/features/memory/memorypage.tsx","./src/features/monitor/monitorpage.tsx","./src/features/objects/objectspage.tsx","./src/features/ontology/blockeditor.tsx","./src/features/ontology/blocklistpage.tsx","./src/features/ontology/canvaspage.tsx","./src/features/ontology/draftmodal.tsx","./src/features/ontology/modelingpage.tsx","./src/features/ontology/refselect.tsx","./src/features/ontology/releasepages.tsx","./src/features/ontology/common.tsx","./src/features/ontology/routes.ts","./src/features/ontology/tools.tsx","./src/features/runtime/overviewpage.tsx","./src/features/settings/settingspage.tsx","./src/features/sop/sopcanvas.tsx","./src/features/sop/soppage.tsx","./src/features/sop/stepinspector.tsx","./src/features/sop/specops.ts","./src/features/sql/askpanel.tsx","./src/features/sql/datasourcepanel.tsx","./src/features/sql/librarypanel.tsx","./src/features/sql/mappingpanel.tsx","./src/features/sql/modelingpanel.tsx","./src/features/sql/rulespanel.tsx","./src/features/sql/sqlpage.tsx","./src/features/sql/sqltrace.tsx","./src/features/watch/watchpage.tsx","./src/features/workbench/deskpage.tsx","./src/features/workbench/workbenchpage.tsx","./src/lib/api.ts","./src/lib/colors.ts","./src/lib/dialog.tsx","./src/lib/identity.ts","./src/lib/nav.ts","./src/lib/onto.ts","./src/lib/sse.ts","./src/lib/types.ts","./src/lib/usejobpoll.ts","./src/lib/utils.ts","./src/store/useappstore.ts","./src/store/usesqlstore.ts"],"version":"5.9.3"}
\ No newline at end of file \ No newline at end of file
{"root":["./src/app.tsx","./src/main.tsx","./src/__tests__/asktrace.test.ts","./src/__tests__/specops.test.ts","./src/components/ui.tsx","./src/features/ask/actioncard.tsx","./src/features/ask/agenttrace.tsx","./src/features/ask/askanswer.tsx","./src/features/ask/askpage.tsx","./src/features/ask/trace.ts","./src/features/audit/auditpage.tsx","./src/features/capability/capabilitypage.tsx","./src/features/data/pipelinepage.tsx","./src/features/documents/documentspage.tsx","./src/features/documents/usejobstream.ts","./src/features/eval/evalpage.tsx","./src/features/graph/duplicatespanel.tsx","./src/features/graph/filterpanel.tsx","./src/features/graph/grapheditor.tsx","./src/features/graph/graphpage.tsx","./src/features/graph/nodesearch.tsx","./src/features/graph/propertypanel.tsx","./src/features/graph/sigmagraph.tsx","./src/features/home/homepage.tsx","./src/features/inbox/inboxpage.tsx","./src/features/kernel/bindingeditor.tsx","./src/features/mcp/mcppage.tsx","./src/features/members/memberspage.tsx","./src/features/memory/memorypage.tsx","./src/features/monitor/monitorpage.tsx","./src/features/objects/objectspage.tsx","./src/features/ontology/blockeditor.tsx","./src/features/ontology/blocklistpage.tsx","./src/features/ontology/canvaspage.tsx","./src/features/ontology/draftmodal.tsx","./src/features/ontology/modelingpage.tsx","./src/features/ontology/refselect.tsx","./src/features/ontology/releasepages.tsx","./src/features/ontology/common.tsx","./src/features/ontology/routes.ts","./src/features/ontology/tools.tsx","./src/features/runtime/overviewpage.tsx","./src/features/settings/settingspage.tsx","./src/features/sop/sopcanvas.tsx","./src/features/sop/soppage.tsx","./src/features/sop/stepinspector.tsx","./src/features/sop/specops.ts","./src/features/sql/askpanel.tsx","./src/features/sql/datasourcepanel.tsx","./src/features/sql/librarypanel.tsx","./src/features/sql/mappingpanel.tsx","./src/features/sql/modelingpanel.tsx","./src/features/sql/rulespanel.tsx","./src/features/sql/sqlpage.tsx","./src/features/sql/sqltrace.tsx","./src/features/watch/watchpage.tsx","./src/features/workbench/deskpage.tsx","./src/features/workbench/workbenchpage.tsx","./src/lib/api.ts","./src/lib/colors.ts","./src/lib/dialog.tsx","./src/lib/identity.ts","./src/lib/mode.ts","./src/lib/nav.ts","./src/lib/onto.ts","./src/lib/sse.ts","./src/lib/types.ts","./src/lib/usejobpoll.ts","./src/lib/utils.ts","./src/store/useappstore.ts","./src/store/usesqlstore.ts"],"version":"5.9.3"}
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!