@blocklet/pages-kit 0.2.309 → 0.2.311
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/lib/cjs/builtin/async/ai-runtime/components/Header/SimpleHeader.js +3 -3
- package/lib/cjs/builtin/async/ai-runtime/components/ShareActions/index.js +5 -3
- package/lib/cjs/builtin/async/ai-runtime/contexts/CurrentAgent.js +6 -14
- package/lib/cjs/builtin/async/ai-runtime/hooks/use-appearances.js +94 -0
- package/lib/cjs/builtin/async/ai-runtime/index.js +5 -1
- package/lib/cjs/builtin/async/ai-runtime/runtime/ChatBotButton/index.js +33 -7
- package/lib/cjs/builtin/async/ai-runtime/runtime/Runtime/index.js +12 -9
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageItemView.js +13 -10
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageMetadataRenderer.js +8 -5
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/MultiAgentsChat/index.js +192 -0
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/PhotoGallery/index.js +4 -26
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimpleChat/index.js +18 -24
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/SimplePage/index.js +4 -26
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/Input.js +152 -0
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/Output.js +79 -0
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/Page.js +147 -0
- package/lib/cjs/builtin/async/ai-runtime/runtime-components/V0/index.js +12 -0
- package/lib/cjs/builtin/async/ai-runtime/state/runtime.js +1 -5
- package/lib/cjs/builtin/async/ai-runtime/utils/runtime-output-schema.js +8 -0
- package/lib/cjs/builtin/mui/material.js +3 -2
- package/lib/cjs/tsconfig.tsbuildinfo +1 -0
- package/lib/cjs/utils/inject-global-components-dump-json.js +1167 -0
- package/lib/esm/builtin/async/ai-runtime/components/Header/SimpleHeader.js +3 -3
- package/lib/esm/builtin/async/ai-runtime/components/ShareActions/index.js +5 -3
- package/lib/esm/builtin/async/ai-runtime/contexts/CurrentAgent.js +6 -14
- package/lib/esm/builtin/async/ai-runtime/hooks/use-appearances.js +87 -0
- package/lib/esm/builtin/async/ai-runtime/index.js +3 -0
- package/lib/esm/builtin/async/ai-runtime/runtime/ChatBotButton/index.js +10 -7
- package/lib/esm/builtin/async/ai-runtime/runtime/Runtime/index.js +13 -10
- package/lib/esm/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageItemView.js +13 -10
- package/lib/esm/builtin/async/ai-runtime/runtime-components/ChatOutput/MessageMetadataRenderer.js +8 -5
- package/lib/esm/builtin/async/ai-runtime/runtime-components/MultiAgentsChat/index.js +163 -0
- package/lib/esm/builtin/async/ai-runtime/runtime-components/PhotoGallery/index.js +4 -3
- package/lib/esm/builtin/async/ai-runtime/runtime-components/SimpleChat/index.js +19 -25
- package/lib/esm/builtin/async/ai-runtime/runtime-components/SimplePage/index.js +4 -3
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/Input.js +146 -0
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/Output.js +73 -0
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/Page.js +142 -0
- package/lib/esm/builtin/async/ai-runtime/runtime-components/V0/index.js +3 -0
- package/lib/esm/builtin/async/ai-runtime/state/runtime.js +1 -5
- package/lib/esm/builtin/async/ai-runtime/utils/runtime-output-schema.js +4 -0
- package/lib/esm/builtin/mui/material.js +1 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -0
- package/lib/esm/utils/inject-global-components-dump-json.js +1165 -0
- package/lib/types/builtin/async/ai-runtime/api/agent.d.ts +8 -0
- package/lib/types/builtin/async/ai-runtime/contexts/CurrentAgent.d.ts +4 -5
- package/lib/types/builtin/async/ai-runtime/hooks/use-appearances.d.ts +45 -0
- package/lib/types/builtin/async/ai-runtime/index.d.ts +2 -0
- package/lib/types/builtin/async/ai-runtime/runtime-components/MultiAgentsChat/index.d.ts +11 -0
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/Input.d.ts +7 -0
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/Output.d.ts +1 -0
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/Page.d.ts +5 -0
- package/lib/types/builtin/async/ai-runtime/runtime-components/V0/index.d.ts +3 -0
- package/lib/types/builtin/async/ai-runtime/state/agent.d.ts +1 -1
- package/lib/types/builtin/async/ai-runtime/state/runtime.d.ts +1 -3
- package/lib/types/builtin/async/ai-runtime/utils/runtime-output-schema.d.ts +3 -0
- package/lib/types/builtin/mui/material.d.ts +1 -1
- package/lib/types/tsconfig.tsbuildinfo +1 -0
- package/lib/types/utils/inject-global-components-dump-json.d.ts +1 -0
- package/package.json +13 -9
|
@@ -14,6 +14,14 @@ export interface Agent {
|
|
|
14
14
|
}[];
|
|
15
15
|
release?: AssistantBase['release'];
|
|
16
16
|
createdBy?: string;
|
|
17
|
+
project: {
|
|
18
|
+
id: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
createdBy: string;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
};
|
|
17
25
|
}
|
|
18
26
|
export declare function getAgent({ aid, working }: {
|
|
19
27
|
aid: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RuntimeOutputAppearance } from '@blocklet/ai-runtime/types';
|
|
2
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { Agent } from '../api/agent';
|
|
3
3
|
export interface CurrentAgentState {
|
|
4
4
|
aid: string;
|
|
5
5
|
}
|
|
@@ -7,11 +7,10 @@ export default function CurrentAgentProvider({ agentId, children }: {
|
|
|
7
7
|
agentId: string;
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export declare function useCurrentAgent(
|
|
10
|
+
export declare function useCurrentAgent(args?: {
|
|
11
|
+
aid?: string;
|
|
11
12
|
agentId?: string;
|
|
12
13
|
}): {
|
|
13
14
|
aid: string;
|
|
14
|
-
agent:
|
|
15
|
-
appearanceInput: RuntimeOutputAppearance;
|
|
16
|
-
appearanceOutput: RuntimeOutputAppearance;
|
|
15
|
+
agent: Agent;
|
|
17
16
|
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export default function useAppearances(args?: {
|
|
2
|
+
aid: string;
|
|
3
|
+
} | {
|
|
4
|
+
agentId: string;
|
|
5
|
+
}): {
|
|
6
|
+
appearancePage: {
|
|
7
|
+
componentId: string;
|
|
8
|
+
componentName?: string | undefined;
|
|
9
|
+
componentProps?: {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
} | undefined;
|
|
12
|
+
};
|
|
13
|
+
appearanceInput: import("@blocklet/ai-runtime/types").RuntimeOutputAppearance;
|
|
14
|
+
appearanceOutput: import("@blocklet/ai-runtime/types").RuntimeOutputAppearance;
|
|
15
|
+
};
|
|
16
|
+
export declare function useProfile(args?: {
|
|
17
|
+
aid: string;
|
|
18
|
+
} | {
|
|
19
|
+
agentId: string;
|
|
20
|
+
}): {
|
|
21
|
+
avatar: string;
|
|
22
|
+
name: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
export declare function useOpeningMessage(args?: {
|
|
25
|
+
aid: string;
|
|
26
|
+
} | {
|
|
27
|
+
agentId: string;
|
|
28
|
+
}): {
|
|
29
|
+
message: string;
|
|
30
|
+
profile: {
|
|
31
|
+
avatar: string;
|
|
32
|
+
name: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
} | undefined;
|
|
35
|
+
export declare function useOpeningQuestions(args?: {
|
|
36
|
+
aid: string;
|
|
37
|
+
} | {
|
|
38
|
+
agentId: string;
|
|
39
|
+
}): {
|
|
40
|
+
questions: {
|
|
41
|
+
id: string;
|
|
42
|
+
title?: string | undefined;
|
|
43
|
+
parameters?: any;
|
|
44
|
+
}[];
|
|
45
|
+
} | undefined;
|
|
@@ -8,8 +8,10 @@ export { default as Runtime } from './runtime/Runtime';
|
|
|
8
8
|
export { default as ChatBotButton } from './runtime/ChatBotButton';
|
|
9
9
|
export { default as SimplePage } from './runtime-components/SimplePage';
|
|
10
10
|
export { default as SimpleChat } from './runtime-components/SimpleChat';
|
|
11
|
+
export { default as MultiAgentsChat } from './runtime-components/MultiAgentsChat';
|
|
11
12
|
export { default as PhotoGallery } from './runtime-components/PhotoGallery';
|
|
12
13
|
export { default as AutoForm } from './runtime-components/AutoForm';
|
|
13
14
|
export { default as SimpleOutput } from './runtime-components/SimpleOutput';
|
|
14
15
|
export { default as ChatOutput } from './runtime-components/ChatOutput';
|
|
15
16
|
export { default as PhotoGalleryItem } from './runtime-components/PhotoGalleryItem';
|
|
17
|
+
export * from './runtime-components/V0';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import ScrollView from '../../components/ScrollView';
|
|
3
|
+
export default function MultiAgentsChat({ primaryColor, scrollViewProps, backgroundImage, }: {
|
|
4
|
+
primaryColor?: string;
|
|
5
|
+
scrollViewProps?: ComponentProps<typeof ScrollView>;
|
|
6
|
+
backgroundImage?: {
|
|
7
|
+
url?: string;
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
};
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export default function AutoForm({ submitText, inlineLabel, autoFillLastForm, submitInQuestionField, chatMode, }: {
|
|
2
|
+
submitText?: string;
|
|
3
|
+
inlineLabel?: boolean;
|
|
4
|
+
autoFillLastForm?: boolean;
|
|
5
|
+
submitInQuestionField?: boolean;
|
|
6
|
+
chatMode?: boolean;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function V0Output(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,4 +13,4 @@ export declare const createAgentState: ({ aid, working, agent }: {
|
|
|
13
13
|
export declare function useAgentState({ aid, working }: {
|
|
14
14
|
aid: string;
|
|
15
15
|
working?: boolean;
|
|
16
|
-
}):
|
|
16
|
+
}): [Agent, AgentState];
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { RuntimeOutputAppearancePage } from '@blocklet/ai-runtime/types';
|
|
2
1
|
export declare function useRuntimeState(): {
|
|
3
2
|
aid: string;
|
|
4
3
|
working: boolean | undefined;
|
|
5
|
-
agent: import("
|
|
6
|
-
appearancePage: RuntimeOutputAppearancePage | undefined;
|
|
4
|
+
agent: import("../api/agent").Agent;
|
|
7
5
|
childAgentId: string;
|
|
8
6
|
execute: (options: {
|
|
9
7
|
aid: string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { RuntimeOutputVariable, RuntimeOutputVariablesSchema } from '@blocklet/ai-runtime/types';
|
|
2
|
+
import { Agent } from '../api/agent';
|
|
3
|
+
export declare function getOutputVariableInitialValue<T extends RuntimeOutputVariable>(agent: Agent, output: T): RuntimeOutputVariablesSchema[T] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Alert, AlertTitle, Autocomplete, Avatar, Box, Button, ButtonGroup, Card, CardActionArea, CardActions, CardContent, CardHeader, CardMedia, CircularProgress, ClickAwayListener, Collapse, Container, Dialog, DialogActions, DialogContent, DialogTitle, Divider, Fade, GlobalStyles, Grid, Grow, LinearProgress, Link, List, ListItem, ListItemAvatar, ListItemButton, ListItemIcon, ListItemSecondaryAction, ListSubheader, Menu, MenuItem, MenuList, Paper, Popper, Slide, Stack, Switch, TextField, ThemeProvider, Tooltip, Typography, Zoom, alpha, createTheme, styled, useMediaQuery, useTheme, } from '@mui/material';
|
|
1
|
+
export { Alert, AlertTitle, Autocomplete, Avatar, Box, Button, IconButton, ButtonGroup, Card, CardActionArea, CardActions, CardContent, CardHeader, CardMedia, CircularProgress, ClickAwayListener, Collapse, Container, Dialog, DialogActions, DialogContent, DialogTitle, Divider, Fade, GlobalStyles, Grid, Grow, LinearProgress, Link, List, ListItem, ListItemAvatar, ListItemButton, ListItemIcon, ListItemSecondaryAction, ListSubheader, Menu, MenuItem, MenuList, Paper, Popper, Slide, Stack, Switch, TextField, ThemeProvider, Tooltip, Typography, Zoom, alpha, createTheme, styled, useMediaQuery, useTheme, } from '@mui/material';
|