Files
archie/ui/src/chat/ChatBar.vue
T

36 lines
1.0 KiB
Vue

<script setup lang="ts">
import { MessageCirclePlus } from "@lucide/vue";
import { Button } from "@/components/ui/button";
import ChatSessionActions from "./ChatSessionActions.vue";
import ChatSessionList from "./ChatSessionList.vue";
import ChatSettings from "./ChatSettings.vue";
import { currentSession, newChat } from "./state";
/**
* One row for everything that is not the conversation: which conversation is
* open, and the controls that are consulted rather than used constantly.
*
* There is no close button. The launcher stays visible while the panel is open
* and is the single control that opens and closes it.
*/
</script>
<template>
<div class="flex items-center gap-1 border-b px-3 py-2">
<ChatSessionList />
<Button
variant="ghost"
size="icon-sm"
class="flex-none"
title="New chat"
aria-label="New chat"
@click="newChat"
>
<MessageCirclePlus />
</Button>
<ChatSettings />
<ChatSessionActions v-if="currentSession" />
</div>
</template>