@iyulab/chat-components 0.3.0 → 0.5.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/CHANGELOG.md +146 -0
- package/README.md +133 -16
- package/dist/_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.js +9 -0
- package/dist/_virtual/_@oxc-project_runtime@0.122.0/helpers/decorateMetadata.js +6 -0
- package/dist/_virtual/_glob-assets_raw/intent-prompt.md.1907474e.js +4 -0
- package/dist/_virtual/_glob-assets_raw/view-prompt.md.e0dbcffe.js +4 -0
- package/dist/components/blocks/UCodeBlock.d.ts +24 -2
- package/dist/components/blocks/UCodeBlock.js +65 -2
- package/dist/components/blocks/UCodeBlock.styles.js +10 -4
- package/dist/components/blocks/UFileBlock.d.ts +33 -0
- package/dist/components/blocks/UFileBlock.js +154 -0
- package/dist/components/blocks/UFileBlock.styles.js +128 -0
- package/dist/components/blocks/UJsonBlock.d.ts +44 -2
- package/dist/components/blocks/UJsonBlock.js +128 -3
- package/dist/components/blocks/UJsonBlock.styles.js +4 -4
- package/dist/components/blocks/UMarkedBlock.d.ts +44 -2
- package/dist/components/blocks/UMarkedBlock.js +154 -4
- package/dist/components/blocks/UMarkedBlock.styles.js +4 -4
- package/dist/components/blocks/URefBlock.d.ts +16 -2
- package/dist/components/blocks/URefBlock.js +58 -3
- package/dist/components/blocks/URefBlock.styles.js +4 -4
- package/dist/components/blocks/UTableBlock.d.ts +52 -0
- package/dist/components/blocks/UTableBlock.js +198 -0
- package/dist/components/blocks/UTableBlock.styles.js +133 -0
- package/dist/components/blocks/UTextBlock.d.ts +36 -2
- package/dist/components/blocks/UTextBlock.js +94 -4
- package/dist/components/blocks/UTextBlock.styles.js +4 -4
- package/dist/components/blocks/UThinkBlock.d.ts +30 -2
- package/dist/components/blocks/UThinkBlock.js +86 -4
- package/dist/components/blocks/UThinkBlock.styles.js +4 -4
- package/dist/components/blocks/UToolBlock.d.ts +19 -2
- package/dist/components/blocks/UToolBlock.js +68 -3
- package/dist/components/blocks/UToolBlock.styles.js +4 -4
- package/dist/components/buttons/UAttachButton.d.ts +21 -2
- package/dist/components/buttons/UAttachButton.js +61 -3
- package/dist/components/buttons/UAttachButton.styles.js +4 -4
- package/dist/components/buttons/UCopyButton.d.ts +19 -2
- package/dist/components/buttons/UCopyButton.js +57 -3
- package/dist/components/buttons/UCopyButton.styles.js +4 -4
- package/dist/components/buttons/UVoteButton.d.ts +14 -3
- package/dist/components/buttons/UVoteButton.js +62 -3
- package/dist/components/buttons/UVoteButton.styles.js +4 -4
- package/dist/components/intents/UQuestionIntent.d.ts +22 -0
- package/dist/components/intents/UQuestionIntent.js +41 -0
- package/dist/components/intents/UQuestionIntent.styles.js +43 -0
- package/dist/components/message/UMessage.d.ts +18 -2
- package/dist/components/message/UMessage.js +47 -2
- package/dist/components/message/UMessage.styles.js +42 -15
- package/dist/components/prompt/UPrompt.d.ts +32 -2
- package/dist/components/prompt/UPrompt.js +118 -2
- package/dist/components/prompt/UPrompt.styles.js +43 -5
- package/dist/components/references/URefCard.d.ts +30 -2
- package/dist/components/references/URefCard.js +97 -2
- package/dist/components/references/URefCard.styles.js +4 -4
- package/dist/components/references/URefCardGroup.d.ts +25 -2
- package/dist/components/references/URefCardGroup.js +69 -4
- package/dist/components/references/URefCardGroup.styles.js +4 -4
- package/dist/components/references/URefTag.d.ts +12 -2
- package/dist/components/references/URefTag.js +37 -2
- package/dist/components/references/URefTag.styles.js +4 -4
- package/dist/components/views/UChartView.d.ts +39 -0
- package/dist/components/views/UChartView.js +167 -0
- package/dist/components/views/UChartView.styles.js +86 -0
- package/dist/components/views/UImagesView.d.ts +33 -0
- package/dist/components/views/UImagesView.js +144 -0
- package/dist/components/views/UImagesView.styles.d.ts +1 -0
- package/dist/components/views/UImagesView.styles.js +219 -0
- package/dist/components/views/UMapView.d.ts +24 -0
- package/dist/components/views/UMapView.js +45 -0
- package/dist/components/views/UMapView.styles.d.ts +1 -0
- package/dist/components/views/UMapView.styles.js +47 -0
- package/dist/components/views/UVideoView.d.ts +25 -0
- package/dist/components/views/UVideoView.js +81 -0
- package/dist/components/views/UVideoView.styles.d.ts +1 -0
- package/dist/components/views/UVideoView.styles.js +36 -0
- package/dist/components/views/UView.d.ts +46 -0
- package/dist/components/views/UView.js +113 -0
- package/dist/components/views/UView.styles.d.ts +1 -0
- package/dist/components/views/UView.styles.js +33 -0
- package/dist/events/AttachEvent.d.ts +9 -0
- package/dist/events/ChoiceEvent.d.ts +9 -0
- package/dist/events/SendEvent.d.ts +7 -0
- package/dist/events/StopEvent.d.ts +7 -0
- package/dist/index.d.ts +15 -6
- package/dist/index.js +28 -38
- package/dist/react/UAttachButton.d.ts +11 -0
- package/dist/react/UAttachButton.js +12 -0
- package/dist/react/UChartView.d.ts +9 -0
- package/dist/react/UChartView.js +10 -0
- package/dist/react/UCodeBlock.d.ts +9 -0
- package/dist/react/UCodeBlock.js +10 -0
- package/dist/react/UCopyButton.d.ts +9 -0
- package/dist/react/UCopyButton.js +10 -0
- package/dist/react/UFileBlock.d.ts +11 -0
- package/dist/react/UFileBlock.js +12 -0
- package/dist/react/UImagesView.d.ts +9 -0
- package/dist/react/UImagesView.js +10 -0
- package/dist/react/UJsonBlock.d.ts +9 -0
- package/dist/react/UJsonBlock.js +10 -0
- package/dist/react/UMapView.d.ts +9 -0
- package/dist/react/UMapView.js +10 -0
- package/dist/react/UMarkedBlock.d.ts +9 -0
- package/dist/react/UMarkedBlock.js +10 -0
- package/dist/react/UMessage.d.ts +9 -0
- package/dist/react/UMessage.js +10 -0
- package/dist/react/UPrompt.d.ts +13 -0
- package/dist/react/UPrompt.js +13 -0
- package/dist/react/UQuestionIntent.d.ts +11 -0
- package/dist/react/UQuestionIntent.js +12 -0
- package/dist/react/URefBlock.d.ts +9 -0
- package/dist/react/URefBlock.js +10 -0
- package/dist/react/URefCard.d.ts +9 -0
- package/dist/react/URefCard.js +10 -0
- package/dist/react/URefCardGroup.d.ts +9 -0
- package/dist/react/URefCardGroup.js +10 -0
- package/dist/react/URefTag.d.ts +9 -0
- package/dist/react/URefTag.js +10 -0
- package/dist/react/UTableBlock.d.ts +9 -0
- package/dist/react/UTableBlock.js +10 -0
- package/dist/react/UTextBlock.d.ts +9 -0
- package/dist/react/UTextBlock.js +10 -0
- package/dist/react/UThinkBlock.d.ts +9 -0
- package/dist/react/UThinkBlock.js +10 -0
- package/dist/react/UToolBlock.d.ts +9 -0
- package/dist/react/UToolBlock.js +10 -0
- package/dist/react/UVideoView.d.ts +9 -0
- package/dist/react/UVideoView.js +10 -0
- package/dist/react/UView.d.ts +9 -0
- package/dist/react/UView.js +10 -0
- package/dist/react/UVoteButton.d.ts +9 -0
- package/dist/react/UVoteButton.js +10 -0
- package/dist/react/index.d.ts +23 -0
- package/dist/react/index.js +23 -0
- package/dist/types/BlockItem.d.ts +21 -1
- package/dist/types/Intents.d.ts +26 -0
- package/dist/types/Intents.js +30 -0
- package/dist/types/JsonSchema.d.ts +59 -0
- package/dist/types/Views.d.ts +34 -0
- package/dist/types/Views.js +150 -0
- package/dist/utilities/IntentPromptBuilder.d.ts +40 -0
- package/dist/utilities/IntentPromptBuilder.js +95 -0
- package/dist/utilities/ViewPromptBuilder.d.ts +28 -0
- package/dist/utilities/ViewPromptBuilder.js +76 -0
- package/dist/utilities/dom-agent/DOMAgent.d.ts +74 -0
- package/dist/utilities/dom-agent/DOMController.d.ts +78 -0
- package/dist/utilities/dom-agent/DOMPromptBuilder.d.ts +54 -0
- package/dist/utilities/dom-agent/DOMScanner.d.ts +83 -0
- package/dist/utilities/dom-agent/index.d.ts +9 -0
- package/dist/utilities/dom-agent/types.d.ts +209 -0
- package/package.json +34 -18
- package/dist/components/blocks/UCodeBlock.component.d.ts +0 -23
- package/dist/components/blocks/UCodeBlock.component.js +0 -76
- package/dist/components/blocks/UJsonBlock.component.d.ts +0 -45
- package/dist/components/blocks/UJsonBlock.component.js +0 -140
- package/dist/components/blocks/UMarkedBlock.component.d.ts +0 -45
- package/dist/components/blocks/UMarkedBlock.component.js +0 -129
- package/dist/components/blocks/URefBlock.component.d.ts +0 -17
- package/dist/components/blocks/URefBlock.component.js +0 -74
- package/dist/components/blocks/UTextBlock.component.d.ts +0 -37
- package/dist/components/blocks/UTextBlock.component.js +0 -123
- package/dist/components/blocks/UThinkBlock.component.d.ts +0 -23
- package/dist/components/blocks/UThinkBlock.component.js +0 -90
- package/dist/components/blocks/UToolBlock.component.d.ts +0 -20
- package/dist/components/blocks/UToolBlock.component.js +0 -80
- package/dist/components/buttons/UAttachButton.component.d.ts +0 -22
- package/dist/components/buttons/UAttachButton.component.js +0 -89
- package/dist/components/buttons/UCopyButton.component.d.ts +0 -20
- package/dist/components/buttons/UCopyButton.component.js +0 -81
- package/dist/components/buttons/UReportButton.component.d.ts +0 -9
- package/dist/components/buttons/UReportButton.component.js +0 -36
- package/dist/components/buttons/UReportButton.d.ts +0 -7
- package/dist/components/buttons/UReportButton.js +0 -5
- package/dist/components/buttons/UReportButton.styles.js +0 -14
- package/dist/components/buttons/URetryButton.component.d.ts +0 -11
- package/dist/components/buttons/URetryButton.component.js +0 -53
- package/dist/components/buttons/URetryButton.d.ts +0 -7
- package/dist/components/buttons/URetryButton.js +0 -5
- package/dist/components/buttons/URetryButton.styles.js +0 -26
- package/dist/components/buttons/UShareButton.component.d.ts +0 -9
- package/dist/components/buttons/UShareButton.component.js +0 -36
- package/dist/components/buttons/UShareButton.d.ts +0 -7
- package/dist/components/buttons/UShareButton.js +0 -5
- package/dist/components/buttons/UShareButton.styles.js +0 -14
- package/dist/components/buttons/UVoteButton.component.d.ts +0 -15
- package/dist/components/buttons/UVoteButton.component.js +0 -70
- package/dist/components/loaders/UDotLoader.component.d.ts +0 -9
- package/dist/components/loaders/UDotLoader.component.js +0 -23
- package/dist/components/loaders/UDotLoader.d.ts +0 -7
- package/dist/components/loaders/UDotLoader.js +0 -5
- package/dist/components/loaders/UDotLoader.styles.js +0 -50
- package/dist/components/message/UMessage.component.d.ts +0 -19
- package/dist/components/message/UMessage.component.js +0 -90
- package/dist/components/prompt/UPrompt.component.d.ts +0 -25
- package/dist/components/prompt/UPrompt.component.js +0 -113
- package/dist/components/references/URefCard.component.d.ts +0 -24
- package/dist/components/references/URefCard.component.js +0 -105
- package/dist/components/references/URefCardGroup.component.d.ts +0 -25
- package/dist/components/references/URefCardGroup.component.js +0 -88
- package/dist/components/references/URefTag.component.d.ts +0 -13
- package/dist/components/references/URefTag.component.js +0 -54
- package/dist/events/UCancelEvent.d.ts +0 -6
- package/dist/events/USubmitEvent.d.ts +0 -6
- package/dist/utilities/converters.d.ts +0 -9
- package/dist/utilities/converters.js +0 -19
- /package/dist/components/{buttons/UReportButton.styles.d.ts → blocks/UFileBlock.styles.d.ts} +0 -0
- /package/dist/components/{buttons/URetryButton.styles.d.ts → blocks/UTableBlock.styles.d.ts} +0 -0
- /package/dist/components/{buttons/UShareButton.styles.d.ts → intents/UQuestionIntent.styles.d.ts} +0 -0
- /package/dist/components/{loaders/UDotLoader.styles.d.ts → views/UChartView.styles.d.ts} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UChartView } from '../components/views/UChartView.js';
|
|
4
|
+
|
|
5
|
+
export const UChartView = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-chart-view',
|
|
8
|
+
elementClass: UChartView,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UCodeBlock as UCodeBlockElement } from '../components/blocks/UCodeBlock';
|
|
3
|
+
|
|
4
|
+
export declare const UCodeBlock: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UCodeBlockElement> & React.HTMLAttributes<UCodeBlockElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type UCodeBlockProps = React.ComponentProps<typeof UCodeBlock>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UCodeBlock } from '../components/blocks/UCodeBlock.js';
|
|
4
|
+
|
|
5
|
+
export const UCodeBlock = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-code-block',
|
|
8
|
+
elementClass: UCodeBlock,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UCopyButton as UCopyButtonElement } from '../components/buttons/UCopyButton';
|
|
3
|
+
|
|
4
|
+
export declare const UCopyButton: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UCopyButtonElement> & React.HTMLAttributes<UCopyButtonElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type UCopyButtonProps = React.ComponentProps<typeof UCopyButton>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UCopyButton } from '../components/buttons/UCopyButton.js';
|
|
4
|
+
|
|
5
|
+
export const UCopyButton = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-copy-button',
|
|
8
|
+
elementClass: UCopyButton,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UFileBlock as UFileBlockElement } from '../components/blocks/UFileBlock';
|
|
3
|
+
import { type RemoveEventDetail } from '../components/blocks/@iyulab/components/dist/events/RemoveEvent';
|
|
4
|
+
|
|
5
|
+
export declare const UFileBlock: React.ForwardRefExoticComponent<
|
|
6
|
+
Partial<UFileBlockElement> & React.HTMLAttributes<UFileBlockElement> & {
|
|
7
|
+
onRemove?: (event: CustomEvent<RemoveEventDetail>) => void;
|
|
8
|
+
}
|
|
9
|
+
>;
|
|
10
|
+
|
|
11
|
+
export type UFileBlockProps = React.ComponentProps<typeof UFileBlock>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UFileBlock } from '../components/blocks/UFileBlock.js';
|
|
4
|
+
|
|
5
|
+
export const UFileBlock = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-file-block',
|
|
8
|
+
elementClass: UFileBlock,
|
|
9
|
+
events: {
|
|
10
|
+
onRemove: 'remove',
|
|
11
|
+
},
|
|
12
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UImagesView as UImagesViewElement } from '../components/views/UImagesView';
|
|
3
|
+
|
|
4
|
+
export declare const UImagesView: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UImagesViewElement> & React.HTMLAttributes<UImagesViewElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type UImagesViewProps = React.ComponentProps<typeof UImagesView>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UImagesView } from '../components/views/UImagesView.js';
|
|
4
|
+
|
|
5
|
+
export const UImagesView = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-images-view',
|
|
8
|
+
elementClass: UImagesView,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UJsonBlock as UJsonBlockElement } from '../components/blocks/UJsonBlock';
|
|
3
|
+
|
|
4
|
+
export declare const UJsonBlock: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UJsonBlockElement> & React.HTMLAttributes<UJsonBlockElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type UJsonBlockProps = React.ComponentProps<typeof UJsonBlock>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UJsonBlock } from '../components/blocks/UJsonBlock.js';
|
|
4
|
+
|
|
5
|
+
export const UJsonBlock = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-json-block',
|
|
8
|
+
elementClass: UJsonBlock,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UMapView as UMapViewElement } from '../components/views/UMapView';
|
|
3
|
+
|
|
4
|
+
export declare const UMapView: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UMapViewElement> & React.HTMLAttributes<UMapViewElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type UMapViewProps = React.ComponentProps<typeof UMapView>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UMapView } from '../components/views/UMapView.js';
|
|
4
|
+
|
|
5
|
+
export const UMapView = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-map-view',
|
|
8
|
+
elementClass: UMapView,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UMarkedBlock as UMarkedBlockElement } from '../components/blocks/UMarkedBlock';
|
|
3
|
+
|
|
4
|
+
export declare const UMarkedBlock: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UMarkedBlockElement> & React.HTMLAttributes<UMarkedBlockElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type UMarkedBlockProps = React.ComponentProps<typeof UMarkedBlock>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UMarkedBlock } from '../components/blocks/UMarkedBlock.js';
|
|
4
|
+
|
|
5
|
+
export const UMarkedBlock = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-marked-block',
|
|
8
|
+
elementClass: UMarkedBlock,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UMessage as UMessageElement } from '../components/message/UMessage';
|
|
3
|
+
|
|
4
|
+
export declare const UMessage: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UMessageElement> & React.HTMLAttributes<UMessageElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type UMessageProps = React.ComponentProps<typeof UMessage>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UMessage } from '../components/message/UMessage.js';
|
|
4
|
+
|
|
5
|
+
export const UMessage = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-message',
|
|
8
|
+
elementClass: UMessage,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UPrompt as UPromptElement } from '../components/prompt/UPrompt';
|
|
3
|
+
import { type StopEventDetail } from '../events/StopEvent';
|
|
4
|
+
import { type SendEventDetail } from '../events/SendEvent';
|
|
5
|
+
|
|
6
|
+
export declare const UPrompt: React.ForwardRefExoticComponent<
|
|
7
|
+
Partial<UPromptElement> & React.HTMLAttributes<UPromptElement> & {
|
|
8
|
+
onStop?: (event: CustomEvent<StopEventDetail>) => void;
|
|
9
|
+
onSend?: (event: CustomEvent<SendEventDetail>) => void;
|
|
10
|
+
}
|
|
11
|
+
>;
|
|
12
|
+
|
|
13
|
+
export type UPromptProps = React.ComponentProps<typeof UPrompt>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UPrompt } from '../components/prompt/UPrompt.js';
|
|
4
|
+
|
|
5
|
+
export const UPrompt = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-prompt',
|
|
8
|
+
elementClass: UPrompt,
|
|
9
|
+
events: {
|
|
10
|
+
onStop: 'stop',
|
|
11
|
+
onSend: 'send',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UQuestionIntent as UQuestionIntentElement } from '../components/intents/UQuestionIntent';
|
|
3
|
+
import { type ChoiceEventDetail } from '../events/ChoiceEvent';
|
|
4
|
+
|
|
5
|
+
export declare const UQuestionIntent: React.ForwardRefExoticComponent<
|
|
6
|
+
Partial<UQuestionIntentElement> & React.HTMLAttributes<UQuestionIntentElement> & {
|
|
7
|
+
onChoice?: (event: CustomEvent<ChoiceEventDetail>) => void;
|
|
8
|
+
}
|
|
9
|
+
>;
|
|
10
|
+
|
|
11
|
+
export type UQuestionIntentProps = React.ComponentProps<typeof UQuestionIntent>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UQuestionIntent } from '../components/intents/UQuestionIntent.js';
|
|
4
|
+
|
|
5
|
+
export const UQuestionIntent = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-question-intent',
|
|
8
|
+
elementClass: UQuestionIntent,
|
|
9
|
+
events: {
|
|
10
|
+
onChoice: 'choice',
|
|
11
|
+
},
|
|
12
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { URefBlock as URefBlockElement } from '../components/blocks/URefBlock';
|
|
3
|
+
|
|
4
|
+
export declare const URefBlock: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<URefBlockElement> & React.HTMLAttributes<URefBlockElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type URefBlockProps = React.ComponentProps<typeof URefBlock>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { URefBlock } from '../components/blocks/URefBlock.js';
|
|
4
|
+
|
|
5
|
+
export const URefBlock = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-ref-block',
|
|
8
|
+
elementClass: URefBlock,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { URefCard as URefCardElement } from '../components/references/URefCard';
|
|
3
|
+
|
|
4
|
+
export declare const URefCard: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<URefCardElement> & React.HTMLAttributes<URefCardElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type URefCardProps = React.ComponentProps<typeof URefCard>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { URefCard } from '../components/references/URefCard.js';
|
|
4
|
+
|
|
5
|
+
export const URefCard = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-ref-card',
|
|
8
|
+
elementClass: URefCard,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { URefCardGroup as URefCardGroupElement } from '../components/references/URefCardGroup';
|
|
3
|
+
|
|
4
|
+
export declare const URefCardGroup: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<URefCardGroupElement> & React.HTMLAttributes<URefCardGroupElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type URefCardGroupProps = React.ComponentProps<typeof URefCardGroup>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { URefCardGroup } from '../components/references/URefCardGroup.js';
|
|
4
|
+
|
|
5
|
+
export const URefCardGroup = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-ref-card-group',
|
|
8
|
+
elementClass: URefCardGroup,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { URefTag as URefTagElement } from '../components/references/URefTag';
|
|
3
|
+
|
|
4
|
+
export declare const URefTag: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<URefTagElement> & React.HTMLAttributes<URefTagElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type URefTagProps = React.ComponentProps<typeof URefTag>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { URefTag } from '../components/references/URefTag.js';
|
|
4
|
+
|
|
5
|
+
export const URefTag = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-ref-tag',
|
|
8
|
+
elementClass: URefTag,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UTableBlock as UTableBlockElement } from '../components/blocks/UTableBlock';
|
|
3
|
+
|
|
4
|
+
export declare const UTableBlock: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UTableBlockElement> & React.HTMLAttributes<UTableBlockElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type UTableBlockProps = React.ComponentProps<typeof UTableBlock>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UTableBlock } from '../components/blocks/UTableBlock.js';
|
|
4
|
+
|
|
5
|
+
export const UTableBlock = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-table-block',
|
|
8
|
+
elementClass: UTableBlock,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UTextBlock as UTextBlockElement } from '../components/blocks/UTextBlock';
|
|
3
|
+
|
|
4
|
+
export declare const UTextBlock: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UTextBlockElement> & React.HTMLAttributes<UTextBlockElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type UTextBlockProps = React.ComponentProps<typeof UTextBlock>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UTextBlock } from '../components/blocks/UTextBlock.js';
|
|
4
|
+
|
|
5
|
+
export const UTextBlock = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-text-block',
|
|
8
|
+
elementClass: UTextBlock,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UThinkBlock as UThinkBlockElement } from '../components/blocks/UThinkBlock';
|
|
3
|
+
|
|
4
|
+
export declare const UThinkBlock: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UThinkBlockElement> & React.HTMLAttributes<UThinkBlockElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type UThinkBlockProps = React.ComponentProps<typeof UThinkBlock>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UThinkBlock } from '../components/blocks/UThinkBlock.js';
|
|
4
|
+
|
|
5
|
+
export const UThinkBlock = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-think-block',
|
|
8
|
+
elementClass: UThinkBlock,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UToolBlock as UToolBlockElement } from '../components/blocks/UToolBlock';
|
|
3
|
+
|
|
4
|
+
export declare const UToolBlock: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UToolBlockElement> & React.HTMLAttributes<UToolBlockElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type UToolBlockProps = React.ComponentProps<typeof UToolBlock>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UToolBlock } from '../components/blocks/UToolBlock.js';
|
|
4
|
+
|
|
5
|
+
export const UToolBlock = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-tool-block',
|
|
8
|
+
elementClass: UToolBlock,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UVideoView as UVideoViewElement } from '../components/views/UVideoView';
|
|
3
|
+
|
|
4
|
+
export declare const UVideoView: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UVideoViewElement> & React.HTMLAttributes<UVideoViewElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type UVideoViewProps = React.ComponentProps<typeof UVideoView>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UVideoView } from '../components/views/UVideoView.js';
|
|
4
|
+
|
|
5
|
+
export const UVideoView = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-video-view',
|
|
8
|
+
elementClass: UVideoView,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UView as UViewElement } from '../components/views/UView';
|
|
3
|
+
|
|
4
|
+
export declare const UView: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UViewElement> & React.HTMLAttributes<UViewElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type UViewProps = React.ComponentProps<typeof UView>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UVoteButton as UVoteButtonElement } from '../components/buttons/UVoteButton';
|
|
3
|
+
|
|
4
|
+
export declare const UVoteButton: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UVoteButtonElement> & React.HTMLAttributes<UVoteButtonElement> & {
|
|
6
|
+
}
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export type UVoteButtonProps = React.ComponentProps<typeof UVoteButton>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UVoteButton } from '../components/buttons/UVoteButton.js';
|
|
4
|
+
|
|
5
|
+
export const UVoteButton = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-vote-button',
|
|
8
|
+
elementClass: UVoteButton,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { UView, UViewProps } from './UView';
|
|
2
|
+
export { UVideoView, UVideoViewProps } from './UVideoView';
|
|
3
|
+
export { UMapView, UMapViewProps } from './UMapView';
|
|
4
|
+
export { UImagesView, UImagesViewProps } from './UImagesView';
|
|
5
|
+
export { UChartView, UChartViewProps } from './UChartView';
|
|
6
|
+
export { URefTag, URefTagProps } from './URefTag';
|
|
7
|
+
export { URefCardGroup, URefCardGroupProps } from './URefCardGroup';
|
|
8
|
+
export { URefCard, URefCardProps } from './URefCard';
|
|
9
|
+
export { UPrompt, UPromptProps } from './UPrompt';
|
|
10
|
+
export { UMessage, UMessageProps } from './UMessage';
|
|
11
|
+
export { UQuestionIntent, UQuestionIntentProps } from './UQuestionIntent';
|
|
12
|
+
export { UVoteButton, UVoteButtonProps } from './UVoteButton';
|
|
13
|
+
export { UCopyButton, UCopyButtonProps } from './UCopyButton';
|
|
14
|
+
export { UAttachButton, UAttachButtonProps } from './UAttachButton';
|
|
15
|
+
export { UToolBlock, UToolBlockProps } from './UToolBlock';
|
|
16
|
+
export { UThinkBlock, UThinkBlockProps } from './UThinkBlock';
|
|
17
|
+
export { UTextBlock, UTextBlockProps } from './UTextBlock';
|
|
18
|
+
export { UTableBlock, UTableBlockProps } from './UTableBlock';
|
|
19
|
+
export { URefBlock, URefBlockProps } from './URefBlock';
|
|
20
|
+
export { UMarkedBlock, UMarkedBlockProps } from './UMarkedBlock';
|
|
21
|
+
export { UJsonBlock, UJsonBlockProps } from './UJsonBlock';
|
|
22
|
+
export { UFileBlock, UFileBlockProps } from './UFileBlock';
|
|
23
|
+
export { UCodeBlock, UCodeBlockProps } from './UCodeBlock';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { UView } from './UView.js';
|
|
2
|
+
export { UVideoView } from './UVideoView.js';
|
|
3
|
+
export { UMapView } from './UMapView.js';
|
|
4
|
+
export { UImagesView } from './UImagesView.js';
|
|
5
|
+
export { UChartView } from './UChartView.js';
|
|
6
|
+
export { URefTag } from './URefTag.js';
|
|
7
|
+
export { URefCardGroup } from './URefCardGroup.js';
|
|
8
|
+
export { URefCard } from './URefCard.js';
|
|
9
|
+
export { UPrompt } from './UPrompt.js';
|
|
10
|
+
export { UMessage } from './UMessage.js';
|
|
11
|
+
export { UQuestionIntent } from './UQuestionIntent.js';
|
|
12
|
+
export { UVoteButton } from './UVoteButton.js';
|
|
13
|
+
export { UCopyButton } from './UCopyButton.js';
|
|
14
|
+
export { UAttachButton } from './UAttachButton.js';
|
|
15
|
+
export { UToolBlock } from './UToolBlock.js';
|
|
16
|
+
export { UThinkBlock } from './UThinkBlock.js';
|
|
17
|
+
export { UTextBlock } from './UTextBlock.js';
|
|
18
|
+
export { UTableBlock } from './UTableBlock.js';
|
|
19
|
+
export { URefBlock } from './URefBlock.js';
|
|
20
|
+
export { UMarkedBlock } from './UMarkedBlock.js';
|
|
21
|
+
export { UJsonBlock } from './UJsonBlock.js';
|
|
22
|
+
export { UFileBlock } from './UFileBlock.js';
|
|
23
|
+
export { UCodeBlock } from './UCodeBlock.js';
|
|
@@ -3,6 +3,8 @@ import { JsonNode } from './JsonNode';
|
|
|
3
3
|
/** LLM 추론 텍스트 블록입니다. */
|
|
4
4
|
export interface ThinkingBlockItem {
|
|
5
5
|
type: "thinking";
|
|
6
|
+
/** 추론 중 로딩 상태 여부 */
|
|
7
|
+
loading?: boolean;
|
|
6
8
|
/** 추론 텍스트 내용 */
|
|
7
9
|
value?: string;
|
|
8
10
|
}
|
|
@@ -20,9 +22,27 @@ export interface MarkdownBlockItem {
|
|
|
20
22
|
/** 마크다운 내 인용 정보 들 */
|
|
21
23
|
refs?: ReferenceCitation[];
|
|
22
24
|
}
|
|
25
|
+
/** 파일 하나의 데이터 구조입니다. */
|
|
26
|
+
export interface FileBlockItem {
|
|
27
|
+
type: "file";
|
|
28
|
+
/** 파일 상태 */
|
|
29
|
+
status?: "idle" | "uploading" | "error";
|
|
30
|
+
/** 파일 이름 */
|
|
31
|
+
name?: string;
|
|
32
|
+
/** 파일 크기 (bytes) */
|
|
33
|
+
size?: number;
|
|
34
|
+
/** MIME 타입 (예: "image/png", "application/pdf") */
|
|
35
|
+
mimeType?: string;
|
|
36
|
+
/** 다운로드 URL */
|
|
37
|
+
url?: string;
|
|
38
|
+
/** 실제 파일 데이터 (선택적, 필요에 따라 사용) */
|
|
39
|
+
data?: any;
|
|
40
|
+
}
|
|
23
41
|
/** 툴 사용 블록입니다. */
|
|
24
42
|
export interface ToolBlockItem {
|
|
25
43
|
type: "tool";
|
|
44
|
+
/** 툴 사용 중 로딩 상태 여부 */
|
|
45
|
+
loading?: boolean;
|
|
26
46
|
/** 도구 블록 제목 */
|
|
27
47
|
title?: string;
|
|
28
48
|
/** 도구 블록 입력값(json) */
|
|
@@ -39,4 +59,4 @@ export interface ReferenceBlockItem {
|
|
|
39
59
|
/**
|
|
40
60
|
* 타입별 메시지 컨텐츠 아이템
|
|
41
61
|
*/
|
|
42
|
-
export type BlockItem = (ThinkingBlockItem | TextBlockItem | MarkdownBlockItem | ToolBlockItem | ReferenceBlockItem);
|
|
62
|
+
export type BlockItem = (ThinkingBlockItem | TextBlockItem | MarkdownBlockItem | FileBlockItem | ToolBlockItem | ReferenceBlockItem);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { JsonSchema } from '../types/JsonSchema.js';
|
|
2
|
+
/** LLM에서 intent-json 블록으로 출력되는 구조입니다.*/
|
|
3
|
+
export interface IntentSchema {
|
|
4
|
+
type: string;
|
|
5
|
+
properties?: Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
/** Intent 정의 구조체 */
|
|
8
|
+
export interface IntentDefinition {
|
|
9
|
+
/** intent 식별자 (intent-json의 "type" 필드와 매칭) */
|
|
10
|
+
type: string;
|
|
11
|
+
/** LLM용 설명 */
|
|
12
|
+
description: string;
|
|
13
|
+
/** LLM용 속성 스키마 */
|
|
14
|
+
properties?: Record<string, JsonSchema>;
|
|
15
|
+
/** LLM용 필수 속성 이름 목록 */
|
|
16
|
+
required?: string[];
|
|
17
|
+
}
|
|
18
|
+
/** 프리셋 Intent 비트 플래그 */
|
|
19
|
+
export declare enum PresetIntent {
|
|
20
|
+
Questions = 1,
|
|
21
|
+
All = 1
|
|
22
|
+
}
|
|
23
|
+
/** 프리셋 Intent 목록 (비트 플래그 순서대로) */
|
|
24
|
+
export declare const PRESET_INTENT_LIST: readonly [PresetIntent];
|
|
25
|
+
/** 프리셋 Intent 정의 매핑 */
|
|
26
|
+
export declare const PRESET_INTENT_DEFINITIONS: Map<PresetIntent, IntentDefinition>;
|