@jupyter/chat 0.12.0 → 0.14.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/lib/active-cell-manager.d.ts +2 -0
- package/lib/active-cell-manager.js +7 -2
- package/lib/components/avatar.d.ts +20 -0
- package/lib/components/avatar.js +29 -0
- package/lib/components/chat.d.ts +1 -3
- package/lib/components/chat.js +2 -3
- package/lib/components/index.d.ts +2 -3
- package/lib/components/index.js +2 -3
- package/lib/components/input/buttons/send-button.js +15 -5
- package/lib/components/{chat-input.d.ts → input/chat-input.d.ts} +3 -3
- package/lib/components/{chat-input.js → input/chat-input.js} +7 -4
- package/lib/components/input/index.d.ts +1 -0
- package/lib/components/input/index.js +1 -0
- package/lib/components/input/toolbar-registry.d.ts +6 -0
- package/lib/components/input/use-chat-commands.d.ts +1 -1
- package/lib/components/input/use-chat-commands.js +23 -12
- package/lib/components/messages/footer.d.ts +2 -2
- package/lib/components/messages/footer.js +1 -1
- package/lib/components/messages/header.d.ts +16 -0
- package/lib/components/messages/header.js +85 -0
- package/lib/components/messages/index.d.ts +9 -0
- package/lib/components/messages/index.js +13 -0
- package/lib/components/messages/message-renderer.js +1 -1
- package/lib/components/messages/message.d.ts +21 -0
- package/lib/components/messages/message.js +102 -0
- package/lib/components/messages/messages.d.ts +38 -0
- package/lib/components/messages/messages.js +139 -0
- package/lib/components/messages/navigation.d.ts +20 -0
- package/lib/components/messages/navigation.js +98 -0
- package/lib/components/messages/writers.d.ts +16 -0
- package/lib/components/messages/writers.js +39 -0
- package/lib/context.d.ts +1 -1
- package/lib/index.d.ts +2 -6
- package/lib/index.js +2 -6
- package/lib/{registry.d.ts → registers/attachment-openers.d.ts} +1 -1
- package/lib/registers/chat-commands.d.ts +108 -0
- package/lib/{chat-commands/registry.js → registers/chat-commands.js} +8 -8
- package/lib/{footers/registry.d.ts → registers/footers.d.ts} +30 -5
- package/lib/registers/index.d.ts +3 -0
- package/lib/{footers → registers}/index.js +3 -2
- package/lib/selection-watcher.d.ts +11 -1
- package/lib/selection-watcher.js +10 -4
- package/lib/widgets/index.d.ts +3 -0
- package/lib/{chat-commands → widgets}/index.js +3 -2
- package/package.json +3 -1
- package/src/active-cell-manager.ts +10 -1
- package/src/components/avatar.tsx +68 -0
- package/src/components/chat.tsx +11 -6
- package/src/components/index.ts +2 -3
- package/src/components/input/buttons/send-button.tsx +17 -5
- package/src/components/{chat-input.tsx → input/chat-input.tsx} +12 -7
- package/src/components/input/index.ts +1 -0
- package/src/components/input/toolbar-registry.tsx +6 -0
- package/src/components/input/use-chat-commands.tsx +30 -15
- package/src/components/messages/footer.tsx +5 -2
- package/src/components/messages/header.tsx +133 -0
- package/src/components/messages/index.ts +14 -0
- package/src/components/messages/message-renderer.tsx +1 -1
- package/src/components/messages/message.tsx +156 -0
- package/src/components/messages/messages.tsx +218 -0
- package/src/components/messages/navigation.tsx +167 -0
- package/src/components/messages/welcome.tsx +1 -0
- package/src/components/messages/writers.tsx +81 -0
- package/src/context.ts +1 -1
- package/src/index.ts +2 -6
- package/src/{registry.ts → registers/attachment-openers.ts} +2 -1
- package/src/registers/chat-commands.ts +142 -0
- package/src/{footers/registry.ts → registers/footers.ts} +35 -8
- package/src/{footers → registers}/index.ts +3 -2
- package/src/selection-watcher.ts +28 -5
- package/src/{chat-commands → widgets}/index.ts +3 -2
- package/style/chat.css +82 -0
- package/lib/chat-commands/index.d.ts +0 -2
- package/lib/chat-commands/registry.d.ts +0 -28
- package/lib/chat-commands/types.d.ts +0 -52
- package/lib/chat-commands/types.js +0 -5
- package/lib/components/chat-messages.d.ts +0 -119
- package/lib/components/chat-messages.js +0 -446
- package/lib/footers/index.d.ts +0 -2
- package/lib/footers/types.d.ts +0 -26
- package/lib/footers/types.js +0 -5
- package/src/chat-commands/registry.ts +0 -60
- package/src/chat-commands/types.ts +0 -67
- package/src/components/chat-messages.tsx +0 -739
- package/src/footers/types.ts +0 -33
- package/lib/components/{toolbar.d.ts → messages/toolbar.d.ts} +0 -0
- package/lib/components/{toolbar.js → messages/toolbar.js} +0 -0
- package/lib/{registry.js → registers/attachment-openers.js} +0 -0
- package/lib/{footers/registry.js → registers/footers.js} +4 -4
- /package/src/components/{toolbar.tsx → messages/toolbar.tsx} +0 -0
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Jupyter Development Team.
|
|
3
|
-
* Distributed under the terms of the Modified BSD License.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { LabIcon } from '@jupyterlab/ui-components';
|
|
7
|
-
import { IInputModel } from '../input-model';
|
|
8
|
-
|
|
9
|
-
export type ChatCommand = {
|
|
10
|
-
/**
|
|
11
|
-
* The name of the command. This defines what the user should type in the
|
|
12
|
-
* input to have the command appear in the chat commands menu.
|
|
13
|
-
*/
|
|
14
|
-
name: string;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* ID of the provider the command originated from.
|
|
18
|
-
*/
|
|
19
|
-
providerId: string;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* If set, this will be rendered as the icon for the command in the chat
|
|
23
|
-
* commands menu. Jupyter Chat will choose a default if this is unset.
|
|
24
|
-
*/
|
|
25
|
-
icon?: LabIcon | JSX.Element | string | null;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* If set, this will be rendered as the description for the command in the
|
|
29
|
-
* chat commands menu. Jupyter Chat will choose a default if this is unset.
|
|
30
|
-
*/
|
|
31
|
-
description?: string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* If set, Jupyter Chat will replace the current word with this string after
|
|
35
|
-
* the command is run from the chat commands menu.
|
|
36
|
-
*
|
|
37
|
-
* If all commands from a provider have this property set, then
|
|
38
|
-
* `handleChatCommands()` can just return on the first line.
|
|
39
|
-
*/
|
|
40
|
-
replaceWith?: string;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Interface of a command provider.
|
|
45
|
-
*/
|
|
46
|
-
export interface IChatCommandProvider {
|
|
47
|
-
/**
|
|
48
|
-
* ID of this command provider.
|
|
49
|
-
*/
|
|
50
|
-
id: string;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Async function which accepts the input model and returns a list of
|
|
54
|
-
* valid chat commands that match the current word. The current word is
|
|
55
|
-
* space-separated word at the user's cursor.
|
|
56
|
-
*/
|
|
57
|
-
getChatCommands(inputModel: IInputModel): Promise<ChatCommand[]>;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Function called when a chat command is run by the user through the chat
|
|
61
|
-
* commands menu.
|
|
62
|
-
*/
|
|
63
|
-
handleChatCommand(
|
|
64
|
-
command: ChatCommand,
|
|
65
|
-
inputModel: IInputModel
|
|
66
|
-
): Promise<void>;
|
|
67
|
-
}
|