chore: v1.4.1 重写README、清理死代码、更新文档
- 重写README.md,精简结构,添加AI辅助开发声明(GLM/Qwen/Doubao/MIMO) - 清理6项死代码: WhitelistService.isSuperAdmin、PersonaResponse record、AiBadgeHeadProcessor空操作类、utils/api.ts、utils/gravatar.ts、canvas-confetti依赖 - 版本号更新为1.4.1 - 更新CHANGELOG.md添加v1.4.1条目
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
"@halo-dev/ui-plugin-bundler-kit": "^2.23.0",
|
||||
"@iconify-json/ri": "^1.2.6",
|
||||
"@tsconfig/node20": "^20.1.6",
|
||||
"@types/canvas-confetti": "^1.9.0",
|
||||
"@types/jsdom": "^21.1.7",
|
||||
"@types/node": "^20.19.1",
|
||||
"@vitest/eslint-plugin": "^1.2.7",
|
||||
|
||||
Generated
-16
@@ -20,9 +20,6 @@ importers:
|
||||
axios:
|
||||
specifier: ^1.13.5
|
||||
version: 1.17.0
|
||||
canvas-confetti:
|
||||
specifier: ^1.9.3
|
||||
version: 1.9.4
|
||||
vue:
|
||||
specifier: ^3.5.28
|
||||
version: 3.5.38(typescript@5.8.3)
|
||||
@@ -42,9 +39,6 @@ importers:
|
||||
'@tsconfig/node20':
|
||||
specifier: ^20.1.6
|
||||
version: 20.1.9
|
||||
'@types/canvas-confetti':
|
||||
specifier: ^1.9.0
|
||||
version: 1.9.0
|
||||
'@types/jsdom':
|
||||
specifier: ^21.1.7
|
||||
version: 21.1.7
|
||||
@@ -695,9 +689,6 @@ packages:
|
||||
'@tybys/wasm-util@0.10.2':
|
||||
resolution: {integrity: sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==}
|
||||
|
||||
'@types/canvas-confetti@1.9.0':
|
||||
resolution: {integrity: sha512-aBGj/dULrimR1XDZLtG9JwxX1b4HPRF6CX9Yfwh3NvstZEm1ZL7RBnel4keCPSqs1ANRu1u2Aoz9R+VmtjYuTg==}
|
||||
|
||||
'@types/chai@5.2.3':
|
||||
resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==}
|
||||
|
||||
@@ -1040,9 +1031,6 @@ packages:
|
||||
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
canvas-confetti@1.9.4:
|
||||
resolution: {integrity: sha512-yxQbJkAVrFXWNbTUjPqjF7G+g6pDotOUHGbkZq2NELZUMDpiJ85rIEazVb8GTaAptNW2miJAXbs1BtioA251Pw==}
|
||||
|
||||
chai@6.2.2:
|
||||
resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==}
|
||||
engines: {node: '>=18'}
|
||||
@@ -3051,8 +3039,6 @@ snapshots:
|
||||
tslib: 2.8.1
|
||||
optional: true
|
||||
|
||||
'@types/canvas-confetti@1.9.0': {}
|
||||
|
||||
'@types/chai@5.2.3':
|
||||
dependencies:
|
||||
'@types/deep-eql': 4.0.2
|
||||
@@ -3466,8 +3452,6 @@ snapshots:
|
||||
|
||||
callsites@3.1.0: {}
|
||||
|
||||
canvas-confetti@1.9.4: {}
|
||||
|
||||
chai@6.2.2: {}
|
||||
|
||||
chalk@4.1.2:
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* 统一 API 路径常量,避免硬编码散布在多个 Vue 文件中。
|
||||
* 修改 API 路径只需在此处更新。
|
||||
*/
|
||||
export const API_BASE = '/apis/console.api.comment-ai-autopilot.nxxy335.top/v1alpha1'
|
||||
|
||||
// ===== 日志相关 =====
|
||||
export const API_REPLIES = `${API_BASE}/replies`
|
||||
export const apiReply = (name: string) => `${API_REPLIES}/${name}`
|
||||
export const apiReplyAction = (name: string, action: string) => `${API_REPLIES}/${name}/${action}`
|
||||
export const API_BATCH_APPROVE = `${API_REPLIES}/batch-approve`
|
||||
export const API_BATCH_REJECT = `${API_REPLIES}/batch-reject`
|
||||
export const API_BATCH_DELETE = `${API_REPLIES}/batch-delete`
|
||||
export const apiConversation = (commentId: string) => `${API_BASE}/conversation/${commentId}`
|
||||
|
||||
// ===== 概览相关 =====
|
||||
export const API_STATS = `${API_BASE}/stats`
|
||||
export const API_PERSONAS = `${API_BASE}/personas`
|
||||
export const apiPersona = (name: string) => `${API_PERSONAS}/${name}`
|
||||
export const API_HEALTH = `${API_BASE}/health`
|
||||
|
||||
// ===== 设置相关 =====
|
||||
export const API_EXPORT = `${API_BASE}/export`
|
||||
export const API_IMPORT = `${API_BASE}/import`
|
||||
export const API_COMMENTERS = `${API_BASE}/commenters`
|
||||
export const API_CLEANUP = `${API_BASE}/cleanup`
|
||||
|
||||
// ===== 评论触发 =====
|
||||
export const apiCommentTrigger = (commentName: string) => `${API_BASE}/comments/${commentName}/trigger`
|
||||
@@ -1,14 +0,0 @@
|
||||
export async function computeGravatarHash(email: string): Promise<string> {
|
||||
if (!email || email.trim() === '') return ''
|
||||
const normalizedEmail = email.trim().toLowerCase()
|
||||
const encoder = new TextEncoder()
|
||||
const data = encoder.encode(normalizedEmail)
|
||||
const hashBuffer = await crypto.subtle.digest('SHA-256', data)
|
||||
const hashArray = Array.from(new Uint8Array(hashBuffer))
|
||||
return hashArray.map(b => b.toString(16).padStart(2, '0')).join('')
|
||||
}
|
||||
|
||||
export function getGravatarUrl(hash: string): string {
|
||||
if (!hash) return ''
|
||||
return `https://cn.cravatar.com/avatar/${hash}`
|
||||
}
|
||||
Reference in New Issue
Block a user