Compare commits

6 Commits
Author SHA1 Message Date
arswarogandClaude Opus 4.7 d7bec8a5a3 chat/widget: отображение статуса подключения бота
Заменяет захардкоженное "Ready to help" на живой индикатор.
Статус берётся из поля status ответа GET /v1/status, капитализируется
и показывается справа от имени бота. Polling каждые 30с, пауза при
скрытой вкладке, recheck по клику, tooltip с API URL.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-08 07:49:03 +03:00
arswarog 06efc69250 chat/widget: отображение использованых источников 2026-08-08 07:49:03 +03:00
arswarog d04e3bfb1e chat: подключение к бекенду 2026-08-08 07:49:03 +03:00
arswarog 17b8a8e823 feat(theme): Nord-тема для Mermaid диаграмм в тёмном режиме
feat(theme): Nord mermaid только в тёмном режиме через swizzle

fix(theme): useMemo для config mermaid — убрать бесконечный ре-рендер
2026-08-08 07:39:32 +03:00
arswarog 1f71a0d815 feat(theme): тёмная тема на палитре Nord 2026-08-08 05:56:22 +03:00
arswarog 4d862b58be demo: добавление на главную "рыбы" 2026-08-08 05:55:44 +03:00
3 changed files with 22 additions and 2 deletions
+3
View File
@@ -8,10 +8,13 @@
classDiagram
class IApi
class ProductService {
+IProduct[] getProducts
}
ProductService --> IApi
Animal <|-- Duck
+18 -1
View File
@@ -20,6 +20,23 @@ export interface IChatMessage {
sources?: IChatSource[];
}
function stripNumericPrefixes(p: string): string {
return p
.split('/')
.map((seg) => seg.replace(/^\d+-/, ''))
.join('/');
}
export function sourceToUrl(file: string, anchor: string): string {
return `/${file}${anchor ? `#${anchor}` : ''}`;
let p = file.replace(/^docs\//, '').replace(/\.md$/, '');
p = stripNumericPrefixes(p);
return `/docs/${p}${anchor ? `#${anchor}` : ''}`;
}
export function sourceToPath(file: string): string {
const p = file.replace(/^docs\//, '').replace(/\.md$/, '');
return stripNumericPrefixes(p);
}
+1 -1
View File
@@ -32,7 +32,7 @@ export function Message({ role, content, sources }: MessageProps): ReactNode {
to={sourceToUrl(src.file, src.anchor)}
className={b('sourceLink')}
>
{src.heading}
{src.heading || sourceToPath(src.file)}
</Link>
))}
</div>