chore: update plan automation and chat status UI
This commit is contained in:
@@ -676,7 +676,9 @@ export function ChatSourceChangesPage() {
|
||||
>
|
||||
<Space direction="vertical" size={6} style={{ width: '100%' }}>
|
||||
<Space size={8} wrap>
|
||||
<Text strong>{entry.conversationTitle}</Text>
|
||||
<Text strong className="chat-source-changes-page__list-title">
|
||||
{entry.conversationTitle}
|
||||
</Text>
|
||||
<Tag color={entry.status === 'failed' ? 'error' : 'blue'}>{entry.status}</Tag>
|
||||
<Tag color={entry.currentSourceStatus === 'applied' ? 'cyan' : 'default'}>
|
||||
{entry.currentSourceStatus === 'applied' ? '현재 소스 적용' : '현재 소스 미적용'}
|
||||
@@ -702,7 +704,7 @@ export function ChatSourceChangesPage() {
|
||||
{selectedEntry ? (
|
||||
<Space direction="vertical" size={16} className="chat-source-changes-page__detail">
|
||||
<Space direction="vertical" size={4}>
|
||||
<Title level={5} style={{ margin: 0 }}>
|
||||
<Title level={5} className="chat-source-changes-page__detail-title">
|
||||
{selectedEntry.requestTitle}
|
||||
</Title>
|
||||
<Text type="secondary">
|
||||
|
||||
@@ -2149,6 +2149,22 @@
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.app-chat-panel__resource-strip-filter {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-width: 0;
|
||||
color: #334155;
|
||||
font-size: 11px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.app-chat-panel__resource-strip-filter .ant-checkbox-wrapper {
|
||||
width: 100%;
|
||||
margin-inline-start: 0;
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.app-chat-panel__resource-strip-empty.ant-typography {
|
||||
margin: 0;
|
||||
font-size: 11px;
|
||||
|
||||
@@ -484,12 +484,18 @@ function formatDateTimeLabel(value: string | null) {
|
||||
|
||||
function getServerVersionStatusClassName(item: ServerCommandItem | null) {
|
||||
if (!item) {
|
||||
return 'app-header__server-version-indicator--stale';
|
||||
return 'app-header__server-version-indicator--unknown';
|
||||
}
|
||||
|
||||
return item.buildRequired || item.updateAvailable
|
||||
? 'app-header__server-version-indicator--stale'
|
||||
: 'app-header__server-version-indicator--latest';
|
||||
if (item.buildRequired) {
|
||||
return 'app-header__server-version-indicator--build-required';
|
||||
}
|
||||
|
||||
if (item.updateAvailable) {
|
||||
return 'app-header__server-version-indicator--update-available';
|
||||
}
|
||||
|
||||
return 'app-header__server-version-indicator--latest';
|
||||
}
|
||||
|
||||
function getServerLastSourceChangedDateLabel(item: ServerCommandItem | null) {
|
||||
@@ -501,8 +507,12 @@ function getServerVersionStatusTitle(item: ServerCommandItem | null, label: stri
|
||||
return `${label} 최신 버전 확인 전`;
|
||||
}
|
||||
|
||||
if (item.buildRequired || item.updateAvailable) {
|
||||
return `${label} 최신 버전 아님`;
|
||||
if (item.buildRequired) {
|
||||
return `${label} 커밋 미반영 상태`;
|
||||
}
|
||||
|
||||
if (item.updateAvailable) {
|
||||
return `${label} 운영 반영 대기 상태`;
|
||||
}
|
||||
|
||||
return `${label} 최신 버전`;
|
||||
|
||||
@@ -228,7 +228,15 @@
|
||||
background: #2563eb;
|
||||
}
|
||||
|
||||
.app-header__server-version-indicator--stale {
|
||||
.app-header__server-version-indicator--unknown {
|
||||
background: #94a3b8;
|
||||
}
|
||||
|
||||
.app-header__server-version-indicator--update-available {
|
||||
background: #f59e0b;
|
||||
}
|
||||
|
||||
.app-header__server-version-indicator--build-required {
|
||||
background: #dc2626;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
ThunderboltOutlined,
|
||||
UpOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { Alert, Button, Input, Select, Spin, message } from 'antd';
|
||||
import { Alert, Button, Checkbox, Input, Select, Spin, message } from 'antd';
|
||||
import type { TextAreaRef } from 'antd/es/input/TextArea';
|
||||
import {
|
||||
useEffect,
|
||||
@@ -159,6 +159,16 @@ function buildInlinePreviewLabel(url: string) {
|
||||
}
|
||||
}
|
||||
|
||||
function buildPreviewFileName(item: PreviewOption) {
|
||||
try {
|
||||
const parsed = new URL(item.url, typeof window !== 'undefined' ? window.location.origin : 'https://local.invalid');
|
||||
const fileName = parsed.pathname.split('/').filter(Boolean).at(-1)?.trim();
|
||||
return fileName || item.label.trim() || item.url;
|
||||
} catch {
|
||||
return item.label.trim() || item.url;
|
||||
}
|
||||
}
|
||||
|
||||
async function createPreviewFetchError(response: Response): Promise<PreviewFetchError> {
|
||||
const contentType = response.headers.get('content-type')?.toLowerCase() ?? '';
|
||||
let responseMessage = '';
|
||||
@@ -750,6 +760,7 @@ export function ChatConversationView({
|
||||
const [collapsedActivityRequestIds, setCollapsedActivityRequestIds] = useState<string[]>([]);
|
||||
const [collapsibleMessageIds, setCollapsibleMessageIds] = useState<number[]>([]);
|
||||
const [showBusyOverlay, setShowBusyOverlay] = useState(false);
|
||||
const [showLatestResourceOnly, setShowLatestResourceOnly] = useState(true);
|
||||
const fileInputRef = useRef<HTMLInputElement | null>(null);
|
||||
const activitySectionRefs = useRef(new Map<string, HTMLElement>());
|
||||
const messageBodyRefs = useRef(new Map<number, HTMLDivElement>());
|
||||
@@ -808,6 +819,23 @@ export function ChatConversationView({
|
||||
return [...ordered, ...orphanActivityMessages];
|
||||
}, [visibleMessages]);
|
||||
const previewItemsByUrl = useMemo(() => new Map(previewItems.map((item) => [item.url, item])), [previewItems]);
|
||||
const visiblePreviewItems = useMemo(() => {
|
||||
if (!showLatestResourceOnly) {
|
||||
return previewItems;
|
||||
}
|
||||
|
||||
const seenFileNames = new Set<string>();
|
||||
return previewItems.filter((item) => {
|
||||
const fileName = buildPreviewFileName(item);
|
||||
|
||||
if (seenFileNames.has(fileName)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
seenFileNames.add(fileName);
|
||||
return true;
|
||||
});
|
||||
}, [previewItems, showLatestResourceOnly]);
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof document === 'undefined') {
|
||||
@@ -1150,8 +1178,19 @@ export function ChatConversationView({
|
||||
{isResourceStripOpen ? (
|
||||
<div className="app-chat-panel__resource-strip">
|
||||
{previewItems.length > 0 ? (
|
||||
<div className="app-chat-panel__resource-strip-list">
|
||||
{previewItems.map((item) => (
|
||||
<>
|
||||
<label className="app-chat-panel__resource-strip-filter">
|
||||
<Checkbox
|
||||
checked={showLatestResourceOnly}
|
||||
onChange={(event) => {
|
||||
setShowLatestResourceOnly(event.target.checked);
|
||||
}}
|
||||
>
|
||||
같은 파일명은 최종 리소스만 보기
|
||||
</Checkbox>
|
||||
</label>
|
||||
<div className="app-chat-panel__resource-strip-list">
|
||||
{visiblePreviewItems.map((item) => (
|
||||
<button
|
||||
key={item.id}
|
||||
type="button"
|
||||
@@ -1163,8 +1202,9 @@ export function ChatConversationView({
|
||||
<span>{item.label}</span>
|
||||
<span>{item.kind}</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<span className="app-chat-panel__resource-strip-empty">
|
||||
현재 대화에 바로 열 수 있는 리소스가 없습니다.
|
||||
|
||||
@@ -2,7 +2,8 @@ import { useEffect, useState } from 'react';
|
||||
|
||||
export const TOKEN_ACCESS_STORAGE_KEY = 'work-app.token-access.registered-token';
|
||||
export const TOKEN_ACCESS_SYNC_EVENT = 'work-app:token-access-changed';
|
||||
export const ALLOWED_REGISTRATION_TOKEN = 'usr_7f3a9c2d8e1b4a6f';
|
||||
export const ALLOWED_REGISTRATION_TOKEN =
|
||||
import.meta.env.VITE_ALLOWED_REGISTRATION_TOKEN?.trim() || 'usr_7f3a9c2d8e1b4a6f';
|
||||
|
||||
function normalizeToken(value: string | null | undefined) {
|
||||
return value?.trim() ?? '';
|
||||
|
||||
Reference in New Issue
Block a user