@things-factory/ai-assistant 10.1.13 → 10.1.15
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/client/components/{board-ai-chat.ts → assistant-chat.ts} +547 -25
- package/client/components/chat-input-builder.ts +1 -1
- package/client/index.ts +2 -3
- package/dist-client/components/{board-ai-chat.d.ts → assistant-chat.d.ts} +24 -3
- package/dist-client/components/{board-ai-chat.js → assistant-chat.js} +557 -72
- package/dist-client/components/assistant-chat.js.map +1 -0
- package/dist-client/components/{board-ai-chat.test.js → assistant-chat.test.js} +1 -1
- package/dist-client/components/assistant-chat.test.js.map +1 -0
- package/dist-client/components/chat-input-builder.js +1 -1
- package/dist-client/components/chat-input-builder.js.map +1 -1
- package/dist-client/index.d.ts +2 -3
- package/dist-client/index.js +2 -3
- package/dist-client/index.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/assistant-chat-resolver.js +12 -0
- package/dist-server/service/assistant-chat-resolver.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/server/service/assistant-chat-resolver.ts +13 -0
- package/test/assistant-request-context.test.ts +1 -1
- package/test/assistant-session-toolbar.test.ts +1 -1
- package/translations/en.json +6 -1
- package/translations/ko.json +6 -1
- package/dist-client/components/board-ai-chat.js.map +0 -1
- package/dist-client/components/board-ai-chat.test.js.map +0 -1
- /package/client/components/{board-ai-chat.test.ts → assistant-chat.test.ts} +0 -0
- /package/dist-client/components/{board-ai-chat.test.d.ts → assistant-chat.test.d.ts} +0 -0
|
@@ -96,7 +96,7 @@ export interface AssistantChatInputArgs {
|
|
|
96
96
|
*/
|
|
97
97
|
export function buildAssistantChatInput(args: AssistantChatInputArgs): Record<string, any> {
|
|
98
98
|
if (!args.systemPrompt?.trim()) {
|
|
99
|
-
throw new Error('[ox-
|
|
99
|
+
throw new Error('[ox-assistant-chat] systemPrompt is required when the chat talks to assistantChat')
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
return {
|
package/client/index.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `@things-factory/ai-assistant` — 대화면.
|
|
3
3
|
*
|
|
4
|
-
* `<ox-
|
|
5
|
-
* 박혀 있고, 그것을 같은 커밋에서 함께 바꾸면 무엇이 깨졌는지 못 가린다. 이름은 별도로 옮긴다.
|
|
4
|
+
* 표준 컴포넌트는 `<ox-assistant-chat>` 이다.
|
|
6
5
|
*/
|
|
7
|
-
export * from './components/
|
|
6
|
+
export * from './components/assistant-chat.js'
|
|
8
7
|
export * from './components/chat-defaults.js'
|
|
9
8
|
export * from './components/markdown.js'
|
|
10
9
|
export * from './components/chat-echo-dedup.js'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* <ox-
|
|
2
|
+
* <ox-assistant-chat> — AI 도우미 채팅 컴포넌트 (Lit).
|
|
3
3
|
*
|
|
4
4
|
* 입력:
|
|
5
5
|
* - sessionId: 영속 ChatSession 식별자 (없으면 ad-hoc 모드, 메시지 영속 안 됨)
|
|
@@ -19,7 +19,16 @@ import { type AssistantRequestContext } from '../utils/assistant-request-context
|
|
|
19
19
|
import { LitElement } from 'lit';
|
|
20
20
|
import './mention-popup.js';
|
|
21
21
|
import { type FilterResult } from './mention-popup.js';
|
|
22
|
-
export
|
|
22
|
+
export interface ChatAttachment {
|
|
23
|
+
id: string;
|
|
24
|
+
file: File;
|
|
25
|
+
name: string;
|
|
26
|
+
size: number;
|
|
27
|
+
type: string;
|
|
28
|
+
url: string;
|
|
29
|
+
base64?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare class OxAssistantChat extends LitElement {
|
|
23
32
|
/** 영속 세션 id. 없으면 ad-hoc (메시지 영속 안 됨). */
|
|
24
33
|
sessionId?: string;
|
|
25
34
|
prepareSession?: (adopt: (id: string) => void) => Promise<string | undefined>;
|
|
@@ -182,6 +191,17 @@ export declare class OxBoardAIChat extends LitElement {
|
|
|
182
191
|
private lastFailedInput?;
|
|
183
192
|
/** 되돌려진 patch id 들 — 한 번 revert 한 patch 는 버튼 비활성 */
|
|
184
193
|
private revertedPatchIds;
|
|
194
|
+
/** 첨부된 파일/이미지 목록 */
|
|
195
|
+
private attachments;
|
|
196
|
+
/** 드래그 오버 상태 (시각 피드백용) */
|
|
197
|
+
private dragOver;
|
|
198
|
+
private onAttachFiles;
|
|
199
|
+
private readFileAsBase64;
|
|
200
|
+
private removeAttachment;
|
|
201
|
+
private onComposerPaste;
|
|
202
|
+
private onComposerDragOver;
|
|
203
|
+
private onComposerDragLeave;
|
|
204
|
+
private onComposerDrop;
|
|
185
205
|
/** mini action — 인라인 예시 토글 */
|
|
186
206
|
private examplesOpen;
|
|
187
207
|
/** 복사 toast 표시 상태 */
|
|
@@ -365,6 +385,7 @@ export declare class OxBoardAIChat extends LitElement {
|
|
|
365
385
|
* 실행 결과는 호스트가 **대화에 기록**한다 — 누가 무엇을 실행했는지가 협의 이력에 남아야 한다.
|
|
366
386
|
*/
|
|
367
387
|
private renderProposals;
|
|
388
|
+
private onChoiceClick;
|
|
368
389
|
/**
|
|
369
390
|
* 제안 식별 키 — 같은 조치를 두 번 실행하지 않도록 **효과**(명령·대상·인자)로만 만든다.
|
|
370
391
|
*
|
|
@@ -432,6 +453,6 @@ export declare class OxBoardAIChat extends LitElement {
|
|
|
432
453
|
}
|
|
433
454
|
declare global {
|
|
434
455
|
interface HTMLElementTagNameMap {
|
|
435
|
-
'ox-
|
|
456
|
+
'ox-assistant-chat': OxAssistantChat;
|
|
436
457
|
}
|
|
437
458
|
}
|