Rename Character copy to Persona

Issue #234: the "Character" tab and its "Style of response" label made it
unclear that this is where a system prompt is set. Rename the user-facing
labels for clarity:

- "Character" tab + section heading -> "Persona"
- "Style of response" -> "System prompt"
- supporting strings: select placeholder, name placeholder, button/title
  text, toasts, confirm/notice text, the chat-bar indicator tooltip, the
  settings visibility toggle, and the assistant personality picker
  ("Characters" optgroup -> "Personas").

Used "Persona" rather than the issue's suggested "Preset" because the app
already has a distinct, user-facing "Presets" concept (built-in presets
like Code Analyze/Brainstorm/Reason, shown as their own group in the
assistant picker). "Persona" matches what this tab actually creates -- a
named persona with its own memories -- without colliding with that term.

Internal identifiers (element IDs, data-chartab attributes, function names)
and the character_name backend field are intentionally left unchanged so
existing saved presets and JS wiring keep working.
This commit is contained in:
Zeus-Deus
2026-06-02 05:42:15 +02:00
committed by GitHub
parent c90a7a19a5
commit 19a4f823a4
3 changed files with 20 additions and 20 deletions

View File

@@ -180,7 +180,7 @@ function _renderSettingsBody(body, data, tzList) {
<div class="assistant-field">
<span style="display:flex;align-items:center;gap:8px;">Personality
<select id="assistant-character-pick" style="font-size:11px;padding:1px 6px;border:1px solid var(--border);border-radius:3px;background:var(--bg);color:var(--fg);max-width:180px;">
<option value="">-- pick from character --</option>
<option value="">-- pick from persona --</option>
</select>
</span>
<textarea id="assistant-personality" rows="6" placeholder="Describe the assistant's personality, tone, and behavior...">${_esc(crew.personality || '')}</textarea>
@@ -293,7 +293,7 @@ function _renderSettingsBody(body, data, tzList) {
allPresets.push(...presetsRaw);
}
const allTemplates = Array.isArray(templates) ? templates : [];
let opts = '<option value="">-- pick from character --</option>';
let opts = '<option value="">-- pick from persona --</option>';
if (allPresets.length) {
opts += '<optgroup label="Presets">';
for (const p of allPresets) {
@@ -304,7 +304,7 @@ function _renderSettingsBody(body, data, tzList) {
opts += '</optgroup>';
}
if (allTemplates.length) {
opts += '<optgroup label="Characters">';
opts += '<optgroup label="Personas">';
for (const t of allTemplates) {
if (!t.system_prompt && !t.personality) continue;
const name = t.character_name || t.name || 'Unnamed';

View File

@@ -220,7 +220,7 @@ function initNameDropdown() {
if (!charName || charName === '__default__') return;
const match = userTemplates.find(t => t.name === charName);
const isBuiltin = PROMPT_TEMPLATES.some(t => t.name === charName);
if (!await window.styledConfirm(`Delete "${charName}"?\n\nThis will remove the character and all its memories.`, { confirmText: 'Delete', danger: true })) return;
if (!await window.styledConfirm(`Delete "${charName}"?\n\nThis will remove the persona and all its memories.`, { confirmText: 'Delete', danger: true })) return;
try {
// Delete saved template if exists
if (match) {
@@ -296,7 +296,7 @@ function _populateCharSelect() {
const select = document.getElementById('char-template-select');
if (!select) return;
const currentVal = select.value;
select.innerHTML = '<option value="__default__">Default (no character)</option>';
select.innerHTML = '<option value="__default__">Default (no persona)</option>';
const savedNames = new Set(userTemplates.map(t => t.name));
if (userTemplates.length) {
@@ -437,7 +437,7 @@ function initSaveAsTemplate() {
let name = nameInput ? nameInput.value.trim() : '';
if (!name) {
name = prompt('Enter a name for this character:');
name = prompt('Enter a name for this persona:');
if (!name || !name.trim()) return;
name = name.trim();
if (nameInput) nameInput.value = name;
@@ -616,7 +616,7 @@ export function openCustomPresetModal() {
} else {
// Character/persona tab. "Save & " prefix when the user edited a template,
// so it's clear the edit is being saved on start.
label = changed ? 'Save & Start Character' : 'Start Character';
label = changed ? 'Save & Start Persona' : 'Start Persona';
}
btn.textContent = label;
// Show a "Cancel" button next to Start when the active tab's feature is
@@ -708,7 +708,7 @@ export function openCustomPresetModal() {
const notice = document.createElement('div');
notice.id = 'char-lock-notice';
notice.style.cssText = 'font-size:11px;color:var(--color-muted);text-align:center;padding:6px;margin-bottom:8px;border:1px dashed var(--border);border-radius:6px;';
notice.textContent = 'Persistent chat — character is locked. Style, temperature, and memory can still be changed.';
notice.textContent = 'Persistent chat — persona is locked. Style, temperature, and memory can still be changed.';
modal.querySelector('.modal-body').prepend(notice);
}
} else {
@@ -825,7 +825,7 @@ export async function saveCustomPreset(showToast, showError) {
if (showToast) {
// The Inject tab is a plain tuned "prompt" chat, not a persona — say so.
showToast(_isInjectStart ? 'Prompt saved' : 'Character saved');
showToast(_isInjectStart ? 'Prompt saved' : 'Persona saved');
}
const modal = document.getElementById('custom-preset-modal');
if (modal) {
@@ -962,7 +962,7 @@ function _syncCharIndicator() {
if (hasChar) {
if (iconEl) iconEl.innerHTML = _AVATAR;
if (nameSpan) nameSpan.textContent = custom.character_name;
btn.title = `Character: ${custom.character_name} — click to configure`;
btn.title = `Persona: ${custom.character_name} — click to configure`;
} else {
// Inject/tuning chat — syringe tag labeled "Prompt" to match the
// window identity, no persona name.