@smarter.sh/ui-chat 0.7.0 → 0.8.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/README.md +274 -139
- package/dist/smarter-chat-library.es.js +2208 -1841
- package/dist/smarter-chat-library.es.js.map +1 -1
- package/dist/smarter-chat-library.umd.js +38 -38
- package/dist/smarter-chat-library.umd.js.map +1 -1
- package/dist/types/src/components/DocsDialog/Component.d.ts +8 -0
- package/dist/types/src/components/DocsDialog/data.d.ts +18 -0
- package/dist/types/src/components/DocsDialog/index.d.ts +2 -0
- package/dist/types/src/components/SmarterChat/Component.d.ts +6 -2
- package/dist/types/src/components/SmarterChat/icons.d.ts +2 -0
- package/dist/types/src/contract.gen.d.ts +1202 -0
- package/dist/types/src/index.d.ts +2 -1
- package/dist/types/src/lib/api.d.ts +29 -6
- package/dist/types/src/lib/messages.d.ts +1 -1
- package/dist/types/src/lib/styles.d.ts +40 -0
- package/dist/types/src/types.d.ts +28 -63
- package/dist/ui-chat.css +1 -1
- package/package.json +4 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type DocSection } from "@/components/DocsDialog/data";
|
|
2
|
+
import "@/components/DocsDialog/styles.css";
|
|
3
|
+
interface DocsDialogProps {
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
sections?: DocSection[];
|
|
6
|
+
}
|
|
7
|
+
declare function DocsDialog({ onClose, sections }: DocsDialogProps): import("react").JSX.Element;
|
|
8
|
+
export default DocsDialog;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** A technical reference that the Docs dialog links to. */
|
|
2
|
+
export interface DocLink {
|
|
3
|
+
title: string;
|
|
4
|
+
url: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}
|
|
7
|
+
/** A tab of the Docs dialog: the technical references for one audience. */
|
|
8
|
+
export interface DocSection {
|
|
9
|
+
title: string;
|
|
10
|
+
description: string;
|
|
11
|
+
links: DocLink[];
|
|
12
|
+
}
|
|
13
|
+
/** The technical references for prompt engineers, who build LLMClients in the sandbox. */
|
|
14
|
+
export declare const PROMPT_ENGINEER_LINKS: DocLink[];
|
|
15
|
+
/** The technical references for software engineers, who build the applications that host them. */
|
|
16
|
+
export declare const SOFTWARE_ENGINEER_LINKS: DocLink[];
|
|
17
|
+
/** The tabs of the Docs dialog, from left to right. The first one is selected when it opens. */
|
|
18
|
+
export declare const DOC_SECTIONS: DocSection[];
|
|
@@ -12,9 +12,13 @@
|
|
|
12
12
|
* The user can resize the chat and the Console by dragging the separator between them, and can
|
|
13
13
|
* hide the Console, which slides out to the right. In sandbox mode, the thread also displays
|
|
14
14
|
* Smarter's system, tool and meta data messages. In production mode, it displays only the
|
|
15
|
-
* conversation, as the LLMClient's users see it. The Console's server logs follow the mode: DEBUG
|
|
15
|
+
* conversation, as the LLMClient's users see it, and the Console and its toggle button are hidden. The Console's server logs follow the mode: DEBUG
|
|
16
16
|
* and above in sandbox mode, and the server's own log level in production mode. A new chat also
|
|
17
|
-
* clears the Console's server logs.
|
|
17
|
+
* clears the Console's server logs. Sandbox mode also has a Docs button, which opens a dialog of
|
|
18
|
+
* links to the technical references for prompt engineers and software engineers.
|
|
19
|
+
*
|
|
20
|
+
* The LLMClient's styles (its manifest's spec.config.styles) set its logo, which is displayed in
|
|
21
|
+
* the header, its avatars, its background image, its fonts and its colors. See lib/styles.ts.
|
|
18
22
|
*
|
|
19
23
|
* This is the component that the @smarter.sh/ui-chat npm package exports, and that the Smarter web
|
|
20
24
|
* console's LLMClient prompt workbench renders. See main.tsx.
|
|
@@ -15,3 +15,5 @@ export declare function ConsoleIcon({ visible }: {
|
|
|
15
15
|
export declare function SandboxIcon(): import("react").JSX.Element;
|
|
16
16
|
/** A shield: production mode, which displays the conversation only, as its users see it. (bi-shield-check) */
|
|
17
17
|
export declare function ProductionIcon(): import("react").JSX.Element;
|
|
18
|
+
/** An open book: the Docs dialog, which links to the technical references. (bi-book) */
|
|
19
|
+
export declare function DocsIcon(): import("react").JSX.Element;
|