feat(staffchat): 路由+API client+类型+relativeChatTime(还原旧页WIP+占位StaffChat)

- 还原 ChatTimeline.vue/api/index.ts 未提交 WIP(新页自建,旧文件回 HEAD)
- /staff-chat/:ownerId/:tab?/:talkerId? 路由 + 占位 StaffChat.vue(Task 9 替换)
- types: MomentsPost/MomentsList/StaffStatsCounts/StaffStatsDetail +
  ChatSession.pinned + Account.avatar
- api: getMoments/getStaffStatsCounts/getStaffStatsDetail + sessions
  is_del + messages msg_type/q 过滤
- format: relativeChatTime(今天HH:mm/昨天/M月D日/YYYY年M月D日) + 4 例
  vitest spec(全过,vitest 未入 devDependencies,npx 拉取运行)
- tsconfig.app.json exclude __tests__(vitest 未装,保持 vue-tsc 通过)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-25 16:44:47 +08:00
parent 4baa8639ba
commit f2bcac0a4d
7 changed files with 208 additions and 2 deletions
+5 -1
View File
@@ -14,5 +14,9 @@
"erasableSyntaxOnly": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
// vitest specs use `import from 'vitest'`, which isn't installed yet — keep
// them out of the app type-check (create-vue scaffold pattern; wire a
// tsconfig.vitest.json once vitest lands).
"exclude": ["src/**/__tests__/*"]
}