Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion admin/src/components/BranchTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ onUnmounted(() => {
</script>

<template>
<div class="border-l border-border bg-card/50 flex flex-col flex-shrink-0">
<div class="border-l border-border bg-card/50 flex flex-col flex-shrink-0 h-full">
<div class="p-3 border-b border-border flex items-center justify-between flex-shrink-0">
<h3 class="text-xs font-semibold text-muted-foreground uppercase flex items-center gap-1.5">
<GitBranch class="w-3.5 h-3.5" />
Expand Down
8 changes: 4 additions & 4 deletions admin/src/views/ChatView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2688,8 +2688,8 @@ class="w-4 h-4 rounded border flex items-center justify-center shrink-0"
<!-- Main Chat Area -->
<div class="flex-1 flex flex-col min-w-0">

<!-- Welcome screen for chat-only users with no session selected -->
<div v-if="isChatOnly && !currentSessionId" class="flex-1 flex flex-col items-center px-6">
<!-- Welcome screen for chat-only users with no session selected (hidden when panels open) -->
<div v-if="isChatOnly && !currentSessionId && !showBranchTree && !showSettings" class="flex-1 flex flex-col items-center px-6">
<div class="flex-1" />
<div class="text-center max-w-lg w-full">
<div class="w-16 h-16 mx-auto mb-6 rounded-2xl bg-primary/15 flex items-center justify-center">
Expand Down Expand Up @@ -3843,7 +3843,7 @@ class="w-4 h-4 rounded border flex items-center justify-center shrink-0"
/>
<ArtifactPanel
:artifact="activeArtifact"
class="artifact-panel fixed inset-0 z-50 md:relative md:inset-auto md:z-0 flex-shrink-0 overflow-hidden"
class="artifact-panel fixed inset-0 z-50 md:relative md:inset-auto md:z-0 md:h-full flex-shrink-0 overflow-hidden"
:style="{ '--artifact-w': artifactWidth + 'px' }"
@close="closeArtifact"
/>
Expand All @@ -3864,7 +3864,7 @@ class="w-4 h-4 rounded border flex items-center justify-center shrink-0"
/>
<div
v-if="showSettings"
class="fixed inset-0 z-50 md:relative md:inset-auto md:z-0 border-l border-border bg-card flex flex-col flex-shrink-0 overflow-hidden settings-panel"
class="fixed inset-0 z-50 md:relative md:inset-auto md:z-0 md:h-full border-l border-border bg-card flex flex-col flex-shrink-0 overflow-hidden settings-panel"
:style="{ '--settings-w': settingsWidth + 'px' }"
>
<!-- Panel header -->
Expand Down
167 changes: 87 additions & 80 deletions mobile/src/components/MessageBubble.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const props = defineProps<{
message: ChatMessage;
isStreaming?: boolean;
isSpeaking?: boolean;
isAdmin?: boolean;
}>();

const emit = defineEmits<{
Expand Down Expand Up @@ -151,49 +152,52 @@ function cancelEdit() {
</svg>
</button>

<!-- Edit -->
<button
class="p-1.5 rounded text-stone-500 hover:text-stone-300 transition-colors"
title="Редактировать"
@click="startEdit"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />
</svg>
</button>
<!-- Admin-only actions -->
<template v-if="isAdmin">
<!-- Edit -->
<button
class="p-1.5 rounded text-stone-500 hover:text-stone-300 transition-colors"
title="Редактировать"
@click="startEdit"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />
</svg>
</button>

<!-- Save to context -->
<button
class="p-1.5 rounded text-stone-500 hover:text-stone-300 transition-colors"
title="В контекст"
@click="$emit('saveToContext', message.id, message.content)"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48" />
</svg>
</button>
<!-- Save to context -->
<button
class="p-1.5 rounded text-stone-500 hover:text-stone-300 transition-colors"
title="В контекст"
@click="$emit('saveToContext', message.id, message.content)"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48" />
</svg>
</button>

<!-- Summarize branch -->
<button
class="p-1.5 rounded text-stone-500 hover:text-stone-300 transition-colors"
title="Суммаризация ветки"
@click="$emit('summarizeBranch', message.id)"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /><polyline points="14 2 14 8 20 8" /><line x1="16" y1="13" x2="8" y2="13" /><line x1="16" y1="17" x2="8" y2="17" /><polyline points="10 9 9 9 8 9" />
</svg>
</button>
<!-- Summarize branch -->
<button
class="p-1.5 rounded text-stone-500 hover:text-stone-300 transition-colors"
title="Суммаризация ветки"
@click="$emit('summarizeBranch', message.id)"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /><polyline points="14 2 14 8 20 8" /><line x1="16" y1="13" x2="8" y2="13" /><line x1="16" y1="17" x2="8" y2="17" /><polyline points="10 9 9 9 8 9" />
</svg>
</button>

<!-- Delete branch from here -->
<button
class="p-1.5 rounded text-stone-500 hover:text-red-400 transition-colors"
title="Удалить ветку"
@click="$emit('deleteBranch', message.id)"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
</svg>
</button>
<!-- Delete branch from here -->
<button
class="p-1.5 rounded text-stone-500 hover:text-red-400 transition-colors"
title="Удалить ветку"
@click="$emit('deleteBranch', message.id)"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
</svg>
</button>
</template>
</div>

<!-- Action buttons for user messages -->
Expand Down Expand Up @@ -230,49 +234,52 @@ function cancelEdit() {
</svg>
</button>

<!-- Edit -->
<button
class="p-1.5 rounded text-amber-300/50 hover:text-amber-200 transition-colors"
title="Редактировать"
@click="startEdit"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />
</svg>
</button>
<!-- Admin-only actions -->
<template v-if="isAdmin">
<!-- Edit -->
<button
class="p-1.5 rounded text-amber-300/50 hover:text-amber-200 transition-colors"
title="Редактировать"
@click="startEdit"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />
</svg>
</button>

<!-- Regenerate response -->
<button
class="p-1.5 rounded text-amber-300/50 hover:text-amber-200 transition-colors"
title="Перегенерировать"
@click="$emit('regenerate', message.id)"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="23 4 23 10 17 10" /><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10" />
</svg>
</button>
<!-- Regenerate response -->
<button
class="p-1.5 rounded text-amber-300/50 hover:text-amber-200 transition-colors"
title="Перегенерировать"
@click="$emit('regenerate', message.id)"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="23 4 23 10 17 10" /><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10" />
</svg>
</button>

<!-- Summarize branch -->
<button
class="p-1.5 rounded text-amber-300/50 hover:text-amber-200 transition-colors"
title="Суммаризация ветки"
@click="$emit('summarizeBranch', message.id)"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /><polyline points="14 2 14 8 20 8" /><line x1="16" y1="13" x2="8" y2="13" /><line x1="16" y1="17" x2="8" y2="17" /><polyline points="10 9 9 9 8 9" />
</svg>
</button>
<!-- Summarize branch -->
<button
class="p-1.5 rounded text-amber-300/50 hover:text-amber-200 transition-colors"
title="Суммаризация ветки"
@click="$emit('summarizeBranch', message.id)"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /><polyline points="14 2 14 8 20 8" /><line x1="16" y1="13" x2="8" y2="13" /><line x1="16" y1="17" x2="8" y2="17" /><polyline points="10 9 9 9 8 9" />
</svg>
</button>

<!-- Delete branch from here -->
<button
class="p-1.5 rounded text-amber-300/50 hover:text-red-400 transition-colors"
title="Удалить ветку"
@click="$emit('deleteBranch', message.id)"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
</svg>
</button>
<!-- Delete branch from here -->
<button
class="p-1.5 rounded text-amber-300/50 hover:text-red-400 transition-colors"
title="Удалить ветку"
@click="$emit('deleteBranch', message.id)"
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
</svg>
</button>
</template>
</div>
</template>
</div>
Expand Down
Loading
Loading