@somecat/ai-assist-sdk 1.0.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.
@@ -0,0 +1,4 @@
1
+ export type { AiAssistConfig, ViewStatus, MessageStatus, ChatMessage, ConversationItem, ConversationMessageItem, HistoryItem, PersonalInfo, } from './core/types';
2
+ export { setConfig, getConfig, request, http, createAuthAxios, } from './core/services/request';
3
+ export { createConversation, getConversationList, deleteConversation, getConversationMessages, chatQuery, stopMessage, getSuggestedQuestions, getMessageInfo, getAppConfig, getPersonalInfo, } from './core/services/api';
4
+ export { useClipboard, extractPlainText, statusText, formatQuestions, textError, processSSEData, parseSSEData, renderMarkdown, } from './core/utils';
package/dist/index.mjs ADDED
@@ -0,0 +1,26 @@
1
+ import { m as e, a as t, c as o, j as r, n, f as g, o as i, g as u, i as f, d as p, q as C, k as x, t as c, v as d, h as l, e as v, r as S, w as h, l as M, s as m, b as A, x as E, u as Q } from "./chunks/index-CGfAEdrA.mjs";
2
+ export {
3
+ e as chatQuery,
4
+ t as createAuthAxios,
5
+ o as createConversation,
6
+ r as deleteConversation,
7
+ n as extractPlainText,
8
+ g as formatQuestions,
9
+ i as getAppConfig,
10
+ u as getConfig,
11
+ f as getConversationList,
12
+ p as getConversationMessages,
13
+ C as getMessageInfo,
14
+ x as getPersonalInfo,
15
+ c as getSuggestedQuestions,
16
+ d as http,
17
+ l as parseSSEData,
18
+ v as processSSEData,
19
+ S as renderMarkdown,
20
+ h as request,
21
+ M as setConfig,
22
+ m as statusText,
23
+ A as stopMessage,
24
+ E as textError,
25
+ Q as useClipboard
26
+ };
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ declare const AiAssist: React.FC;
3
+ export default AiAssist;
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ interface AnswerProps {
3
+ defaultSayhello?: {
4
+ text1: string;
5
+ text2: string;
6
+ };
7
+ defaultRecommend?: string[];
8
+ onConversationCreated?: (id: string) => void;
9
+ }
10
+ export interface AnswerRef {
11
+ goHistoryMessage: (appConversationId: string) => void;
12
+ }
13
+ declare const Answer: React.ForwardRefExoticComponent<AnswerProps & React.RefAttributes<AnswerRef>>;
14
+ export default Answer;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ interface HistoryProps {
3
+ onHistoryDetail: (appConversationId: string) => void;
4
+ onAnswer: () => void;
5
+ onEditTitle: (text: string) => void;
6
+ }
7
+ declare const History: React.FC<HistoryProps>;
8
+ export default History;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ declare const Info: React.FC;
3
+ export default Info;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { default as AiAssist } from './components/AiAssist';
3
+ import { AiAssistConfig } from '../core/types';
4
+ export type { AiAssistConfig };
5
+ export declare const initAiAssist: (config: AiAssistConfig) => void;
6
+ export declare const mountAiAssist: (container?: HTMLElement) => void;
7
+ export declare const unmountAiAssist: () => void;
8
+ export { AiAssist };
9
+ declare const _default: {
10
+ initAiAssist: (config: AiAssistConfig) => void;
11
+ mountAiAssist: (container?: HTMLElement) => void;
12
+ unmountAiAssist: () => void;
13
+ AiAssist: React.FC<{}>;
14
+ };
15
+ export default _default;