@agentica/chat 0.44.0-dev.20260313 → 0.44.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/LICENSE +21 -21
- package/README.md +218 -218
- package/dist/assets/VendorConfigurationMovie-EWdPNego.js +2084 -0
- package/dist/assets/bbs/index-C41Fyr_2.js +2 -0
- package/dist/assets/shopping/{index.html-BG-EZSvQ.js → index.html-Cc68Vgxi.js} +1 -1
- package/dist/assets/uploader/{index.html-xsq3E3-m.js → index.html-Ck-EBUdZ.js} +1 -1
- package/dist/bbs/index.html +30 -30
- package/dist/index.html +28 -28
- package/dist/shopping/index.html +30 -30
- package/dist/uploader/index.html +30 -30
- package/package.json +6 -6
- package/src/AgenticaChatApplication.tsx +13 -13
- package/src/components/MarkdownViewer.tsx +32 -32
- package/src/index.ts +1 -1
- package/src/movies/AgenticaChatMovie.tsx +381 -381
- package/src/movies/messages/AgenticaChatAssistantMessageMovie.tsx +44 -44
- package/src/movies/messages/AgenticaChatDescribeMessageMovie.tsx +63 -63
- package/src/movies/messages/AgenticaChatExecuteMessageMovie.tsx +46 -46
- package/src/movies/messages/AgenticaChatMessageMovie.tsx +43 -43
- package/src/movies/messages/AgenticaChatSelectMessageMovie.tsx +72 -72
- package/src/movies/messages/AgenticaChatSystemMessageMovie.tsx +44 -44
- package/src/movies/messages/AgenticaChatUserMessageMovie.tsx +56 -56
- package/src/movies/sides/AgenticaChatFunctionStackSideMovie.tsx +48 -48
- package/src/movies/sides/AgenticaChatSideMovie.tsx +75 -75
- package/src/movies/sides/AgenticaChatTokenUsageSideMovie.tsx +86 -86
- package/dist/assets/VendorConfigurationMovie-C1-X-OfL.js +0 -2126
- package/dist/assets/bbs/index-BQdHwlZB.js +0 -41
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import type { AgenticaAssistantMessageHistory } from "@agentica/core";
|
|
2
|
-
|
|
3
|
-
import SmartToyIcon from "@mui/icons-material/SmartToy";
|
|
4
|
-
import { Card, CardContent, Chip } from "@mui/material";
|
|
5
|
-
|
|
6
|
-
import { MarkdownViewer } from "../../components/MarkdownViewer";
|
|
7
|
-
|
|
8
|
-
export function AgenticaChatAssistantMessageMovie({
|
|
9
|
-
prompt,
|
|
10
|
-
}: AgenticaChatAssistantMessageMovie.IProps) {
|
|
11
|
-
return (
|
|
12
|
-
<div
|
|
13
|
-
style={{
|
|
14
|
-
display: "flex",
|
|
15
|
-
justifyContent: "flex-start",
|
|
16
|
-
}}
|
|
17
|
-
>
|
|
18
|
-
<Card
|
|
19
|
-
elevation={3}
|
|
20
|
-
style={{
|
|
21
|
-
marginTop: 15,
|
|
22
|
-
marginBottom: 15,
|
|
23
|
-
marginRight: "15%",
|
|
24
|
-
textAlign: "left",
|
|
25
|
-
}}
|
|
26
|
-
>
|
|
27
|
-
<CardContent>
|
|
28
|
-
<Chip
|
|
29
|
-
icon={<SmartToyIcon />}
|
|
30
|
-
label="Assistant"
|
|
31
|
-
variant="outlined"
|
|
32
|
-
color="success"
|
|
33
|
-
/>
|
|
34
|
-
<MarkdownViewer>{prompt.text}</MarkdownViewer>
|
|
35
|
-
</CardContent>
|
|
36
|
-
</Card>
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
export namespace AgenticaChatAssistantMessageMovie {
|
|
41
|
-
export interface IProps {
|
|
42
|
-
prompt: AgenticaAssistantMessageHistory;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
1
|
+
import type { AgenticaAssistantMessageHistory } from "@agentica/core";
|
|
2
|
+
|
|
3
|
+
import SmartToyIcon from "@mui/icons-material/SmartToy";
|
|
4
|
+
import { Card, CardContent, Chip } from "@mui/material";
|
|
5
|
+
|
|
6
|
+
import { MarkdownViewer } from "../../components/MarkdownViewer";
|
|
7
|
+
|
|
8
|
+
export function AgenticaChatAssistantMessageMovie({
|
|
9
|
+
prompt,
|
|
10
|
+
}: AgenticaChatAssistantMessageMovie.IProps) {
|
|
11
|
+
return (
|
|
12
|
+
<div
|
|
13
|
+
style={{
|
|
14
|
+
display: "flex",
|
|
15
|
+
justifyContent: "flex-start",
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
<Card
|
|
19
|
+
elevation={3}
|
|
20
|
+
style={{
|
|
21
|
+
marginTop: 15,
|
|
22
|
+
marginBottom: 15,
|
|
23
|
+
marginRight: "15%",
|
|
24
|
+
textAlign: "left",
|
|
25
|
+
}}
|
|
26
|
+
>
|
|
27
|
+
<CardContent>
|
|
28
|
+
<Chip
|
|
29
|
+
icon={<SmartToyIcon />}
|
|
30
|
+
label="Assistant"
|
|
31
|
+
variant="outlined"
|
|
32
|
+
color="success"
|
|
33
|
+
/>
|
|
34
|
+
<MarkdownViewer>{prompt.text}</MarkdownViewer>
|
|
35
|
+
</CardContent>
|
|
36
|
+
</Card>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
export namespace AgenticaChatAssistantMessageMovie {
|
|
41
|
+
export interface IProps {
|
|
42
|
+
prompt: AgenticaAssistantMessageHistory;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import type { AgenticaDescribeHistory } from "@agentica/core";
|
|
2
|
-
|
|
3
|
-
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
4
|
-
import {
|
|
5
|
-
Button,
|
|
6
|
-
Card,
|
|
7
|
-
CardActions,
|
|
8
|
-
CardContent,
|
|
9
|
-
Chip,
|
|
10
|
-
Collapse,
|
|
11
|
-
} from "@mui/material";
|
|
12
|
-
import { useState } from "react";
|
|
13
|
-
|
|
14
|
-
import { MarkdownViewer } from "../../components/MarkdownViewer";
|
|
15
|
-
|
|
16
|
-
import { AgenticaChatExecuteMessageMovie } from "./AgenticaChatExecuteMessageMovie";
|
|
17
|
-
|
|
18
|
-
export function AgenticaChatDescribeMessageMovie({
|
|
19
|
-
history,
|
|
20
|
-
}: AgenticaChatDescribeMessageMovie.IProps) {
|
|
21
|
-
const [expanded, setExpanded] = useState(false);
|
|
22
|
-
return (
|
|
23
|
-
<Card
|
|
24
|
-
elevation={3}
|
|
25
|
-
style={{
|
|
26
|
-
marginTop: 15,
|
|
27
|
-
marginBottom: 15,
|
|
28
|
-
marginRight: "15%",
|
|
29
|
-
}}
|
|
30
|
-
>
|
|
31
|
-
<CardContent>
|
|
32
|
-
<Chip label="Function Describer" variant="outlined" color="secondary" />
|
|
33
|
-
<MarkdownViewer>{history.text}</MarkdownViewer>
|
|
34
|
-
</CardContent>
|
|
35
|
-
<CardActions style={{ textAlign: "right" }}>
|
|
36
|
-
<Button
|
|
37
|
-
startIcon={(
|
|
38
|
-
<ExpandMoreIcon
|
|
39
|
-
style={{
|
|
40
|
-
transform: `rotate(${expanded ? 180 : 0}deg)`,
|
|
41
|
-
}}
|
|
42
|
-
/>
|
|
43
|
-
)}
|
|
44
|
-
onClick={() => setExpanded(!expanded)}
|
|
45
|
-
>
|
|
46
|
-
{expanded ? "Hide Function Calls" : "Show Function Calls"}
|
|
47
|
-
</Button>
|
|
48
|
-
</CardActions>
|
|
49
|
-
<Collapse in={expanded} timeout="auto" unmountOnExit>
|
|
50
|
-
<CardContent>
|
|
51
|
-
{history.executes.map(execute => (
|
|
52
|
-
<AgenticaChatExecuteMessageMovie execute={execute} />
|
|
53
|
-
))}
|
|
54
|
-
</CardContent>
|
|
55
|
-
</Collapse>
|
|
56
|
-
</Card>
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
export namespace AgenticaChatDescribeMessageMovie {
|
|
60
|
-
export interface IProps {
|
|
61
|
-
history: AgenticaDescribeHistory;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
1
|
+
import type { AgenticaDescribeHistory } from "@agentica/core";
|
|
2
|
+
|
|
3
|
+
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
4
|
+
import {
|
|
5
|
+
Button,
|
|
6
|
+
Card,
|
|
7
|
+
CardActions,
|
|
8
|
+
CardContent,
|
|
9
|
+
Chip,
|
|
10
|
+
Collapse,
|
|
11
|
+
} from "@mui/material";
|
|
12
|
+
import { useState } from "react";
|
|
13
|
+
|
|
14
|
+
import { MarkdownViewer } from "../../components/MarkdownViewer";
|
|
15
|
+
|
|
16
|
+
import { AgenticaChatExecuteMessageMovie } from "./AgenticaChatExecuteMessageMovie";
|
|
17
|
+
|
|
18
|
+
export function AgenticaChatDescribeMessageMovie({
|
|
19
|
+
history,
|
|
20
|
+
}: AgenticaChatDescribeMessageMovie.IProps) {
|
|
21
|
+
const [expanded, setExpanded] = useState(false);
|
|
22
|
+
return (
|
|
23
|
+
<Card
|
|
24
|
+
elevation={3}
|
|
25
|
+
style={{
|
|
26
|
+
marginTop: 15,
|
|
27
|
+
marginBottom: 15,
|
|
28
|
+
marginRight: "15%",
|
|
29
|
+
}}
|
|
30
|
+
>
|
|
31
|
+
<CardContent>
|
|
32
|
+
<Chip label="Function Describer" variant="outlined" color="secondary" />
|
|
33
|
+
<MarkdownViewer>{history.text}</MarkdownViewer>
|
|
34
|
+
</CardContent>
|
|
35
|
+
<CardActions style={{ textAlign: "right" }}>
|
|
36
|
+
<Button
|
|
37
|
+
startIcon={(
|
|
38
|
+
<ExpandMoreIcon
|
|
39
|
+
style={{
|
|
40
|
+
transform: `rotate(${expanded ? 180 : 0}deg)`,
|
|
41
|
+
}}
|
|
42
|
+
/>
|
|
43
|
+
)}
|
|
44
|
+
onClick={() => setExpanded(!expanded)}
|
|
45
|
+
>
|
|
46
|
+
{expanded ? "Hide Function Calls" : "Show Function Calls"}
|
|
47
|
+
</Button>
|
|
48
|
+
</CardActions>
|
|
49
|
+
<Collapse in={expanded} timeout="auto" unmountOnExit>
|
|
50
|
+
<CardContent>
|
|
51
|
+
{history.executes.map(execute => (
|
|
52
|
+
<AgenticaChatExecuteMessageMovie execute={execute} />
|
|
53
|
+
))}
|
|
54
|
+
</CardContent>
|
|
55
|
+
</Collapse>
|
|
56
|
+
</Card>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
export namespace AgenticaChatDescribeMessageMovie {
|
|
60
|
+
export interface IProps {
|
|
61
|
+
history: AgenticaDescribeHistory;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import type { AgenticaExecuteHistory } from "@agentica/core";
|
|
2
|
-
|
|
3
|
-
import { Typography } from "@mui/material";
|
|
4
|
-
import React from "react";
|
|
5
|
-
|
|
6
|
-
import { MarkdownViewer } from "../../components/MarkdownViewer";
|
|
7
|
-
|
|
8
|
-
export function AgenticaChatExecuteMessageMovie({
|
|
9
|
-
execute,
|
|
10
|
-
}: AgenticaChatExecuteMessageMovie.IProps) {
|
|
11
|
-
return (
|
|
12
|
-
<React.Fragment>
|
|
13
|
-
<Typography variant="h5">
|
|
14
|
-
{" "}
|
|
15
|
-
{getTitle(execute)}
|
|
16
|
-
{" "}
|
|
17
|
-
</Typography>
|
|
18
|
-
<hr />
|
|
19
|
-
<Typography variant="h6"> Description </Typography>
|
|
20
|
-
<MarkdownViewer>{execute.operation.function.description}</MarkdownViewer>
|
|
21
|
-
<br />
|
|
22
|
-
<Typography variant="h6"> Arguments </Typography>
|
|
23
|
-
<MarkdownViewer>
|
|
24
|
-
{["```json", JSON.stringify(execute.arguments, null, 2), "```"].join(
|
|
25
|
-
"\n",
|
|
26
|
-
)}
|
|
27
|
-
</MarkdownViewer>
|
|
28
|
-
<br />
|
|
29
|
-
<Typography variant="h6"> Return Value </Typography>
|
|
30
|
-
<MarkdownViewer>
|
|
31
|
-
{["```json", JSON.stringify(execute.value, null, 2), "```"].join("\n")}
|
|
32
|
-
</MarkdownViewer>
|
|
33
|
-
</React.Fragment>
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
export namespace AgenticaChatExecuteMessageMovie {
|
|
37
|
-
export interface IProps {
|
|
38
|
-
execute: AgenticaExecuteHistory;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function getTitle(exec: AgenticaExecuteHistory) {
|
|
43
|
-
return exec.operation.protocol === "http"
|
|
44
|
-
? `${exec.operation.function.method.toUpperCase()} ${exec.operation.function.path}`
|
|
45
|
-
: exec.operation.function.name;
|
|
46
|
-
}
|
|
1
|
+
import type { AgenticaExecuteHistory } from "@agentica/core";
|
|
2
|
+
|
|
3
|
+
import { Typography } from "@mui/material";
|
|
4
|
+
import React from "react";
|
|
5
|
+
|
|
6
|
+
import { MarkdownViewer } from "../../components/MarkdownViewer";
|
|
7
|
+
|
|
8
|
+
export function AgenticaChatExecuteMessageMovie({
|
|
9
|
+
execute,
|
|
10
|
+
}: AgenticaChatExecuteMessageMovie.IProps) {
|
|
11
|
+
return (
|
|
12
|
+
<React.Fragment>
|
|
13
|
+
<Typography variant="h5">
|
|
14
|
+
{" "}
|
|
15
|
+
{getTitle(execute)}
|
|
16
|
+
{" "}
|
|
17
|
+
</Typography>
|
|
18
|
+
<hr />
|
|
19
|
+
<Typography variant="h6"> Description </Typography>
|
|
20
|
+
<MarkdownViewer>{execute.operation.function.description}</MarkdownViewer>
|
|
21
|
+
<br />
|
|
22
|
+
<Typography variant="h6"> Arguments </Typography>
|
|
23
|
+
<MarkdownViewer>
|
|
24
|
+
{["```json", JSON.stringify(execute.arguments, null, 2), "```"].join(
|
|
25
|
+
"\n",
|
|
26
|
+
)}
|
|
27
|
+
</MarkdownViewer>
|
|
28
|
+
<br />
|
|
29
|
+
<Typography variant="h6"> Return Value </Typography>
|
|
30
|
+
<MarkdownViewer>
|
|
31
|
+
{["```json", JSON.stringify(execute.value, null, 2), "```"].join("\n")}
|
|
32
|
+
</MarkdownViewer>
|
|
33
|
+
</React.Fragment>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
export namespace AgenticaChatExecuteMessageMovie {
|
|
37
|
+
export interface IProps {
|
|
38
|
+
execute: AgenticaExecuteHistory;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function getTitle(exec: AgenticaExecuteHistory) {
|
|
43
|
+
return exec.operation.protocol === "http"
|
|
44
|
+
? `${exec.operation.function.method.toUpperCase()} ${exec.operation.function.path}`
|
|
45
|
+
: exec.operation.function.name;
|
|
46
|
+
}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import type { AgenticaHistory } from "@agentica/core";
|
|
2
|
-
|
|
3
|
-
import { AgenticaChatAssistantMessageMovie } from "./AgenticaChatAssistantMessageMovie";
|
|
4
|
-
import { AgenticaChatDescribeMessageMovie } from "./AgenticaChatDescribeMessageMovie";
|
|
5
|
-
import { AgenticaChatSelectMessageMovie } from "./AgenticaChatSelectMessageMovie";
|
|
6
|
-
import { AgenticaChatSystemMessageMovie } from "./AgenticaChatSystemMessageMovie";
|
|
7
|
-
import { AgenticaChatUserMessageMovie } from "./AgenticaChatUserMessageMovie";
|
|
8
|
-
|
|
9
|
-
export function AgenticaChatMessageMovie({
|
|
10
|
-
prompt,
|
|
11
|
-
}: AgenticaChatMessageMovie.IProps) {
|
|
12
|
-
if (prompt.type === "assistantMessage") {
|
|
13
|
-
return <AgenticaChatAssistantMessageMovie prompt={prompt} />;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
if (prompt.type === "select") {
|
|
17
|
-
return <AgenticaChatSelectMessageMovie selection={prompt.selection} />;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if (prompt.type === "describe") {
|
|
21
|
-
return <AgenticaChatDescribeMessageMovie history={prompt} />;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (prompt.type === "cancel" || prompt.type === "execute") {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (prompt.type === "userMessage") {
|
|
29
|
-
return <AgenticaChatUserMessageMovie prompt={prompt} />;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (prompt.type === "systemMessage") {
|
|
33
|
-
return <AgenticaChatSystemMessageMovie prompt={prompt} />;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
prompt satisfies never;
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
export namespace AgenticaChatMessageMovie {
|
|
40
|
-
export interface IProps {
|
|
41
|
-
prompt: AgenticaHistory;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
1
|
+
import type { AgenticaHistory } from "@agentica/core";
|
|
2
|
+
|
|
3
|
+
import { AgenticaChatAssistantMessageMovie } from "./AgenticaChatAssistantMessageMovie";
|
|
4
|
+
import { AgenticaChatDescribeMessageMovie } from "./AgenticaChatDescribeMessageMovie";
|
|
5
|
+
import { AgenticaChatSelectMessageMovie } from "./AgenticaChatSelectMessageMovie";
|
|
6
|
+
import { AgenticaChatSystemMessageMovie } from "./AgenticaChatSystemMessageMovie";
|
|
7
|
+
import { AgenticaChatUserMessageMovie } from "./AgenticaChatUserMessageMovie";
|
|
8
|
+
|
|
9
|
+
export function AgenticaChatMessageMovie({
|
|
10
|
+
prompt,
|
|
11
|
+
}: AgenticaChatMessageMovie.IProps) {
|
|
12
|
+
if (prompt.type === "assistantMessage") {
|
|
13
|
+
return <AgenticaChatAssistantMessageMovie prompt={prompt} />;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (prompt.type === "select") {
|
|
17
|
+
return <AgenticaChatSelectMessageMovie selection={prompt.selection} />;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (prompt.type === "describe") {
|
|
21
|
+
return <AgenticaChatDescribeMessageMovie history={prompt} />;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (prompt.type === "cancel" || prompt.type === "execute") {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (prompt.type === "userMessage") {
|
|
29
|
+
return <AgenticaChatUserMessageMovie prompt={prompt} />;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (prompt.type === "systemMessage") {
|
|
33
|
+
return <AgenticaChatSystemMessageMovie prompt={prompt} />;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
prompt satisfies never;
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
export namespace AgenticaChatMessageMovie {
|
|
40
|
+
export interface IProps {
|
|
41
|
+
prompt: AgenticaHistory;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import type { AgenticaOperationSelection } from "@agentica/core";
|
|
2
|
-
|
|
3
|
-
import GradingIcon from "@mui/icons-material/Grading";
|
|
4
|
-
import {
|
|
5
|
-
Button,
|
|
6
|
-
Card,
|
|
7
|
-
CardActions,
|
|
8
|
-
CardContent,
|
|
9
|
-
Chip,
|
|
10
|
-
Collapse,
|
|
11
|
-
} from "@mui/material";
|
|
12
|
-
import { useState } from "react";
|
|
13
|
-
|
|
14
|
-
import { MarkdownViewer } from "../../components/MarkdownViewer";
|
|
15
|
-
|
|
16
|
-
export function AgenticaChatSelectMessageMovie({
|
|
17
|
-
selection,
|
|
18
|
-
}: AgenticaChatSelectMessageMovie.IProps) {
|
|
19
|
-
const [expanded, setExpanded] = useState(false);
|
|
20
|
-
return (
|
|
21
|
-
<Card
|
|
22
|
-
elevation={3}
|
|
23
|
-
style={{
|
|
24
|
-
marginTop: 15,
|
|
25
|
-
marginBottom: 15,
|
|
26
|
-
marginRight: "15%",
|
|
27
|
-
}}
|
|
28
|
-
>
|
|
29
|
-
<CardContent>
|
|
30
|
-
<Chip
|
|
31
|
-
icon={<GradingIcon />}
|
|
32
|
-
label="Function Selector"
|
|
33
|
-
variant="outlined"
|
|
34
|
-
color="warning"
|
|
35
|
-
/>
|
|
36
|
-
<br />
|
|
37
|
-
<br />
|
|
38
|
-
Operation:
|
|
39
|
-
{selection.operation.protocol === "http"
|
|
40
|
-
? (
|
|
41
|
-
<ul>
|
|
42
|
-
<li>{selection.operation.function.method.toUpperCase()}</li>
|
|
43
|
-
<li>{selection.operation.function.path}</li>
|
|
44
|
-
</ul>
|
|
45
|
-
)
|
|
46
|
-
: (
|
|
47
|
-
<ul>
|
|
48
|
-
<li>{selection.operation.function.name}</li>
|
|
49
|
-
</ul>
|
|
50
|
-
)}
|
|
51
|
-
<MarkdownViewer>{selection.reason}</MarkdownViewer>
|
|
52
|
-
</CardContent>
|
|
53
|
-
<CardActions style={{ textAlign: "right" }}>
|
|
54
|
-
<Button onClick={() => setExpanded(!expanded)}>
|
|
55
|
-
{expanded ? "Hide Function Description" : "Show Function Description"}
|
|
56
|
-
</Button>
|
|
57
|
-
</CardActions>
|
|
58
|
-
<Collapse in={expanded} timeout="auto" unmountOnExit>
|
|
59
|
-
<CardContent>
|
|
60
|
-
<MarkdownViewer>
|
|
61
|
-
{selection.operation.function.description}
|
|
62
|
-
</MarkdownViewer>
|
|
63
|
-
</CardContent>
|
|
64
|
-
</Collapse>
|
|
65
|
-
</Card>
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
export namespace AgenticaChatSelectMessageMovie {
|
|
69
|
-
export interface IProps {
|
|
70
|
-
selection: AgenticaOperationSelection;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
1
|
+
import type { AgenticaOperationSelection } from "@agentica/core";
|
|
2
|
+
|
|
3
|
+
import GradingIcon from "@mui/icons-material/Grading";
|
|
4
|
+
import {
|
|
5
|
+
Button,
|
|
6
|
+
Card,
|
|
7
|
+
CardActions,
|
|
8
|
+
CardContent,
|
|
9
|
+
Chip,
|
|
10
|
+
Collapse,
|
|
11
|
+
} from "@mui/material";
|
|
12
|
+
import { useState } from "react";
|
|
13
|
+
|
|
14
|
+
import { MarkdownViewer } from "../../components/MarkdownViewer";
|
|
15
|
+
|
|
16
|
+
export function AgenticaChatSelectMessageMovie({
|
|
17
|
+
selection,
|
|
18
|
+
}: AgenticaChatSelectMessageMovie.IProps) {
|
|
19
|
+
const [expanded, setExpanded] = useState(false);
|
|
20
|
+
return (
|
|
21
|
+
<Card
|
|
22
|
+
elevation={3}
|
|
23
|
+
style={{
|
|
24
|
+
marginTop: 15,
|
|
25
|
+
marginBottom: 15,
|
|
26
|
+
marginRight: "15%",
|
|
27
|
+
}}
|
|
28
|
+
>
|
|
29
|
+
<CardContent>
|
|
30
|
+
<Chip
|
|
31
|
+
icon={<GradingIcon />}
|
|
32
|
+
label="Function Selector"
|
|
33
|
+
variant="outlined"
|
|
34
|
+
color="warning"
|
|
35
|
+
/>
|
|
36
|
+
<br />
|
|
37
|
+
<br />
|
|
38
|
+
Operation:
|
|
39
|
+
{selection.operation.protocol === "http"
|
|
40
|
+
? (
|
|
41
|
+
<ul>
|
|
42
|
+
<li>{selection.operation.function.method.toUpperCase()}</li>
|
|
43
|
+
<li>{selection.operation.function.path}</li>
|
|
44
|
+
</ul>
|
|
45
|
+
)
|
|
46
|
+
: (
|
|
47
|
+
<ul>
|
|
48
|
+
<li>{selection.operation.function.name}</li>
|
|
49
|
+
</ul>
|
|
50
|
+
)}
|
|
51
|
+
<MarkdownViewer>{selection.reason}</MarkdownViewer>
|
|
52
|
+
</CardContent>
|
|
53
|
+
<CardActions style={{ textAlign: "right" }}>
|
|
54
|
+
<Button onClick={() => setExpanded(!expanded)}>
|
|
55
|
+
{expanded ? "Hide Function Description" : "Show Function Description"}
|
|
56
|
+
</Button>
|
|
57
|
+
</CardActions>
|
|
58
|
+
<Collapse in={expanded} timeout="auto" unmountOnExit>
|
|
59
|
+
<CardContent>
|
|
60
|
+
<MarkdownViewer>
|
|
61
|
+
{selection.operation.function.description}
|
|
62
|
+
</MarkdownViewer>
|
|
63
|
+
</CardContent>
|
|
64
|
+
</Collapse>
|
|
65
|
+
</Card>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
export namespace AgenticaChatSelectMessageMovie {
|
|
69
|
+
export interface IProps {
|
|
70
|
+
selection: AgenticaOperationSelection;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import type { AgenticaSystemMessageHistory } from "@agentica/core";
|
|
2
|
-
|
|
3
|
-
import SmartToyIcon from "@mui/icons-material/SmartToy";
|
|
4
|
-
import { Card, CardContent, Chip } from "@mui/material";
|
|
5
|
-
|
|
6
|
-
import { MarkdownViewer } from "../../components/MarkdownViewer";
|
|
7
|
-
|
|
8
|
-
export function AgenticaChatSystemMessageMovie({
|
|
9
|
-
prompt,
|
|
10
|
-
}: AgenticaChatSystemMessageMovie.IProps) {
|
|
11
|
-
return (
|
|
12
|
-
<div
|
|
13
|
-
style={{
|
|
14
|
-
display: "flex",
|
|
15
|
-
justifyContent: "flex-start",
|
|
16
|
-
}}
|
|
17
|
-
>
|
|
18
|
-
<Card
|
|
19
|
-
elevation={3}
|
|
20
|
-
style={{
|
|
21
|
-
marginTop: 15,
|
|
22
|
-
marginBottom: 15,
|
|
23
|
-
marginRight: "15%",
|
|
24
|
-
textAlign: "left",
|
|
25
|
-
}}
|
|
26
|
-
>
|
|
27
|
-
<CardContent>
|
|
28
|
-
<Chip
|
|
29
|
-
icon={<SmartToyIcon />}
|
|
30
|
-
label="System"
|
|
31
|
-
variant="outlined"
|
|
32
|
-
color="success"
|
|
33
|
-
/>
|
|
34
|
-
<MarkdownViewer>{prompt.text}</MarkdownViewer>
|
|
35
|
-
</CardContent>
|
|
36
|
-
</Card>
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
export namespace AgenticaChatSystemMessageMovie {
|
|
41
|
-
export interface IProps {
|
|
42
|
-
prompt: AgenticaSystemMessageHistory;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
1
|
+
import type { AgenticaSystemMessageHistory } from "@agentica/core";
|
|
2
|
+
|
|
3
|
+
import SmartToyIcon from "@mui/icons-material/SmartToy";
|
|
4
|
+
import { Card, CardContent, Chip } from "@mui/material";
|
|
5
|
+
|
|
6
|
+
import { MarkdownViewer } from "../../components/MarkdownViewer";
|
|
7
|
+
|
|
8
|
+
export function AgenticaChatSystemMessageMovie({
|
|
9
|
+
prompt,
|
|
10
|
+
}: AgenticaChatSystemMessageMovie.IProps) {
|
|
11
|
+
return (
|
|
12
|
+
<div
|
|
13
|
+
style={{
|
|
14
|
+
display: "flex",
|
|
15
|
+
justifyContent: "flex-start",
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
<Card
|
|
19
|
+
elevation={3}
|
|
20
|
+
style={{
|
|
21
|
+
marginTop: 15,
|
|
22
|
+
marginBottom: 15,
|
|
23
|
+
marginRight: "15%",
|
|
24
|
+
textAlign: "left",
|
|
25
|
+
}}
|
|
26
|
+
>
|
|
27
|
+
<CardContent>
|
|
28
|
+
<Chip
|
|
29
|
+
icon={<SmartToyIcon />}
|
|
30
|
+
label="System"
|
|
31
|
+
variant="outlined"
|
|
32
|
+
color="success"
|
|
33
|
+
/>
|
|
34
|
+
<MarkdownViewer>{prompt.text}</MarkdownViewer>
|
|
35
|
+
</CardContent>
|
|
36
|
+
</Card>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
export namespace AgenticaChatSystemMessageMovie {
|
|
41
|
+
export interface IProps {
|
|
42
|
+
prompt: AgenticaSystemMessageHistory;
|
|
43
|
+
}
|
|
44
|
+
}
|