feat(insight): add cross-chat time investment

This commit is contained in:
digua committed 2026-08-10 22:20:38 +08:00
1 parent af7c8a5573
commit 8e90434032
49 files changed
+2406 -64

No files matched your search

+1 -1
View File
@@ -102,7 +102,7 @@ onMounted(() => {
</div>
</template>
<template v-else>
<Sidebar v-if="shouldShowSidebar" :backend-features="false" settings-enabled />
<Sidebar v-if="shouldShowSidebar" :backend-features="false" insight-enabled settings-enabled />
<main class="relative flex-1 overflow-hidden">
<router-view v-slot="{ Component }">
<Transition name="page-fade" mode="out-in">
+18
View File
@@ -0,0 +1,18 @@
/**
* Run: pnpm test -- apps/web-wasm/src/routes.test.ts
*/
import assert from 'node:assert/strict'
import test from 'node:test'
import { webWasmRoutes } from './routes'
test('registers time investment as the Web WASM insight route', () => {
const insightRoute = webWasmRoutes.find((route) => route.path === '/insight')
assert.ok(insightRoute)
assert.deepEqual(insightRoute.redirect, { name: 'insight-time-investment' })
assert.deepEqual(
insightRoute.children?.map((route) => ({ path: route.path, name: route.name })),
[{ path: 'time-investment', name: 'insight-time-investment' }]
)
})
+12
View File
@@ -16,4 +16,16 @@ export const webWasmRoutes: RouteRecordRaw[] = [
name: 'private-chat',
component: () => import('./pages/SessionDetailPage.vue'),
},
{
path: '/insight',
component: () => import('@/pages/insight/index.vue'),
redirect: { name: 'insight-time-investment' },
children: [
{
path: 'time-investment',
name: 'insight-time-investment',
component: () => import('@/pages/insight/time-investment/index.vue'),
},
],
},
]