android / debug (push) Successful in 2m16s
android / release (push) Successful in 2m9s
ci / checks (push) Successful in 3m39s
ci / test (push) Successful in 2m5s
ci / docker (push) Successful in 1m52s
ci / web (push) Successful in 13s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m56s
ci / chart (push) Successful in 6s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 20s
ci / publish-edge-chart (push) Successful in 4s
The web client kept its own dark shell: an icon rail, neon jade accents, and rows that reported state with colored dots and pills. Rhema Together had since settled on a warmer, quieter language, and the two surfaces no longer looked like one product. The shell is now one 232px sidebar plus a view. Chat lists sessions in the sidebar and renders the transcript in a 760px column; settings moves its searchable nav into the same sidebar and its pages onto an 880px column. The palette, type scale, controls, cards, and markdown come from Together's light theme, with its dark values following the OS. FiraCode Nerd Font Mono sets code, and the product mark, logo, and lucide icons replace the glyph characters. Status is a word now: running, waiting, held, connected, live, snapshot. The rail, its dots, the duplicate consent deny action, and the session key tag are gone. The model backend moved into the chat topbar beside the stream state. The mobile shell keeps the composer fixed in chat and lets settings scroll as a document. README and component docs follow the new layout. nuxt typecheck and build pass; checked light and dark at 1280x800 and 390x844 against mock API data.
207 lines
5.1 KiB
Vue
207 lines
5.1 KiB
Vue
<script setup lang="ts">
|
|
// The Bootstrap page: the three identity documents the resident prompt
|
|
// renders, editable in place. SOUL.md and USER.md save as whole files;
|
|
// ENVIRONMENT.md is generated at every boot, so its editor is read-only
|
|
// and says so. Presentational: data flows in as props, intent flows up
|
|
// as events.
|
|
import type { BootstrapFile, BootstrapFiles } from '~/composables/useClaw'
|
|
|
|
const props = defineProps<{
|
|
state: BootstrapFiles | null
|
|
loading: boolean
|
|
/** The kind whose save is in flight. */
|
|
saving: string | null
|
|
}>()
|
|
|
|
const emit = defineEmits<{
|
|
refresh: []
|
|
save: [kind: string, content: string]
|
|
}>()
|
|
|
|
// 16 KiB, the same cap bootstrap_save enforces in the daemon.
|
|
const CAP = 16 * 1024
|
|
|
|
const drafts = reactive<Record<string, string>>({})
|
|
|
|
function sync(): void {
|
|
const state = props.state
|
|
if (!state) return
|
|
for (const file of state.files) {
|
|
drafts[file.kind] = file.content ?? ''
|
|
}
|
|
}
|
|
|
|
// The page's only refresh is explicit, so a state arrival always wins:
|
|
// there is no background poll that could overwrite a live edit.
|
|
watch(() => props.state, sync, { immediate: true })
|
|
|
|
function dirty(file: BootstrapFile): boolean {
|
|
return (drafts[file.kind] ?? '') !== (file.content ?? '')
|
|
}
|
|
|
|
function discard(file: BootstrapFile): void {
|
|
drafts[file.kind] = file.content ?? ''
|
|
}
|
|
|
|
function save(file: BootstrapFile): void {
|
|
if (file.generated || props.saving || !dirty(file)) return
|
|
emit('save', file.kind, drafts[file.kind] ?? '')
|
|
}
|
|
|
|
function size(file: BootstrapFile): number {
|
|
return new TextEncoder().encode(drafts[file.kind] ?? '').length
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div class="page">
|
|
<PageHeader title="Bootstrap" subtitle="The identity files every turn renders.">
|
|
<template #actions>
|
|
<button :disabled="loading" @click="$emit('refresh')">
|
|
{{ loading ? 'Refreshing…' : 'Refresh' }}
|
|
</button>
|
|
</template>
|
|
</PageHeader>
|
|
|
|
<div class="scroll">
|
|
<p v-if="!state" class="muted">loading bootstrap…</p>
|
|
|
|
<template v-else>
|
|
<AppCallout variant="info" title="These files enter every request">
|
|
SOUL.md is who the agent is; USER.md is who you are. Keep both
|
|
small. They are read on every turn. ENVIRONMENT.md is written
|
|
from the machine at boot.
|
|
</AppCallout>
|
|
|
|
<SettingCard
|
|
v-for="file in state.files"
|
|
:key="file.kind"
|
|
:title="file.name"
|
|
:meta="file.generated ? 'generated at boot' : file.exists ? 'present' : 'missing'"
|
|
>
|
|
<div class="editor">
|
|
<textarea
|
|
v-model="drafts[file.kind]"
|
|
class="mono"
|
|
rows="10"
|
|
spellcheck="false"
|
|
:readonly="file.generated"
|
|
:disabled="saving === file.kind"
|
|
:aria-label="`${file.name} content`"
|
|
/>
|
|
<div class="editor-foot">
|
|
<span class="hint">
|
|
<template v-if="file.generated">
|
|
Rewritten at every boot; edit the template, not this file.
|
|
</template>
|
|
<template v-else>
|
|
{{ size(file) }} of {{ CAP }} bytes
|
|
<span v-if="size(file) > CAP" class="over">over the cap</span>
|
|
</template>
|
|
</span>
|
|
<span class="actions">
|
|
<button
|
|
v-if="!file.generated"
|
|
:disabled="!dirty(file) || saving === file.kind"
|
|
@click="discard(file)"
|
|
>
|
|
Discard
|
|
</button>
|
|
<button
|
|
v-if="!file.generated"
|
|
class="primary"
|
|
:disabled="!dirty(file) || saving === file.kind || size(file) > CAP"
|
|
@click="save(file)"
|
|
>
|
|
{{ saving === file.kind ? 'Saving…' : 'Save' }}
|
|
</button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</SettingCard>
|
|
|
|
<p class="footnote">
|
|
The agent can also write SOUL.md and USER.md through its
|
|
<code>bootstrap_save</code> tool. Both paths land in the same
|
|
store, so the next turn sees either.
|
|
</p>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.page {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
min-width: 0;
|
|
flex: 1;
|
|
}
|
|
|
|
.scroll {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 0 var(--sp-8) var(--sp-10);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--sp-4);
|
|
width: 100%;
|
|
max-width: 880px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.muted {
|
|
color: var(--text3);
|
|
}
|
|
|
|
.editor {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
padding: 14px 16px;
|
|
}
|
|
|
|
textarea {
|
|
width: 100%;
|
|
min-height: 180px;
|
|
resize: vertical;
|
|
line-height: 1.5;
|
|
font-size: 12.5px;
|
|
}
|
|
|
|
textarea[readonly] {
|
|
color: var(--text2);
|
|
background: var(--sunken);
|
|
}
|
|
|
|
.editor-foot {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
}
|
|
|
|
.hint {
|
|
color: var(--text3);
|
|
font-size: 11.5px;
|
|
}
|
|
|
|
.over {
|
|
color: var(--error);
|
|
}
|
|
|
|
.actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.footnote {
|
|
margin: 0;
|
|
padding: 0 2px;
|
|
color: var(--text3);
|
|
font-size: 12px;
|
|
}
|
|
</style>
|