style: fix code formatting and defer templates migration

This commit is contained in:
YoVinchen
2026-01-14 11:42:47 +08:00
parent 929ac54cc9
commit 2eb1670e93
3 changed files with 18 additions and 12 deletions
+9 -2
View File
@@ -430,6 +430,12 @@ impl Database {
Self::migrate_v2_to_v3(conn)?;
Self::set_user_version(conn, 3)?;
}
// v3 -> v4: Claude Code Templates 市场功能(暂未启用)
// 3 => {
// log::info!("迁移数据库从 v3 到 v4Claude Code Templates 市场功能)");
// Self::migrate_v3_to_v4(conn)?;
// Self::set_user_version(conn, 4)?;
// }
_ => {
return Err(AppError::Database(format!(
"未知的数据库版本 {version},无法迁移到 {SCHEMA_VERSION}"
@@ -870,8 +876,9 @@ impl Database {
Ok(())
}
/// v2 -> v3 迁移:添加 Claude Code Templates 功能相关表
fn migrate_v2_to_v3(conn: &Connection) -> Result<(), AppError> {
/// v3 -> v4 迁移:添加 Claude Code Templates 功能相关表
#[allow(dead_code)]
fn migrate_v3_to_v4(conn: &Connection) -> Result<(), AppError> {
// 1. template_repos 表 - 存储模板仓库信息
conn.execute(
"CREATE TABLE IF NOT EXISTS template_repos (
+9 -9
View File
@@ -13,7 +13,7 @@ import {
Wrench,
Server,
RefreshCw,
Package,
Package,
Search,
Download,
} from "lucide-react";
@@ -476,13 +476,13 @@ function App() {
</div>
);
case "templates":
return <TemplatesPage activeApp={activeApp} />;
default:
return (
<div className="mx-auto max-w-[56rem] px-5 flex flex-col h-[calc(100vh-8rem)] overflow-hidden">
{/* 独立滚动容器 - 解决 Linux/Ubuntu 下 DndContext 与滚轮事件冲突 */}
<div className="flex-1 overflow-y-auto overflow-x-hidden pb-12 px-1">
<AnimatePresence mode="wait">
return <TemplatesPage activeApp={activeApp} />;
default:
return (
<div className="mx-auto max-w-[56rem] px-5 flex flex-col h-[calc(100vh-8rem)] overflow-hidden">
{/* 独立滚动容器 - 解决 Linux/Ubuntu 下 DndContext 与滚轮事件冲突 */}
<div className="flex-1 overflow-y-auto overflow-x-hidden pb-12 px-1">
<AnimatePresence mode="wait">
<motion.div
key={activeApp}
initial={{ opacity: 0 }}
@@ -617,7 +617,7 @@ function App() {
{currentView === "skillsDiscovery" && t("skills.title")}
{currentView === "mcp" && t("mcp.unifiedPanel.title")}
{currentView === "agents" && t("agents.title")}
{currentView === "templates" && t("templates.title")}
{currentView === "templates" && t("templates.title")}
{currentView === "universal" &&
t("universalProvider.title", {
defaultValue: "统一供应商",
-1
View File
@@ -1121,7 +1121,6 @@
"partialFail": "{{count}} 個のコンポーネントのインストールに失敗しました",
"installFailed": "バンドルのインストールに失敗しました"
}
},
"health": {
"operational": "正常",