@ykurilov/agent-chat-react 0.74.0 → 0.76.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  voiceAnswerIds,
30
30
  voiceErrorText,
31
31
  withoutResetSteps
32
- } from "./chunk-I764HZRF.js";
32
+ } from "./chunk-LF723Y52.js";
33
33
 
34
34
  // src/chat-list/chat-workspace.tsx
35
35
  import { useCallback, useEffect, useRef, useState } from "react";
package/dist/panel.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  useChatList,
7
7
  useChatListView,
8
8
  useWorkspaceListSync
9
- } from "./chunk-I764HZRF.js";
9
+ } from "./chunk-LF723Y52.js";
10
10
 
11
11
  // src/agent-panel/agent-panel-provider.tsx
12
12
  import { useCallback as useCallback2, useMemo, useRef, useState, useSyncExternalStore as useSyncExternalStore2 } from "react";
@@ -1,9 +1,10 @@
1
1
  import type { ComposerOptions } from "./composer-options.js";
2
+ import type { ReactNode } from "react";
2
3
  import type { AgentChatMessage, ChatModelChoice } from "./chat-types.js";
3
4
  import type { AgentChatExtensions } from "./agent-chat-extensions.js";
4
5
  import type { AnswerEditing } from "./answer-editing/answer-editing.js";
5
6
  import type { AttachmentsPlugin } from "./attachments-contract.js";
6
- import type { ChatSkin } from "./skin-contract.js";
7
+ import type { ChatHeaderView, ChatSkin } from "./skin-contract.js";
7
8
  import type { VoiceInput } from "./voice-input.js";
8
9
  import type { VoiceDialogEngine } from "./voice-dialog.js";
9
10
  import type { AppRefusal } from "./app-refusal.js";
@@ -16,6 +17,10 @@ import type { AppEventHandler } from "./app-events.js";
16
17
  import type { TurnFinishedEvent } from "./turn-finished.js";
17
18
  import type { ChatStateValues } from "./chat-state/chat-state.js";
18
19
  export interface AgentChatProps extends AgentChatExtensions {
20
+ /** Optional application heading and trailing content, rendered by the selected skin. */
21
+ header?: ChatHeaderView;
22
+ /** Application-owned result. Shown after loaded history while idle; never changes server status. Null/false removes it. */
23
+ completion?: ReactNode;
19
24
  composerOptions?: ComposerOptions;
20
25
  /** Адрес обработчика чата, например `/api/chat`. */
21
26
  api: string;
@@ -26,7 +26,7 @@ export type { StepCall, StepPhrase, StepPhrases, StepPhraseText, WorkView } from
26
26
  export { guessStepIcon, stepIconOf } from "./work-view/step-icons.js";
27
27
  export type { StepIcon } from "./work-view/step-icons.js";
28
28
  export type { SpendingInfo, SpendingPeriod, SpendingRefusalReason, SpendingScope, SpendingView, SpendingWindowInfo } from "./spending-status.js";
29
- export type { AgentNoticeViewKind, AgentNoticeViewProps, AgentVideoView, ChatOriginView, ChatSkin, CustomWidgetProps, DiagramColors, DiagramView, FormFieldView, LiveDemoColors, LiveDemoView, GeneratedImagesView, HelperCallStatus, HelperCallView, HelperStepView, MediaViewerProps, MessageActionView, ModelChoiceView, StaffMessageView, TaskCardView, TaskStatusView, ToolApprovalView, ToolCallState, VoiceInputView, WidgetView, WorkStepsView, } from "./skin-contract.js";
29
+ export type { AgentNoticeViewKind, AgentNoticeViewProps, AgentVideoView, ChatOriginView, ChatSkin, ChatHeaderView, CustomWidgetProps, DiagramColors, DiagramView, FormFieldView, LiveDemoColors, LiveDemoView, GeneratedImagesView, HelperCallStatus, HelperCallView, HelperStepView, MediaViewerProps, MessageActionView, ModelChoiceView, StaffMessageView, TaskCardView, TaskStatusView, ToolApprovalView, ToolCallState, VoiceInputView, WidgetView, WorkStepsView, } from "./skin-contract.js";
30
30
  export type { AgentAppBridge, AppDataChange, BrowserCall, BrowserCallResult, ScreenPlace } from "./app-bridge/app-bridge.js";
31
31
  export { useAgentChat } from "./use-agent-chat.js";
32
32
  export type { AppRefusal, AppRefusalKind } from "./app-refusal.js";
@@ -411,7 +411,7 @@ export interface StaffMessageView {
411
411
  staffName?: string;
412
412
  }
413
413
  /**
414
- * Договор скина, версия 30: необязательный Layout.empty. Версия 29: необязательные Composer.options, AgentMessage.modelDetails и WorkSteps.live.completed.
414
+ * Договор скина, версия 31: необязательные Layout.header и Layout.completion. Версия 30: необязательный Layout.empty. Версия 29: необязательные Composer.options, AgentMessage.modelDetails и WorkSteps.live.completed.
415
415
  * Скины 28 работают без правок. В версии 28 добавились только необязательные значки шагов и заголовки раздумий:
416
416
  * `WorkStepsView.live.icon`, `WorkStepsView.done.items`, `icons`, `moreIcons` и `Reasoning.title`, docs/skin-v28.md;
417
417
  * скин версии 27 работает без правок: шаги без значков, раздумья — «Думал N сек».
@@ -465,8 +465,17 @@ export interface StaffMessageView {
465
465
  * собирает ленту только из этих
466
466
  * компонентов и ничего своего не рисует. Надписи компоненты берут из `useChatLabels()`.
467
467
  */
468
+ /** Application-owned chat heading; skins render it in their own visual system. */
469
+ export interface ChatHeaderView {
470
+ title: string;
471
+ aside?: ReactNode;
472
+ headingLevel?: 1 | 2 | 3;
473
+ }
468
474
  export interface ChatSkin {
469
475
  Layout: ComponentType<{
476
+ header?: ChatHeaderView;
477
+ /** Application-owned result, after the feed in the same scroll root. Keep composer mounted but hidden while present. */
478
+ completion?: ReactNode;
470
479
  /** История успешно загружена, сообщений нет и ход не выполняется. Необязательная подсказка для приветствия. */
471
480
  empty?: boolean;
472
481
  feed: ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ykurilov/agent-chat-react",
3
- "version": "0.74.0",
3
+ "version": "0.76.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,