forked from vhaudiquet/rhema-together
A room is one conversation, one ssh sandbox, and one agent. Accounts create rooms; friends join through a single-use invite link and a display name; the agent speaks only through the message tool. The server is Axum and SQLite. It serves the built Nuxt client, streams room events over SSE, and runs one serialized turn loop per room with turn-level steering copied from rhema-code. The client has the chat, preview iframe, read-only file pane, xterm terminal, and presence. Preview URLs are signed wildcard hosts, and the proxy tunnels HTTP over ssh direct-tcpip. HostAgent::step remains deferred in the framework.
56 lines
1.8 KiB
Vue
56 lines
1.8 KiB
Vue
<script setup lang="ts">
|
|
import { ref } from 'vue'
|
|
import { Eye, FolderTree, PanelRightClose, Terminal } from 'lucide-vue-next'
|
|
|
|
type Tab = 'terminal' | 'preview' | 'files'
|
|
|
|
defineProps<{ roomId: string; roomName: string }>()
|
|
const emit = defineEmits<{ close: [] }>()
|
|
|
|
const tab = ref<Tab>('files')
|
|
const tabs: Array<{ id: Tab; label: string; icon: typeof Terminal }> = [
|
|
{ id: 'terminal', label: 'Terminal', icon: Terminal },
|
|
{ id: 'preview', label: 'Preview', icon: Eye },
|
|
{ id: 'files', label: 'Files', icon: FolderTree },
|
|
]
|
|
</script>
|
|
|
|
<template>
|
|
<aside class="right-pane right-pane-overlay" aria-label="Workspace panes">
|
|
<div class="pane-head">
|
|
<div class="pane-tabs" role="tablist" aria-label="Workspace panels">
|
|
<button
|
|
v-for="item in tabs"
|
|
:key="item.id"
|
|
type="button"
|
|
class="pane-tab"
|
|
:class="{ active: tab === item.id }"
|
|
role="tab"
|
|
:id="`pane-tab-${item.id}`"
|
|
:aria-selected="tab === item.id"
|
|
aria-controls="pane-panel"
|
|
@click="tab = item.id"
|
|
>
|
|
<component :is="item.icon" :size="14" aria-hidden="true" />
|
|
{{ item.label }}
|
|
</button>
|
|
</div>
|
|
<button
|
|
type="button"
|
|
class="icon-btn"
|
|
aria-label="Close side pane"
|
|
title="Close side pane"
|
|
@click="emit('close')"
|
|
>
|
|
<PanelRightClose :size="16" aria-hidden="true" />
|
|
</button>
|
|
</div>
|
|
|
|
<div id="pane-panel" class="pane-body" role="tabpanel" :aria-labelledby="`pane-tab-${tab}`">
|
|
<FilesPane v-if="tab === 'files'" :room-id="roomId" :room-name="roomName" />
|
|
<TerminalPane v-else-if="tab === 'terminal'" :room-id="roomId" />
|
|
<PreviewPane v-else :room-id="roomId" />
|
|
</div>
|
|
</aside>
|
|
</template>
|