HEL-615: 全部页面统一为 A「片场暗房」界面
- 设置页重写进 AppShell:生成与队列 / 智能体运行 / 存储路径三段,其余设置入口链到模型设置、ComfyUI 连接、智能体;旧 ?tab= 链接跳转到对应新页 - 项目卡状态标签改为按五段真实进度显示(已完成 / 某阶段生成中·待确认 / 进行中 / 待开始) - 首页生成任务行对齐 a1(来源标签、项目名、进度条、本地时间) - 连接页:右栏默认新增表单 + 任务使用目标面板,进入页面自动实测各连接;模型页默认新增表单、自动 1-token 实测,去掉双加号 - 生图/生视频:生成参数面板标题、通栏生成按钮、成片预览、按类型的历史标题与 16:9 视频历史、顶栏连接状态胶囊,连接状态改用服务器实测 - 智能体页:五个 Agent / Skill 库 / 已装 Skill 面板标题,内置 Skill 中文名,去掉对话空态 Calliope 字样 - 侧栏底部 ComfyUI 状态修正为真实实测(原查询不响应导致一直测试中) - 统一样式来源:.a-btn/.a-panel/.a-select/.status-chip 等只在 app.css 定义一次,删除各页重复定义;新增 Switch、Button block、ProgressBar tone - 旧 Calliope 路由(/projects、/project/:id、/canvas、/library、/build-scene、/playground)重定向到 A 页面;页面标题改为影工坊 - 轮询间隔单位改为秒(7 种语言) Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -53,15 +53,24 @@
|
||||
const projectMemories = $derived(
|
||||
($memoriesQuery.data ?? []).filter((m) => m.scope === 'project'),
|
||||
);
|
||||
|
||||
const KIND_KEYS: Record<string, string> = {
|
||||
preference: 'memory.kindPreference',
|
||||
convention: 'memory.kindConvention',
|
||||
correction: 'memory.kindCorrection',
|
||||
};
|
||||
function kindLabel(kind: string): string {
|
||||
return KIND_KEYS[kind] ? t(KIND_KEYS[kind]) : kind;
|
||||
}
|
||||
</script>
|
||||
|
||||
<section class="panel">
|
||||
<h1>{t('memory.title')}</h1>
|
||||
<p class="lead">{t('memory.lead')}</p>
|
||||
<section class="a-panel">
|
||||
<h2 class="a-panel-title">{t('memory.title')}</h2>
|
||||
<p class="a-panel-lead lead">{t('memory.lead')}</p>
|
||||
|
||||
<div class="add-row">
|
||||
<input
|
||||
class="field-input add-input"
|
||||
class="a-input add-input"
|
||||
placeholder={t('memory.placeholder')}
|
||||
maxlength={500}
|
||||
bind:value={newContent}
|
||||
@@ -69,25 +78,25 @@
|
||||
if (e.key === 'Enter' && canAdd) $addMutation.mutate();
|
||||
}}
|
||||
/>
|
||||
<select class="field-input scope-select" bind:value={newScope}>
|
||||
<select class="a-select scope-select" bind:value={newScope}>
|
||||
<option value="global">{t('memory.scopeGlobal')}</option>
|
||||
<option value="project">{t('memory.scopeProject')}</option>
|
||||
</select>
|
||||
{#if newScope === 'project'}
|
||||
<select class="field-input scope-select" bind:value={newProjectId}>
|
||||
<select class="a-select scope-select" bind:value={newProjectId}>
|
||||
<option value={null}>{t('memory.chooseProject')}</option>
|
||||
{#each ($projectsQuery.data ?? []) as p (p.id)}
|
||||
<option value={p.id}>{p.title}</option>
|
||||
{/each}
|
||||
</select>
|
||||
{/if}
|
||||
<select class="field-input scope-select" bind:value={newKind}>
|
||||
<select class="a-select scope-select" bind:value={newKind}>
|
||||
<option value="preference">{t('memory.kindPreference')}</option>
|
||||
<option value="convention">{t('memory.kindConvention')}</option>
|
||||
<option value="correction">{t('memory.kindCorrection')}</option>
|
||||
</select>
|
||||
<Button
|
||||
variant="primary"
|
||||
variant="secondary"
|
||||
size="sm"
|
||||
disabled={!canAdd || $addMutation.isPending}
|
||||
onclick={() => $addMutation.mutate()}
|
||||
@@ -102,11 +111,11 @@
|
||||
<p class="muted">{t('memory.empty')}</p>
|
||||
{:else}
|
||||
{#if globalMemories.length > 0}
|
||||
<h2 class="group-head">{t('memory.groupGlobal')}</h2>
|
||||
<h3 class="group-head">{t('memory.groupGlobal')}</h3>
|
||||
<div class="mem-list">
|
||||
{#each globalMemories as m (m.id)}
|
||||
<div class="mem-row">
|
||||
<span class="mem-kind">{m.kind}</span>
|
||||
<span class="mem-kind">{kindLabel(m.kind)}</span>
|
||||
<span class="mem-content">{m.content}</span>
|
||||
<span class="mem-meta">
|
||||
{m.source === 'user' ? t('memory.sourceYou') : t('memory.sourceAgent')} · {t('memory.usedCount', { count: m.use_count })}
|
||||
@@ -124,11 +133,11 @@
|
||||
</div>
|
||||
{/if}
|
||||
{#if projectMemories.length > 0}
|
||||
<h2 class="group-head">{t('memory.groupProject')}</h2>
|
||||
<h3 class="group-head">{t('memory.groupProject')}</h3>
|
||||
<div class="mem-list">
|
||||
{#each projectMemories as m (m.id)}
|
||||
<div class="mem-row">
|
||||
<span class="mem-kind">{m.kind}</span>
|
||||
<span class="mem-kind">{kindLabel(m.kind)}</span>
|
||||
<span class="mem-project">{m.project_title ?? `#${m.project_id}`}</span>
|
||||
<span class="mem-content">{m.content}</span>
|
||||
<span class="mem-meta">
|
||||
@@ -150,21 +159,8 @@
|
||||
</section>
|
||||
|
||||
<style>
|
||||
.panel {
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--space-lg);
|
||||
margin-top: var(--space-lg);
|
||||
}
|
||||
.panel h1 {
|
||||
margin: 0 0 6px;
|
||||
font-size: 22px;
|
||||
}
|
||||
.lead {
|
||||
margin: 0 0 var(--space-lg);
|
||||
color: var(--text-secondary);
|
||||
font-size: 14px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.add-row {
|
||||
display: flex;
|
||||
@@ -177,19 +173,6 @@
|
||||
flex: 1;
|
||||
min-width: 220px;
|
||||
}
|
||||
.field-input {
|
||||
background: var(--bg-elevated);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--text-primary);
|
||||
padding: 8px 10px;
|
||||
font-size: 13px;
|
||||
font-family: inherit;
|
||||
}
|
||||
.field-input:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
.scope-select {
|
||||
width: auto;
|
||||
max-width: 160px;
|
||||
@@ -198,9 +181,7 @@
|
||||
margin: var(--space-md) 0 6px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
color: var(--text-muted);
|
||||
color: var(--text-3);
|
||||
}
|
||||
.mem-list {
|
||||
display: flex;
|
||||
@@ -213,17 +194,15 @@
|
||||
gap: 10px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
background: rgba(0, 0, 0, 0.18);
|
||||
font-size: 13px;
|
||||
border-radius: 8px;
|
||||
background: var(--surface-2);
|
||||
font-size: 12.5px;
|
||||
}
|
||||
.mem-kind {
|
||||
flex-shrink: 0;
|
||||
font-size: 10px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--accent);
|
||||
border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
|
||||
font-size: 10.5px;
|
||||
color: var(--info);
|
||||
background: var(--info-dim);
|
||||
border-radius: 999px;
|
||||
padding: 1px 8px;
|
||||
}
|
||||
@@ -257,7 +236,7 @@
|
||||
}
|
||||
.mem-del:hover {
|
||||
color: var(--error);
|
||||
background: rgba(239, 68, 68, 0.12);
|
||||
background: var(--error-dim);
|
||||
}
|
||||
.muted {
|
||||
color: var(--text-muted);
|
||||
|
||||
Reference in New Issue
Block a user