Compare commits
14 Commits
a289346fdc
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 2b944cf9d1 | |||
| 453168f326 | |||
| bcffe62a15 | |||
| ee9a602f7f | |||
| 3aef7d115f | |||
| 19846a8773 | |||
| bb4ff9b007 | |||
| fcb612ff0e | |||
| 1a0b3f2c1f | |||
| 9386a8e8ef | |||
| fb9a55a64c | |||
| 9691e75e36 | |||
| 674126d687 | |||
| d37967d38e |
15
src/App.vue
15
src/App.vue
@@ -15,7 +15,7 @@ const currentLanguage = ref(getCurrentLanguage())
|
||||
|
||||
const sidebarWidth = ref(240)
|
||||
const isDragging = ref(false)
|
||||
const sidebarCollapsed = ref(localStorage.getItem('sidebar_collapsed') === 'true')
|
||||
const sidebarCollapsed = ref(true)
|
||||
|
||||
function toggleSidebar() {
|
||||
sidebarCollapsed.value = !sidebarCollapsed.value
|
||||
@@ -106,8 +106,9 @@ onUnmounted(() => {
|
||||
<div id="app" class="ms-app" :data-current-login="'guest'">
|
||||
<aside class="ms-side" :class="{ collapsed: sidebarCollapsed }" :style="{ width: sidebarCollapsed ? '62px' : sidebarWidth + 'px', minWidth: sidebarCollapsed ? '62px' : sidebarWidth + 'px' }">
|
||||
<div class="gs-sidebar-toggle" @click="toggleSidebar">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<polyline :points="sidebarCollapsed ? '9 18 15 12 9 6' : '15 18 9 12 15 6'"/>
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
:style="{ transform: sidebarCollapsed ? 'rotate(0deg)' : 'rotate(180deg)' }">
|
||||
<polyline points="9 18 15 12 9 6"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="gs-logo" :class="{ 'gs-logo-collapsed': sidebarCollapsed }">{{ sidebarCollapsed ? 'WS' : 'Workspace' }}</div>
|
||||
@@ -188,12 +189,13 @@ onUnmounted(() => {
|
||||
|
||||
<style>
|
||||
@import './assets/wordpress-exact.css';
|
||||
html, body { height: 100%; margin: 0; }
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
#app, .ms-app { background: var(--background-color) !important; display: flex; max-width: 1400px; margin: 0 auto; padding: 28px; gap: 0; height: 100vh; box-sizing: border-box; align-items: stretch; }
|
||||
.ms-side { width: 240px; min-width: 240px; background: var(--card-background) !important; border-radius: 18px; padding: 18px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; overflow: visible; }
|
||||
#app, .ms-app { background: var(--background-color) !important; display: flex; max-width: 1400px; margin: 0 auto; padding: 28px; gap: 0; height: 100vh; box-sizing: border-box; }
|
||||
.ms-side { width: 240px; min-width: 240px; background: var(--card-background) !important; border-radius: 18px; padding: 18px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; overflow: visible; height: 100%; }
|
||||
.ms-side.collapsed { align-items: center; padding: 18px 8px; }
|
||||
.ms-side.collapsed .gs-nav { align-items: center; width: 100%; }
|
||||
.ms-side.collapsed .gs-nav-item { justify-content: center; padding: 0; width: 44px; }
|
||||
@@ -208,7 +210,6 @@ onUnmounted(() => {
|
||||
.gs-sidebar-toggle { display: flex; align-items: center; justify-content: flex-end; padding: 0 4px 12px 4px; cursor: pointer; color: var(--text-secondary); flex-shrink: 0; }
|
||||
.gs-sidebar-toggle svg { transition: transform 0.2s; }
|
||||
.ms-side.collapsed .gs-sidebar-toggle { justify-content: center; width: 100%; }
|
||||
.ms-side.collapsed .gs-sidebar-toggle svg { transform: rotate(180deg); }
|
||||
.gs-logo-collapsed { text-align: center; padding: 8px 4px 16px 4px; font-size: 14px; }
|
||||
.ms-divider { width: 28px; flex-shrink: 0; cursor: col-resize; display: flex; align-items: center; justify-content: center; }
|
||||
.ms-divider-hidden { cursor: default; pointer-events: none; opacity: 0; }
|
||||
@@ -231,6 +232,6 @@ onUnmounted(() => {
|
||||
.gs-logout-btn:hover { color: var(--danger-color); border-color: var(--danger-color); background: var(--danger-background); }
|
||||
.gs-login-link { font-size: 12px; color: var(--text-secondary); text-decoration: none; }
|
||||
.gs-login-link:hover { color: var(--text-primary); }
|
||||
.ms-main { flex: 1; min-width: 0; background: var(--card-background) !important; border-radius: 18px; padding: 36px 42px; overflow-y: auto; overflow-x: hidden; }
|
||||
.ms-main { flex: 1; min-width: 0; background: var(--card-background) !important; border-radius: 18px; padding: 36px 42px; overflow-y: auto; overflow-x: hidden; height: 100%; }
|
||||
.ms-content { max-width: 1200px; }
|
||||
</style>
|
||||
|
||||
@@ -255,14 +255,18 @@ case 'search_keyword': {
|
||||
case 'search_llm_smart': {
|
||||
return { url: '/api/v1/search/llm-smart', method: 'POST', body: { query: a.query, limit: a.limit || 20 } }
|
||||
}
|
||||
case 'search_people': {
|
||||
const params = new URLSearchParams()
|
||||
if (a.query) params.set('query', a.query)
|
||||
if (a.fileUuid) params.set('file_uuid', a.fileUuid)
|
||||
if (a.limit) params.set('limit', String(a.limit))
|
||||
return { url: `/api/v1/search/people?${params.toString()}`, method: 'GET' }
|
||||
}
|
||||
case 'search_agents': {
|
||||
const body: any = { query: a.query }
|
||||
if (a.conversationId) body.conversation_id = a.conversationId
|
||||
return { url: '/api/v1/agents/search', method: 'POST', body }
|
||||
}
|
||||
case 'search_identities': {
|
||||
return { url: `/api/v1/identities/search?q=${encodeURIComponent(a.query)}&limit=${a.limit || 50}`, method: 'GET' }
|
||||
}
|
||||
|
||||
// --- Image APIs ---
|
||||
case 'get_thumbnail': {
|
||||
@@ -760,6 +764,9 @@ case 'get_unassigned_traces': {
|
||||
source_type: r.source_type || null,
|
||||
}))
|
||||
}
|
||||
case 'search_people': {
|
||||
return data || { people: [] }
|
||||
}
|
||||
case 'search_identities': {
|
||||
const results = data.results || data.data || data || []
|
||||
return results.map((r: any) => ({
|
||||
|
||||
@@ -722,15 +722,15 @@ async function sendMessage() {
|
||||
messages.value[msgIdx].loading = false
|
||||
if (res?.chips) messages.value[msgIdx].chips = res.chips
|
||||
} else if (mode.value === 'people') {
|
||||
const raw: any = await apiCall('search_identities', { query: q, limit: 50 })
|
||||
const raw: any = await apiCall('search_people', { query: q, limit: 50 })
|
||||
if (searchSeq !== seq) return
|
||||
const results = (Array.isArray(raw) ? raw : []).filter((p: any) => p.file_uuid).map((p: any) => ({
|
||||
file_uuid: p.file_uuid,
|
||||
file_name: p.name,
|
||||
summary: `FS - ${p.source || 'unknown'}`,
|
||||
const peopleList = raw?.people || []
|
||||
const results = peopleList.map((p: any) => ({
|
||||
file_name: p.name || 'Unknown',
|
||||
summary: `People · ${p.appearance_count || 0} appearances`,
|
||||
similarity: 1.0,
|
||||
start_frame: p.startFrame || p.start_frame,
|
||||
end_frame: p.endFrame || p.end_frame,
|
||||
start_frame: p.first_appearance_time,
|
||||
end_frame: p.last_appearance_time,
|
||||
search_query: q,
|
||||
}))
|
||||
messages.value[msgIdx].results = results
|
||||
|
||||
Reference in New Issue
Block a user