chore: update dependencies and configuration

This commit is contained in:
zhenyi 2026-05-31 13:11:13 +08:00
parent 779e4eae2f
commit 6a0fcf5343
8 changed files with 41 additions and 2 deletions

2
Cargo.lock generated
View File

@ -478,6 +478,7 @@ dependencies = [
"git", "git",
"model", "model",
"redis", "redis",
"reqwest 0.13.3",
"serde", "serde",
"serde_json", "serde_json",
"service", "service",
@ -485,6 +486,7 @@ dependencies = [
"socketio", "socketio",
"storage", "storage",
"tokio-stream", "tokio-stream",
"urlencoding",
"utoipa", "utoipa",
"uuid", "uuid",
] ]

View File

@ -37,6 +37,7 @@
"@streamdown/code": "^1.1.1", "@streamdown/code": "^1.1.1",
"@streamdown/math": "^1.0.2", "@streamdown/math": "^1.0.2",
"@streamdown/mermaid": "^1.0.2", "@streamdown/mermaid": "^1.0.2",
"@tailwindcss/typography": "^0.5.19",
"@tanstack/react-query": "^5.100.14", "@tanstack/react-query": "^5.100.14",
"@tanstack/react-table": "^8.21.3", "@tanstack/react-table": "^8.21.3",
"ai": "^6.0.193", "ai": "^6.0.193",
@ -60,6 +61,7 @@
"react-day-picker": "^10.0.1", "react-day-picker": "^10.0.1",
"react-diff-view": "^3.3.3", "react-diff-view": "^3.3.3",
"react-dom": "^19.2.6", "react-dom": "^19.2.6",
"react-hook-form": "^7.76.1",
"react-jsx-parser": "^2.4.1", "react-jsx-parser": "^2.4.1",
"react-markdown": "^10.1.0", "react-markdown": "^10.1.0",
"react-resizable-panels": "^4.11.2", "react-resizable-panels": "^4.11.2",
@ -738,6 +740,8 @@
"@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.3.0", "https://registry.npmmirror.com/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.0.tgz", { "os": "win32", "cpu": "x64" }, "sha512-Mvrf2kXW/yeW/OTezZlCGOirXRcUuLIBx/5Y12BaPM7wJoryG6dfS/NJL8aBPqtTEx/Vm4T4vKzFUcKDT+TKUA=="], "@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.3.0", "https://registry.npmmirror.com/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.0.tgz", { "os": "win32", "cpu": "x64" }, "sha512-Mvrf2kXW/yeW/OTezZlCGOirXRcUuLIBx/5Y12BaPM7wJoryG6dfS/NJL8aBPqtTEx/Vm4T4vKzFUcKDT+TKUA=="],
"@tailwindcss/typography": ["@tailwindcss/typography@0.5.19", "https://registry.npmmirror.com/@tailwindcss/typography/-/typography-0.5.19.tgz", { "dependencies": { "postcss-selector-parser": "6.0.10" }, "peerDependencies": { "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1" } }, "sha512-w31dd8HOx3k9vPtcQh5QHP9GwKcgbMp87j58qi6xgiBnFFtKEAgCWnDw4qUT8aHwkCp8bKvb/KGKWWHedP0AAg=="],
"@tailwindcss/vite": ["@tailwindcss/vite@4.3.0", "https://registry.npmmirror.com/@tailwindcss/vite/-/vite-4.3.0.tgz", { "dependencies": { "@tailwindcss/node": "4.3.0", "@tailwindcss/oxide": "4.3.0", "tailwindcss": "4.3.0" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7 || ^8" } }, "sha512-t6J3OrB5Fc0ExuhohouH0fWUGMYL6PTLhW+E7zIk/pdbnJARZDCwjBznFnkh5ynRnIRSI4YjtTH0t6USjJISrw=="], "@tailwindcss/vite": ["@tailwindcss/vite@4.3.0", "https://registry.npmmirror.com/@tailwindcss/vite/-/vite-4.3.0.tgz", { "dependencies": { "@tailwindcss/node": "4.3.0", "@tailwindcss/oxide": "4.3.0", "tailwindcss": "4.3.0" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7 || ^8" } }, "sha512-t6J3OrB5Fc0ExuhohouH0fWUGMYL6PTLhW+E7zIk/pdbnJARZDCwjBznFnkh5ynRnIRSI4YjtTH0t6USjJISrw=="],
"@tanstack/query-core": ["@tanstack/query-core@5.100.14", "https://registry.npmmirror.com/@tanstack/query-core/-/query-core-5.100.14.tgz", {}, "sha512-5X41dGpxgeaHISCRW2oYwcSycZeULZzAunaudXT9ov1KOTj9xwt0CH6hbwqP1/z74ZWF7rYFnDpyYH07XFcZew=="], "@tanstack/query-core": ["@tanstack/query-core@5.100.14", "https://registry.npmmirror.com/@tanstack/query-core/-/query-core-5.100.14.tgz", {}, "sha512-5X41dGpxgeaHISCRW2oYwcSycZeULZzAunaudXT9ov1KOTj9xwt0CH6hbwqP1/z74ZWF7rYFnDpyYH07XFcZew=="],
@ -1900,7 +1904,7 @@
"postcss": ["postcss@8.5.15", "https://registry.npmmirror.com/postcss/-/postcss-8.5.15.tgz", { "dependencies": { "nanoid": "^3.3.12", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A=="], "postcss": ["postcss@8.5.15", "https://registry.npmmirror.com/postcss/-/postcss-8.5.15.tgz", { "dependencies": { "nanoid": "^3.3.12", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A=="],
"postcss-selector-parser": ["postcss-selector-parser@7.1.1", "https://registry.npmmirror.com/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg=="], "postcss-selector-parser": ["postcss-selector-parser@6.0.10", "https://registry.npmmirror.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w=="],
"powershell-utils": ["powershell-utils@0.1.0", "https://registry.npmmirror.com/powershell-utils/-/powershell-utils-0.1.0.tgz", {}, "sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A=="], "powershell-utils": ["powershell-utils@0.1.0", "https://registry.npmmirror.com/powershell-utils/-/powershell-utils-0.1.0.tgz", {}, "sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A=="],
@ -1982,6 +1986,8 @@
"react-fast-compare": ["react-fast-compare@3.2.2", "https://registry.npmmirror.com/react-fast-compare/-/react-fast-compare-3.2.2.tgz", {}, "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ=="], "react-fast-compare": ["react-fast-compare@3.2.2", "https://registry.npmmirror.com/react-fast-compare/-/react-fast-compare-3.2.2.tgz", {}, "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ=="],
"react-hook-form": ["react-hook-form@7.76.1", "https://registry.npmmirror.com/react-hook-form/-/react-hook-form-7.76.1.tgz", { "peerDependencies": { "react": "^16.8.0 || ^17 || ^18 || ^19" } }, "sha512-rYM7tPiWlu3nZchkR/ex7piyzui2vFPyaLnXnI/RnblB/L4qfMmyses8llJVtF1NpE9WBBsJlGtcSZzPCXW1qQ=="],
"react-hotkeys-hook": ["react-hotkeys-hook@5.3.2", "https://registry.npmmirror.com/react-hotkeys-hook/-/react-hotkeys-hook-5.3.2.tgz", { "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-DDDy9xK6mbTQ6aPlQvIl0dA/a90T/AWml4Rm21JXFDLlRHalIg4/Rv3equUQYs5xPTWq+oEl6RD7mi/nBpU3Uw=="], "react-hotkeys-hook": ["react-hotkeys-hook@5.3.2", "https://registry.npmmirror.com/react-hotkeys-hook/-/react-hotkeys-hook-5.3.2.tgz", { "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-DDDy9xK6mbTQ6aPlQvIl0dA/a90T/AWml4Rm21JXFDLlRHalIg4/Rv3equUQYs5xPTWq+oEl6RD7mi/nBpU3Uw=="],
"react-is": ["react-is@16.13.1", "https://registry.npmmirror.com/react-is/-/react-is-16.13.1.tgz", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="], "react-is": ["react-is@16.13.1", "https://registry.npmmirror.com/react-is/-/react-is-16.13.1.tgz", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="],
@ -2592,6 +2598,8 @@
"shadcn/https-proxy-agent": ["https-proxy-agent@7.0.6", "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="], "shadcn/https-proxy-agent": ["https-proxy-agent@7.0.6", "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
"shadcn/postcss-selector-parser": ["postcss-selector-parser@7.1.1", "https://registry.npmmirror.com/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg=="],
"shadcn/zod": ["zod@3.25.76", "https://registry.npmmirror.com/zod/-/zod-3.25.76.tgz", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="], "shadcn/zod": ["zod@3.25.76", "https://registry.npmmirror.com/zod/-/zod-3.25.76.tgz", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="],
"shiki-stream/@shikijs/core": ["@shikijs/core@3.23.0", "https://registry.npmmirror.com/@shikijs/core/-/core-3.23.0.tgz", { "dependencies": { "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.5" } }, "sha512-NSWQz0riNb67xthdm5br6lAkvpDJRTgB36fxlo37ZzM2yq0PQFFzbd8psqC2XMPgCzo1fW6cVi18+ArJ44wqgA=="], "shiki-stream/@shikijs/core": ["@shikijs/core@3.23.0", "https://registry.npmmirror.com/@shikijs/core/-/core-3.23.0.tgz", { "dependencies": { "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.5" } }, "sha512-NSWQz0riNb67xthdm5br6lAkvpDJRTgB36fxlo37ZzM2yq0PQFFzbd8psqC2XMPgCzo1fW6cVi18+ArJ44wqgA=="],

View File

@ -22,6 +22,7 @@
"hooks": "@/hooks" "hooks": "@/hooks"
}, },
"registries": { "registries": {
"@manifest": "https://ui.manifest.build/r/{name}.json" "@manifest": "https://ui.manifest.build/r/{name}.json",
"@kokonutui": "https://kokonutui.com/r/{name}.json"
} }
} }

View File

@ -4,6 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#ffffff" />
<title>GitDataAI</title> <title>GitDataAI</title>
<style type="text/css"> <style type="text/css">
html, body { html, body {

View File

@ -39,6 +39,8 @@ base64 = { workspace = true }
comrak = { workspace = true } comrak = { workspace = true }
redis = { workspace = true, features = ["cluster-async", "aio", "tokio-comp"] } redis = { workspace = true, features = ["cluster-async", "aio", "tokio-comp"] }
storage = { workspace = true } storage = { workspace = true }
reqwest = { workspace = true }
urlencoding = { workspace = true }
[lints] [lints]
workspace = true workspace = true

View File

@ -1,5 +1,6 @@
pub mod rest; pub mod rest;
pub mod rest_article; pub mod rest_article;
pub mod rest_embed;
pub mod rest_interact; pub mod rest_interact;
pub mod rest_member; pub mod rest_member;
pub mod rest_message; pub mod rest_message;
@ -218,6 +219,10 @@ pub fn configure(cfg: &mut ServiceConfig, bus: ChannelBus) {
actix_web::web::resource("/articles/{article_id}/likes") actix_web::web::resource("/articles/{article_id}/likes")
.route(actix_web::web::get().to(rest_article::article_liked_users)), .route(actix_web::web::get().to(rest_article::article_liked_users)),
); );
cfg.service(
actix_web::web::resource("/embed/twitter")
.route(actix_web::web::get().to(rest_embed::twitter_oembed)),
);
cfg.service( cfg.service(
actix_web::web::resource("/token") actix_web::web::resource("/token")
.route(actix_web::web::post().to(token::generate_token)), .route(actix_web::web::post().to(token::generate_token)),

18
lib/cache/lib.rs vendored
View File

@ -100,6 +100,24 @@ impl AppCache {
Ok(()) Ok(())
} }
pub async fn set_with_ttl<T>(
&self,
key: &str,
value: &T,
ttl: std::time::Duration,
) -> CacheResult<()>
where
T: serde::Serialize + ?Sized,
{
self.local.set(key, value).await?;
if self.cluster_write_through
&& let Some(cluster) = &self.cluster
{
cluster.set(key, value, Some(ttl)).await?;
}
Ok(())
}
pub async fn remove(&self, key: &str) -> CacheResult<()> { pub async fn remove(&self, key: &str) -> CacheResult<()> {
self.local.remove(key).await; self.local.remove(key).await;
if let Some(cluster) = &self.cluster { if let Some(cluster) = &self.cluster {

View File

@ -43,6 +43,7 @@
"@streamdown/code": "^1.1.1", "@streamdown/code": "^1.1.1",
"@streamdown/math": "^1.0.2", "@streamdown/math": "^1.0.2",
"@streamdown/mermaid": "^1.0.2", "@streamdown/mermaid": "^1.0.2",
"@tailwindcss/typography": "^0.5.19",
"@tanstack/react-query": "^5.100.14", "@tanstack/react-query": "^5.100.14",
"@tanstack/react-table": "^8.21.3", "@tanstack/react-table": "^8.21.3",
"ai": "^6.0.193", "ai": "^6.0.193",
@ -66,6 +67,7 @@
"react-day-picker": "^10.0.1", "react-day-picker": "^10.0.1",
"react-diff-view": "^3.3.3", "react-diff-view": "^3.3.3",
"react-dom": "^19.2.6", "react-dom": "^19.2.6",
"react-hook-form": "^7.76.1",
"react-jsx-parser": "^2.4.1", "react-jsx-parser": "^2.4.1",
"react-markdown": "^10.1.0", "react-markdown": "^10.1.0",
"react-resizable-panels": "^4.11.2", "react-resizable-panels": "^4.11.2",