|
@@ -22,6 +22,7 @@ import {
|
|
|
UiTooltip,
|
|
UiTooltip,
|
|
|
} from '../../../ui';
|
|
} from '../../../ui';
|
|
|
import { ComposerComponent } from '../../../components/domain/composer/composer';
|
|
import { ComposerComponent } from '../../../components/domain/composer/composer';
|
|
|
|
|
+import { withGatewayNotices } from '../../../core/gateway-notice';
|
|
|
import { NewSessionRequest } from '../../../components/domain/session-tree/session-tree';
|
|
import { NewSessionRequest } from '../../../components/domain/session-tree/session-tree';
|
|
|
import { MessageBubbleComponent } from '../../../components/domain/message-bubble/message-bubble';
|
|
import { MessageBubbleComponent } from '../../../components/domain/message-bubble/message-bubble';
|
|
|
import { TypingIndicatorComponent } from '../../../components/domain/typing-indicator/typing-indicator';
|
|
import { TypingIndicatorComponent } from '../../../components/domain/typing-indicator/typing-indicator';
|
|
@@ -35,6 +36,7 @@ import {
|
|
|
livenessOf,
|
|
livenessOf,
|
|
|
resolveSessionPhase,
|
|
resolveSessionPhase,
|
|
|
sessionPresence,
|
|
sessionPresence,
|
|
|
|
|
+ trialCountdown,
|
|
|
} from '../../../core/agent-liveness';
|
|
} from '../../../core/agent-liveness';
|
|
|
import { resolveAgentState } from '../../../core/agent-state';
|
|
import { resolveAgentState } from '../../../core/agent-state';
|
|
|
import { StatusBadgeComponent } from '../../../components/domain/status-badge/status-badge';
|
|
import { StatusBadgeComponent } from '../../../components/domain/status-badge/status-badge';
|
|
@@ -101,7 +103,8 @@ import { AssistantTurnComponent } from '../../../components/domain/assistant-tur
|
|
|
*/
|
|
*/
|
|
|
type AiRow =
|
|
type AiRow =
|
|
|
| { kind: 'msg'; key: string; message: Message }
|
|
| { kind: 'msg'; key: string; message: Message }
|
|
|
- | { kind: 'turn'; key: string; turn: AssistantTurn };
|
|
|
|
|
|
|
+ | { kind: 'turn'; key: string; turn: AssistantTurn }
|
|
|
|
|
+ | { kind: 'notice'; key: string; text: string };
|
|
|
|
|
|
|
|
/** 右栏标签 */
|
|
/** 右栏标签 */
|
|
|
export type RailTab = 'tasks' | 'files' | 'results' | 'status';
|
|
export type RailTab = 'tasks' | 'files' | 'results' | 'status';
|
|
@@ -263,6 +266,10 @@ interface ConversationRow {
|
|
|
@if (!headerPresence().busy && headerPresence().text !== '在线') {
|
|
@if (!headerPresence().busy && headerPresence().text !== '在线') {
|
|
|
<app-status-badge [view]="headerPresence()" />
|
|
<app-status-badge [view]="headerPresence()" />
|
|
|
}
|
|
}
|
|
|
|
|
+ <!-- 试用到期倒计时(2026-12-03):最后 6 小时提示,避免突然被拦 -->
|
|
|
|
|
+ @if (trialLeft(); as tl) {
|
|
|
|
|
+ <span class="trial-left" [class.trial-left--expired]="tl.expired"><i class="fa-solid fa-hourglass-half" aria-hidden="true"></i> {{ tl.text }}</span>
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
<!--
|
|
<!--
|
|
|
页头「当前任务」摘要槽位已删除(2026-12-02 用户裁决):
|
|
页头「当前任务」摘要槽位已删除(2026-12-02 用户裁决):
|
|
@@ -496,7 +503,9 @@ interface ConversationRow {
|
|
|
}
|
|
}
|
|
|
</div>
|
|
</div>
|
|
|
@for (row of aiRows(); track row.key) {
|
|
@for (row of aiRows(); track row.key) {
|
|
|
- @if (row.kind === 'turn') {
|
|
|
|
|
|
|
+ @if (row.kind === 'notice') {
|
|
|
|
|
+ <p class="gw-notice" role="status"><i class="fa-solid fa-rotate" aria-hidden="true"></i> {{ row.text }}</p>
|
|
|
|
|
+ } @else if (row.kind === 'turn') {
|
|
|
<!--
|
|
<!--
|
|
|
一整轮 = 一张卡(2026-11-07 用户需求):
|
|
一整轮 = 一张卡(2026-11-07 用户需求):
|
|
|
顶部过程区可折叠 + 合并正文 + 文件宫格。
|
|
顶部过程区可折叠 + 合并正文 + 文件宫格。
|
|
@@ -1307,6 +1316,28 @@ interface ConversationRow {
|
|
|
flex-shrink: 0;
|
|
flex-shrink: 0;
|
|
|
padding: 0 max(var(--sp-4), calc((100% - 768px) / 2));
|
|
padding: 0 max(var(--sp-4), calc((100% - 768px) / 2));
|
|
|
}
|
|
}
|
|
|
|
|
+ .trial-left {
|
|
|
|
|
+ display: inline-flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 4px;
|
|
|
|
|
+ margin-left: var(--sp-2);
|
|
|
|
|
+ padding: 2px var(--sp-2);
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ background: var(--warning-subtle);
|
|
|
|
|
+ color: var(--warning);
|
|
|
|
|
+ font-size: var(--fs-12);
|
|
|
|
|
+ }
|
|
|
|
|
+ /* 网关重启折叠行(2026-12-03) */
|
|
|
|
|
+ .gw-notice {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ gap: var(--sp-1);
|
|
|
|
|
+ margin: var(--sp-3) 0;
|
|
|
|
|
+ color: var(--muted);
|
|
|
|
|
+ font-size: var(--fs-12);
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ }
|
|
|
/* 试用到期提示条(2026-12-03):与连接中断条同风格 */
|
|
/* 试用到期提示条(2026-12-03):与连接中断条同风格 */
|
|
|
.trial-expired-bar {
|
|
.trial-expired-bar {
|
|
|
display: flex;
|
|
display: flex;
|
|
@@ -2396,7 +2427,10 @@ export class DkChatPage implements OnDestroy {
|
|
|
out.push({ kind: 'turn', key: `turn-${t.id}`, turn: t });
|
|
out.push({ kind: 'turn', key: `turn-${t.id}`, turn: t });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- return out;
|
|
|
|
|
|
|
+ /* 网关通知(2026-12-03)按时间插回,见 core/gateway-notice.ts */
|
|
|
|
|
+ return withGatewayNotices(out, this.chat.messages(), (r) =>
|
|
|
|
|
+ r.kind === 'msg' ? r.message.ts : r.kind === 'turn' ? r.turn.blocks[0]?.startAt ?? (Date.parse(r.turn.userMessage?.ts ?? '') || 0) : undefined,
|
|
|
|
|
+ );
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -2725,9 +2759,16 @@ export class DkChatPage implements OnDestroy {
|
|
|
...sig,
|
|
...sig,
|
|
|
turnLive: !!liveTurn,
|
|
turnLive: !!liveTurn,
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
return sessionPresence(this.chat.agent(), resolved.phase);
|
|
return sessionPresence(this.chat.agent(), resolved.phase);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ /** 试用到期倒计时(2026-12-03):最后 6 小时出现在会话头部,见 core/agent-liveness.ts */
|
|
|
|
|
+ readonly trialLeft = computed(() => {
|
|
|
|
|
+ this.clockTick();
|
|
|
|
|
+ return trialCountdown(this.chat.agent(), Date.now());
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
/** 离线/未接入时的横幅提示(null = 在线,不显示) */
|
|
/** 离线/未接入时的横幅提示(null = 在线,不显示) */
|
|
|
readonly offlineBanner = computed(() => blockedHint(this.currentContainerState()));
|
|
readonly offlineBanner = computed(() => blockedHint(this.currentContainerState()));
|
|
|
|
|
|