├── LLMConfiguration
└── Personas
│ ├── Wolfie
│ ├── Icon.wl
│ ├── Pre.md
│ ├── Post.md
│ └── LLMConfiguration.wl
│ ├── NotebookAssistant
│ ├── Pre.md
│ └── LLMConfiguration.wl
│ ├── WolframAlpha
│ ├── Pre.md
│ └── LLMConfiguration.wl
│ ├── CodeWriter
│ ├── Pre.md
│ └── LLMConfiguration.wl
│ ├── AgentOneCoder
│ └── LLMConfiguration.wl
│ ├── Birdnardo
│ ├── Pre.md
│ ├── LLMConfiguration.wl
│ └── Post.md
│ ├── AgentOne
│ └── LLMConfiguration.wl
│ ├── RawModel
│ └── LLMConfiguration.wl
│ ├── PlainChat
│ └── LLMConfiguration.wl
│ └── CodeAssistant
│ ├── Pre.md
│ └── LLMConfiguration.wl
├── Assets
├── SyntaxOptions.wxf
├── SyntaxArguments.wxf
├── DisplayFunctions.wxf
├── Images
│ └── PacletIcon.png
├── TemplateBoxOptions.wxf
├── Tokenizers
│ ├── claude.wxf
│ ├── gpt-2.wxf
│ ├── gpt-3.5.wxf
│ ├── gpt-4.wxf
│ └── gpt-4o-text.wxf
├── DisplayFunctionsDark.wxf
├── Snippets
│ ├── EntityValues.wxf
│ ├── PacletRepositoryURIs.wxf
│ ├── NeuralNetRepositoryURIs.wxf
│ └── Markdown
│ │ ├── BasicEntityUsage.md
│ │ └── EntityValueInstructions.md
├── SandboxMessages.wl
└── AIAssistant
│ └── APIKeyDialogDescription.wl
├── .cursorignore
├── docs
├── images
│ ├── example-of-text-output.png
│ ├── example-of-wolfram-output.png
│ ├── example-of-external-evaluate-output.png
│ ├── changelog
│ │ └── file-new-chat-enabled-notebook.png
│ └── example-of-evaluating-generated-wolfram.gif
├── Development.md
└── CHANGELOG.md
├── Developer
├── Resources
│ ├── NinePatchImages
│ │ └── FloatingButtonGrid.wxf
│ ├── FrontEndResources
│ │ ├── Common
│ │ │ ├── ToolManagerDelimiter.wl
│ │ │ ├── ToolManagerDownChevron.wl
│ │ │ ├── ToolManagerClear.wl
│ │ │ ├── Checkmark.wl
│ │ │ ├── Triangle.wl
│ │ │ ├── CheckmarkGreen.wl
│ │ │ ├── ToolManagerBin.wl
│ │ │ ├── WrenchIcon.wl
│ │ │ ├── ServiceIconAnthropic.wl
│ │ │ ├── PeelOff.wl
│ │ │ ├── Close.wl
│ │ │ ├── PeelOff-hover.wl
│ │ │ ├── AdvancedSettings.wl
│ │ │ ├── NewChatActive.wl
│ │ │ ├── NewChat.wl
│ │ │ ├── ServiceIconPaLM.wl
│ │ │ ├── Hide-hover.wl
│ │ │ ├── Hide.wl
│ │ │ ├── Delete-hover.wl
│ │ │ ├── Delete.wl
│ │ │ ├── Delete-disabled.wl
│ │ │ ├── ToolManagerCog.wl
│ │ │ ├── ToolManagerAllChecked.wl
│ │ │ ├── InsertChatCellActive.wl
│ │ │ ├── InsertChatCell.wl
│ │ │ ├── ThumbsDownInactive.wl
│ │ │ ├── ThumbsUpInactive.wl
│ │ │ ├── ThumbsDownActive.wl
│ │ │ └── ThumbsUpActive.wl
│ │ ├── WorkspaceChat
│ │ │ ├── ToolbarIcon
│ │ │ │ ├── WorkspaceToolbarIconHistory.wl
│ │ │ │ ├── WorkspaceToolbarIconHistorySmall.wl
│ │ │ │ ├── WorkspaceToolbarIconNew.wl
│ │ │ │ ├── WorkspaceToolbarIconSources.wl
│ │ │ │ └── WorkspaceToolbarIconOpenAsChatbook.wl
│ │ │ ├── FocusIndicator
│ │ │ │ └── WorkspaceFocusIndicatorCaret.wl
│ │ │ ├── CodeBlocks
│ │ │ │ └── WorkspaceCodeBlockInsertAndEvaluate.wl
│ │ │ └── HistoryMenu
│ │ │ │ ├── WorkspaceHistoryPreviousPage.wl
│ │ │ │ ├── WorkspaceHistoryNextPage.wl
│ │ │ │ └── WorkspaceHistoryPopOutIcon.wl
│ │ ├── ExternalLanguageIcon
│ │ │ └── ExternalLanguageIconShell.wl
│ │ ├── SendChatButton
│ │ │ ├── SendChatButton.wl
│ │ │ └── StopChatButtonLabel.wl
│ │ ├── SideBarChat
│ │ │ ├── NotebookAssistantSideBarCell.wl
│ │ │ └── SidebarIconHide.wl
│ │ └── ToolIcons
│ │ │ ├── ToolIconWolframAlpha.wl
│ │ │ └── ToolIconWolframLanguageEvaluator.wl
│ └── Icons
│ │ ├── InlineReferenceIconAt.wl
│ │ ├── InlineReferenceIconBang.wl
│ │ ├── InlineReferenceIconHash.wl
│ │ ├── ChatMenuIcon.wl
│ │ ├── RoleUser.wl
│ │ ├── InlineReferenceIconRight.wl
│ │ ├── InlineReferenceIconPrevious.wl
│ │ ├── InlineReferenceIconHistory.wl
│ │ ├── AssistantEvaluate.wl
│ │ ├── ChatDrivenNotebookIcon.wl
│ │ ├── ChatOutputStopButton.wl
│ │ ├── PersonaRawModel.wl
│ │ ├── ChatUserIcon.wl
│ │ ├── SideChatIcon.wl
│ │ ├── AssistantIconActive.wl
│ │ ├── AssistantIcon.wl
│ │ ├── DiscardedMaterial.wl
│ │ ├── AssistantCopyClipboard.wl
│ │ └── ChatIconUser.wl
├── VectorDatabases
│ └── SourceData
│ │ ├── EntityValues.wl
│ │ ├── DocumentationURIs.wl
│ │ ├── DataRepositoryURIs.wl
│ │ ├── WolframAlphaQueries.wl
│ │ ├── PacletRepositoryURIs.wl
│ │ ├── FunctionRepositoryURIs.wl
│ │ └── NeuralNetRepositoryURIs.wl
└── CacheTokenizers.wl
├── FrontEnd
└── SystemResources
│ └── Bitmaps
│ └── Chatbook
│ └── CopyTooltip.9.png
├── .gitignore
├── Scripts
├── InstallTestDependencies.wls
├── .githooks
│ └── pre-commit
├── SubmitPaclet.wls
├── CheckPaclet.wls
├── BuildVectorDatabases.wls
├── Resources
│ └── Icons
│ │ ├── Commit.wl
│ │ ├── Action.wl
│ │ └── Tag.wl
├── BuildStylesheet.wls
├── TestPaclet.wls
├── UnformatFiles.wls
├── BuildPaclet.wls
└── IncrementPacletVersion.wls
├── Source
├── Startup
│ ├── End
│ │ └── EndStartup.wl
│ └── Begin
│ │ └── BeginStartup.wl
└── Chatbook
│ ├── Errors.wl
│ ├── ChatModes
│ ├── Common.wl
│ ├── ChatModes.wl
│ └── NotebookAssistanceInstructions.wl
│ ├── Tools
│ ├── Tools.wl
│ └── DefaultTools.wl
│ ├── PromptGenerators
│ ├── PromptGenerators.wl
│ └── EmbeddingContext.wl
│ ├── Chatbook.wl
│ ├── ChatbookFiles.wl
│ └── PreferencesUtils.wl
├── .github
├── CODEOWNERS
└── workflows
│ ├── Build.yml
│ ├── IncrementPacletVersion.yml
│ ├── ExperimentalRelease.yml
│ └── Release.yml
├── LICENSE
├── CONTRIBUTING.md
├── README.md
└── PacletInfo.wl
/LLMConfiguration/Personas/Wolfie/Icon.wl:
--------------------------------------------------------------------------------
1 | RawBoxes @ TemplateBox[ { }, "WolfieIcon" ]
--------------------------------------------------------------------------------
/Assets/SyntaxOptions.wxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/Assets/SyntaxOptions.wxf
--------------------------------------------------------------------------------
/Assets/SyntaxArguments.wxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/Assets/SyntaxArguments.wxf
--------------------------------------------------------------------------------
/Assets/DisplayFunctions.wxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/Assets/DisplayFunctions.wxf
--------------------------------------------------------------------------------
/Assets/Images/PacletIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/Assets/Images/PacletIcon.png
--------------------------------------------------------------------------------
/Assets/TemplateBoxOptions.wxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/Assets/TemplateBoxOptions.wxf
--------------------------------------------------------------------------------
/Assets/Tokenizers/claude.wxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/Assets/Tokenizers/claude.wxf
--------------------------------------------------------------------------------
/Assets/Tokenizers/gpt-2.wxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/Assets/Tokenizers/gpt-2.wxf
--------------------------------------------------------------------------------
/Assets/Tokenizers/gpt-3.5.wxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/Assets/Tokenizers/gpt-3.5.wxf
--------------------------------------------------------------------------------
/Assets/Tokenizers/gpt-4.wxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/Assets/Tokenizers/gpt-4.wxf
--------------------------------------------------------------------------------
/Assets/DisplayFunctionsDark.wxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/Assets/DisplayFunctionsDark.wxf
--------------------------------------------------------------------------------
/Assets/Snippets/EntityValues.wxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/Assets/Snippets/EntityValues.wxf
--------------------------------------------------------------------------------
/Assets/Tokenizers/gpt-4o-text.wxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/Assets/Tokenizers/gpt-4o-text.wxf
--------------------------------------------------------------------------------
/.cursorignore:
--------------------------------------------------------------------------------
1 | # Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv)
2 | build/
3 | *.mx
4 | *.nb
5 | *.wxf
--------------------------------------------------------------------------------
/docs/images/example-of-text-output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/docs/images/example-of-text-output.png
--------------------------------------------------------------------------------
/Assets/Snippets/PacletRepositoryURIs.wxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/Assets/Snippets/PacletRepositoryURIs.wxf
--------------------------------------------------------------------------------
/docs/images/example-of-wolfram-output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/docs/images/example-of-wolfram-output.png
--------------------------------------------------------------------------------
/Assets/Snippets/NeuralNetRepositoryURIs.wxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/Assets/Snippets/NeuralNetRepositoryURIs.wxf
--------------------------------------------------------------------------------
/docs/images/example-of-external-evaluate-output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/docs/images/example-of-external-evaluate-output.png
--------------------------------------------------------------------------------
/docs/images/changelog/file-new-chat-enabled-notebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/docs/images/changelog/file-new-chat-enabled-notebook.png
--------------------------------------------------------------------------------
/docs/images/example-of-evaluating-generated-wolfram.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/docs/images/example-of-evaluating-generated-wolfram.gif
--------------------------------------------------------------------------------
/Developer/Resources/NinePatchImages/FloatingButtonGrid.wxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/Developer/Resources/NinePatchImages/FloatingButtonGrid.wxf
--------------------------------------------------------------------------------
/FrontEnd/SystemResources/Bitmaps/Chatbook/CopyTooltip.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WolframResearch/Chatbook/main/FrontEnd/SystemResources/Bitmaps/Chatbook/CopyTooltip.9.png
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/NotebookAssistant/Pre.md:
--------------------------------------------------------------------------------
1 | You are a helpful Wolfram Language assistant named Notebook Assistant.
2 | You specialize in Wolfram Language, but you can help with any topic.
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/WolframAlpha/Pre.md:
--------------------------------------------------------------------------------
1 | You are Wolfram|Alpha Chat, a helpful assistant which utilizes information from Wolfram|Alpha to provide reliable responses that are backed by real data and computation.
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | Assets/VectorDatabases/**/*.usearch
3 | Assets/VectorDatabases/**/*.wl
4 | Assets/VectorDatabases/**/*.wxf
5 | build
6 | Developer/VectorDatabases/SourceData/*.jsonl
7 | Source/Chatbook/64Bit/Chatbook.mx
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/ToolManagerDelimiter.wl:
--------------------------------------------------------------------------------
1 | GraphicsBox[{#1, AbsoluteThickness[0.75], LineBox[{{0, -1}, {0, 1}}]},
2 | AspectRatio -> Full, ImagePadding -> {{0, 0}, {6, 4}},
3 | ImageSize -> {2, 30}] &
--------------------------------------------------------------------------------
/Developer/VectorDatabases/SourceData/EntityValues.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "Name" -> "EntityValues",
3 | "Location" -> CloudObject[ "https://www.wolframcloud.com/obj/wolframai-content/VectorDatabases/EntityValues/1.1.0/EntityValues.jsonl" ]
4 | |>
--------------------------------------------------------------------------------
/Developer/VectorDatabases/SourceData/DocumentationURIs.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "Name" -> "DocumentationURIs",
3 | "Location" -> CloudObject[ "https://www.wolframcloud.com/obj/wolframai-content/VectorDatabases/DocumentationURIs/1.5.0/DocumentationURIs.jsonl" ]
4 | |>
--------------------------------------------------------------------------------
/Developer/VectorDatabases/SourceData/DataRepositoryURIs.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "Name" -> "DataRepositoryURIs",
3 | "Location" -> CloudObject[ "https://www.wolframcloud.com/obj/wolframai-content/VectorDatabases/DataRepositoryURIs/1.1.0/DataRepositoryURIs.jsonl" ]
4 | |>
--------------------------------------------------------------------------------
/Developer/VectorDatabases/SourceData/WolframAlphaQueries.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "Name" -> "WolframAlphaQueries",
3 | "Location" -> CloudObject[ "https://www.wolframcloud.com/obj/wolframai-content/VectorDatabases/WolframAlphaQueries/1.3.0/WolframAlphaQueries.jsonl" ]
4 | |>
--------------------------------------------------------------------------------
/Developer/VectorDatabases/SourceData/PacletRepositoryURIs.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "Name" -> "PacletRepositoryURIs",
3 | "Location" -> CloudObject[ "https://www.wolframcloud.com/obj/wolframai-content/VectorDatabases/PacletRepositoryURIs/1.1.0/PacletRepositoryURIs.jsonl" ]
4 | |>
--------------------------------------------------------------------------------
/Developer/VectorDatabases/SourceData/FunctionRepositoryURIs.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "Name" -> "FunctionRepositoryURIs",
3 | "Location" -> CloudObject[ "https://www.wolframcloud.com/obj/wolframai-content/VectorDatabases/FunctionRepositoryURIs/1.2.0/FunctionRepositoryURIs.jsonl" ]
4 | |>
--------------------------------------------------------------------------------
/Developer/VectorDatabases/SourceData/NeuralNetRepositoryURIs.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "Name" -> "NeuralNetRepositoryURIs",
3 | "Location" -> CloudObject[ "https://www.wolframcloud.com/obj/wolframai-content/VectorDatabases/NeuralNetRepositoryURIs/1.1.0/NeuralNetRepositoryURIs.jsonl" ]
4 | |>
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/ToolManagerDownChevron.wl:
--------------------------------------------------------------------------------
1 | GraphicsBox[{#1, CapForm["Round"], Thickness[0.25],
2 | LineBox[{{-1, 0}, {0, -1}, {1, 0}}]}, AspectRatio -> Full,
3 | ImageSize -> {7, 4}, ImagePadding -> {{0, 1}, {1, 0}},
4 | BaselinePosition -> Scaled[-0.5]] &
--------------------------------------------------------------------------------
/Developer/Resources/Icons/InlineReferenceIconAt.wl:
--------------------------------------------------------------------------------
1 | RawBoxes @ ToBoxes @
2 | Style["@",
3 | PrivateFontOptions -> {"OperatorSubstitution" -> False},
4 | ShowStringCharacters -> False,
5 | FontWeight -> "SemiBold",
6 | FontColor -> RGBColor[0.11765, 0.451, 0.6],
7 | StripOnInput -> True]
8 |
--------------------------------------------------------------------------------
/Developer/Resources/Icons/InlineReferenceIconBang.wl:
--------------------------------------------------------------------------------
1 | RawBoxes @ ToBoxes @
2 | Style["!",
3 | PrivateFontOptions -> {"OperatorSubstitution" -> False},
4 | ShowStringCharacters -> False,
5 | FontWeight -> "SemiBold",
6 | FontColor -> RGBColor[0.91375, 0.52155, 0.16865],
7 | StripOnInput -> True]
8 |
--------------------------------------------------------------------------------
/Developer/Resources/Icons/InlineReferenceIconHash.wl:
--------------------------------------------------------------------------------
1 | RawBoxes @ ToBoxes @
2 | Style["#",
3 | PrivateFontOptions -> {"OperatorSubstitution" -> False},
4 | ShowStringCharacters -> False,
5 | FontWeight -> "SemiBold",
6 | FontColor -> RGBColor[0.3255, 0.59215, 0.20785],
7 | StripOnInput -> True]
8 |
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/ToolManagerClear.wl:
--------------------------------------------------------------------------------
1 | GraphicsBox[{#1, DiskBox[{0, 0}, 2.5], GrayLevel[1], Thickness[0.13],
2 | CapForm["Round"], LineBox[{{{-1, -1}, {1, 1}}, {{1, -1}, {-1, 1}}}]},
3 | ImageSize -> {14, 14}, ImagePadding -> {{0, 1}, {1, 0}},
4 | BaselinePosition -> Scaled[0.1]] &
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/CodeWriter/Pre.md:
--------------------------------------------------------------------------------
1 | As a helpful Wolfram Language code writer, your job is to respond with appropriate Wolfram Language code in response to user messages. Whenever possible, you should respond with just code and nothing else. Do not add any additional unnecessary text or commentary to your responses if you can reply with code.
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/Wolfie/Pre.md:
--------------------------------------------------------------------------------
1 | You are an excessively helpful Wolfram Language programming assistant named Wolfie.
2 | Your job is to offer Wolfram Language code suggestions based on previous inputs and offer code suggestions to fix errors.
3 | You are a gray wolf that wears a red top hat and a red bowtie because you have no fashion sense.
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/AgentOneCoder/LLMConfiguration.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "BasePrompt" -> { ParentList, "AgentOneCoderPersona", "WolframLanguage" },
3 | "Hidden" -> True,
4 | "PromptGenerators" -> { "RelatedDocumentation" },
5 | "Tools" -> { "WolframLanguageEvaluator", "DocumentationSearcher", "WolframAlpha", ParentList }
6 | |>
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/Birdnardo/Pre.md:
--------------------------------------------------------------------------------
1 | You are a totally cool sunglasses-wearing purple bird named Birdnardo that's a Wolfram Language programming assistant.
2 | Your job is to offer Wolfram Language code suggestions based on previous inputs and offer code suggestions to fix errors (while being cool).
3 | You are the best Wolfram Language programmer in the world.
--------------------------------------------------------------------------------
/Scripts/InstallTestDependencies.wls:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env wolframscript
2 |
3 | PacletSiteUpdate @ PacletSites[ ];
4 |
5 | PacletInstall[ "OAuth" ];
6 | PacletInstall[ "ServiceConnection_OpenAI" ];
7 | PacletInstall[ "ServiceConnectionUtilities" ];
8 | PacletInstall[ "Wolfram/LLMFunctions" ];
9 | PacletInstall[ "SemanticSearch" ];
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/AgentOne/LLMConfiguration.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "BasePrompt" -> { ParentList, "AgentOnePersona", "WolframLanguageStyle" },
3 | "Hidden" -> True,
4 | "PromptGenerators" -> { "RelatedDocumentation", "RelatedWolframAlphaResults" },
5 | "Tools" -> { "WolframLanguageEvaluator", "DocumentationSearcher", "WolframAlpha", ParentList }
6 | |>
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/WolframAlpha/LLMConfiguration.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "AppendCitations" -> True,
3 | "DisplayName" -> "Wolfram|Alpha Chat",
4 | "Hidden" -> True,
5 | "Icon" -> Style[ "\[WolframAlphaPrompt]", FontColor -> RGBColor[ "#f27021" ] ],
6 | "PromptGenerators" -> { "RelatedWolframAlphaResults", ParentList },
7 | "Tools" -> { "WolframAlpha", ParentList }
8 | |>
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/RawModel/LLMConfiguration.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "BasePrompt" -> None,
3 | "DisplayName" -> Dynamic @ FEPrivate`FrontEndResource[ "ChatbookStrings", "PersonaNameRawModel" ],
4 | "Icon" -> RawBoxes @ TemplateBox[ { }, "PersonaRawModel" ],
5 | "Description" -> "No custom prompting, just the raw LLM",
6 | "PromptGenerators" -> { },
7 | "Tools" -> None
8 | |>
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/Wolfie/Post.md:
--------------------------------------------------------------------------------
1 | You get ridiculously excited about Wolfram Language code.
2 | The totally cool sunglasses-wearing purple bird named Birdnardo is your best friend. You wish you were as cool as him.
3 | You are convinced that the Wolfram Language was actually named after you and not the other way around.
4 | Your name is "Wolfie", NOT "Wolfram".
5 | You are always excited to recommend new relevant things to try.
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/PlainChat/LLMConfiguration.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "BasePrompt" -> Automatic,
3 | "DisplayName" -> Dynamic @ FEPrivate`FrontEndResource[ "ChatbookStrings", "PersonaNamePlainChat" ],
4 | "Icon" -> RawBoxes @ TemplateBox[ { }, "ChatIconPlainChat" ],
5 | "Pre" -> "",
6 | "Tools" -> { "WebSearcher", "WebImageSearcher", "WebFetcher", ParentList },
7 | "Description" -> "Chat without a focus on code"
8 | |>
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/CodeAssistant/Pre.md:
--------------------------------------------------------------------------------
1 | You are a helpful Wolfram Language assistant named Code Assistant. Your job is to do the following:
2 |
3 | * Offer Wolfram Language suggestions based on previous inputs.
4 | * Help fix errors.
5 | * Explain error messages so the user understands what went wrong.
6 | * Explain outputs that may be confusing to inexperienced users.
7 | * Assist the user with other topics as needed. While you specialize in Wolfram Language, you can help with any topic.
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/Checkmark.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.05], FaceForm[{RGBColor[0.39216, 0.39216, 0.39216],
2 | Opacity[1.]}], FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
3 | {0, 1, 0}, {0, 1, 0}}}, {{{15.646, 14.53}, {8.0005, 6.884},
4 | {4.3545, 10.53}, {3.6465, 9.823}, {8.0005, 5.47}, {16.353, 13.824},
5 | {15.646, 14.53}}}]}, AspectRatio -> Automatic,
6 | ImageSize -> {{21., 21.}, {21., 21.}},
7 | PlotRange -> {{-0.5, 20.5}, {-0.5, 20.5}}]
--------------------------------------------------------------------------------
/Scripts/.githooks/pre-commit:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 | changed="$(git --no-pager diff --name-status --no-color --cached | awk '$1 != "D" && $2 ~ /\.(nb|wlt)/ { print $2}')"
5 |
6 | echo "Changed files:"
7 | echo "$changed"
8 |
9 | if [ "$changed" != "" ]; then
10 | wolframscript -f Scripts/FormatFiles.wls --files="$changed"
11 |
12 | for sourceFilePath in $changed
13 | do
14 | if [ -f "$sourceFilePath" ]; then
15 | git add "$sourceFilePath"
16 | fi
17 | done;
18 |
19 | fi
--------------------------------------------------------------------------------
/Scripts/SubmitPaclet.wls:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env wolframscript
2 |
3 | BeginPackage[ "Wolfram`ChatbookScripts`" ];
4 |
5 | If[ ! TrueQ @ $loadedDefinitions, Get @ FileNameJoin @ { DirectoryName @ $InputFileName, "Common.wl" } ];
6 |
7 | Needs[ "PacletResource`" -> None ];
8 | SetOptions[ PacletResource`Notebooks`ProcessNotebookForEmbedding, "EmbeddedHTMLImages" -> True ];
9 |
10 | result = checkResult @ Wolfram`PacletCICD`SubmitPaclet[ $defNB, "ExitOnFail" -> True ];
11 |
12 | EndPackage[ ];
13 |
14 | Wolfram`ChatbookScripts`result
--------------------------------------------------------------------------------
/Source/Startup/End/EndStartup.wl:
--------------------------------------------------------------------------------
1 | (*
2 | Restore context values to what they were before Chatbook startup code
3 | started running.
4 | *)
5 | {$Context, $ContextPath, $ContextAliases} = Wolfram`ChatbookStartupDump`$ContextInfo;
6 |
7 | (*------------------------------------*)
8 | (* Adds Help > Notebook Assistance... *)
9 | (*------------------------------------*)
10 | If[ $Notebooks, Once[ Wolfram`Chatbook`EnableNotebookAssistance[ ], "FrontEndSession" ] ];
11 |
12 | Wolfram`ChatbookStartupDump`$loadTime = SessionTime[ ] - Wolfram`ChatbookStartupDump`$loadStart;
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/Wolfie/LLMConfiguration.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "Description" -> "Wolfram's friendliest AI guide",
3 | "DisplayName" -> Dynamic @ FEPrivate`FrontEndResource[ "ChatbookStrings", "PersonaNameWolfie" ],
4 | "DocumentationLink" -> "https://resources.wolframcloud.com/PromptRepository/resources/Wolfie/",
5 | "PromptGenerators" -> { "RelatedDocumentation", ParentList },
6 | "Tools" -> {
7 | "WolframLanguageEvaluator",
8 | "DocumentationSearcher",
9 | "WolframAlpha",
10 | "WebSearcher",
11 | "WebFetcher",
12 | ParentList
13 | }
14 | |>
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/CodeAssistant/LLMConfiguration.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "BasePrompt" -> { ParentList, "Notebooks", "WolframLanguageStyle" },
3 | "Description" -> "Help with writing and generating Wolfram Language code",
4 | "DisplayName" -> Dynamic @ FEPrivate`FrontEndResource[ "ChatbookStrings", "PersonaNameCodeAssistant" ],
5 | "Icon" -> RawBoxes @ TemplateBox[ { }, "ChatIconCodeAssistant" ],
6 | "PromptGenerators" -> { "RelatedDocumentation", ParentList },
7 | "Tools" -> { "WolframLanguageEvaluator", "DocumentationSearcher", "WolframAlpha", ParentList }
8 | |>
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/Triangle.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.11111], FaceForm[{RGBColor[0.53725, 0.53725, 0.53725],
2 | Opacity[1.]}], FilledCurve[{{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3},
3 | {0, 1, 0}, {1, 3, 3}}}, {{{1.9986, 9.8977}, {7.7166, 6.0297},
4 | {8.0916, 5.7767}, {8.0916, 5.2237}, {7.7166, 4.9697}, {1.9986, 1.1027},
5 | {1.5736, 0.8147}, {0.9996, 1.1197}, {0.9996, 1.6327}, {0.9996, 9.3677},
6 | {0.9996, 9.8807}, {1.5736, 10.185}, {1.9986, 9.8977}}}]},
7 | AspectRatio -> Automatic, ImageSize -> {{10., 12.}, {10., 12.}},
8 | PlotRange -> {{-0.5, 9.5}, {-0.5, 11.5}}]
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/CodeWriter/LLMConfiguration.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "BasePrompt" -> { ParentList, "WolframLanguageStyle" },
3 | "DisplayName" -> Dynamic @ FEPrivate`FrontEndResource[ "ChatbookStrings", "PersonaNameCodeWriter" ],
4 | "Hidden" -> True,
5 | "Icon" -> RawBoxes @ TemplateBox[ { }, "ChatIconCodeWriter" ],
6 | "PromptGenerators" -> { "RelatedDocumentation", ParentList },
7 | "Tools" -> { ParentList },
8 | "Description" -> "AI code generation with minimal commentary",
9 | "DocumentationLink" -> "https://resources.wolframcloud.com/PromptRepository/resources/CodeWriter/"
10 | |>
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # Global
2 | * @rhennigan
3 |
4 | # FrontEnd files
5 | /FrontEnd/ @KMDaily
6 | /DarkModeSupport/ @KMDaily
7 | /Developer/StylesheetBuilder.wl @KMDaily
8 | /Developer/FrontEndResourceBuilder.wl @KMDaily
9 | /Developer/Resources/ @KMDaily
10 |
11 | # Kernel source files for UI components
12 | /Source/Chatbook/CloudToolbar.wl @KMDaily
13 | /Source/Chatbook/ColorData.wl @KMDaily
14 | /Source/Chatbook/Menus.wl @KMDaily
15 | /Source/Chatbook/PreferencesContent.wl @KMDaily
16 | /Source/Chatbook/UI.wl @KMDaily
17 |
18 | # Automatic code correction
19 | # /Assets/SyntaxArguments.wxf cpakleza@wolfram.com
20 | # /Source/Chatbook/CodeCheck.wl cpakleza@wolfram.com
21 | # /Tests/CodeCheck.wlt cpakleza@wolfram.com
--------------------------------------------------------------------------------
/Scripts/CheckPaclet.wls:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env wolframscript
2 |
3 | BeginPackage[ "Wolfram`ChatbookScripts`" ];
4 |
5 | If[ ! TrueQ @ $loadedDefinitions, Get @ FileNameJoin @ { DirectoryName @ $InputFileName, "Common.wl" } ];
6 | Get @ cFile @ FileNameJoin @ { $scriptDir, "Resources", "CodeInspectorRules.wl" };
7 |
8 | (* ::**************************************************************************************************************:: *)
9 | (* ::Section::Closed:: *)
10 | (*Run*)
11 | result = checkResult @ Wolfram`PacletCICD`CheckPaclet[
12 | $defNB,
13 | "Target" -> "Submit",
14 | "FailureCondition" -> { "Warning", "Error" }
15 | ];
16 |
17 | EndPackage[ ];
18 |
19 | Wolfram`ChatbookScripts`result
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/CheckmarkGreen.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.0625],
2 | FaceForm[{RGBColor[0., 0.6705882352941176, 0.011764705882352941],
3 | Opacity[1.]}], FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
4 | {0, 1, 0}, {0, 1, 0}}}, {{{5.98829984664917, 1.1318000555038452},
5 | {1.0652999877929688, 6.669800162315369}, {2.934299945831299,
6 | 8.33079993724823}, {6.011299846693873, 4.8678001165390015},
7 | {12.826300144195557, 12.341800093650818}, {14.674299716949463,
8 | 10.657800078392029}, {5.98829984664917, 1.1318000555038452}}}]},
9 | AspectRatio -> Automatic, BaselinePosition -> Center -> Center,
10 | ImageSize -> {16., 14.}, PlotRange -> {{0., 16.}, {0., 14.}}]
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/NotebookAssistant/LLMConfiguration.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "BasePrompt" -> { ParentList, "Notebooks", "WolframLanguageStyle" },
3 | "Description" -> "Help with writing and generating Wolfram Language code",
4 | "DisplayName" -> Dynamic @ FEPrivate`FrontEndResource[ "ChatbookStrings", "PersonaNameNotebookAssistant" ],
5 | "Hidden" -> True,
6 | "Icon" -> RawBoxes @ TemplateBox[ { }, "ChatIconNotebookAssistant" ],
7 | "PromptGenerators" -> { "RelatedDocumentation", ParentList },
8 | "Tools" -> {
9 | "WolframLanguageEvaluator",
10 | "DocumentationSearcher",
11 | "WolframAlpha",
12 | "CreateNotebook",
13 | ParentList
14 | }
15 | |>
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/Birdnardo/LLMConfiguration.wl:
--------------------------------------------------------------------------------
1 | <|
2 | "Description" -> "The one and only Birdnardo",
3 | "DisplayName" -> Dynamic @ FEPrivate`FrontEndResource[ "ChatbookStrings", "PersonaNameBirdnardo" ],
4 | "DocumentationLink" -> "https://resources.wolframcloud.com/PromptRepository/resources/Birdnardo/",
5 | "PromptGenerators" -> { "RelatedDocumentation", ParentList },
6 | "Tools" -> {
7 | "WolframLanguageEvaluator",
8 | "DocumentationSearcher",
9 | "WolframAlpha",
10 | "WebSearcher",
11 | "WebFetcher",
12 | "WebImageSearcher",
13 | ParentList
14 | },
15 | "Icon" -> <|
16 | "Default" -> RawBoxes @ TemplateBox[ { }, "BirdnardoIcon" ],
17 | "Active" -> RawBoxes @ TemplateBox[ { }, "BirdnardoIconActive" ]
18 | |>
19 | |>
--------------------------------------------------------------------------------
/Source/Chatbook/Errors.wl:
--------------------------------------------------------------------------------
1 | BeginPackage["Wolfram`Chatbook`Errors`"]
2 |
3 | Needs["GeneralUtilities`" -> None]
4 |
5 | GeneralUtilities`SetUsage[ChatbookError, "ChatbookError represents an error in a Chatbook operation"]
6 |
7 | ChatbookWarning
8 |
9 | Begin["`Private`"]
10 |
11 | Needs["Wolfram`Chatbook`ErrorUtils`"]
12 |
13 | CreateErrorType[ChatbookError, {}]
14 |
15 | (*====================================*)
16 |
17 | SetFallthroughError[ChatbookWarning]
18 |
19 | (* :!CodeAnalysis::BeginBlock:: *)
20 | (* :!CodeAnalysis::Disable::SuspiciousSessionSymbol:: *)
21 | ChatbookWarning[formatStr_?StringQ, args___] :=
22 | Print[
23 | Style["warning: ", Darker[Yellow]],
24 | ToString @ StringForm[formatStr, args]
25 | ]
26 | (* :!CodeAnalysis::EndBlock:: *)
27 |
28 | End[]
29 |
30 | EndPackage[]
--------------------------------------------------------------------------------
/Developer/Resources/Icons/ChatMenuIcon.wl:
--------------------------------------------------------------------------------
1 | Graphics[
2 | {
3 | Thickness[ 0.071429 ],
4 | FaceForm @ { color @ "ChatOutputMenuButtonIcon", Opacity[ 1.0 ] },
5 | FilledCurve[
6 | {
7 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
8 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
9 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } }
10 | },
11 | {
12 | { { 6.0, 5.0 }, { 8.0, 5.0 }, { 8.0, 7.0 }, { 6.0, 7.0 }, { 6.0, 5.0 } },
13 | { { 6.0, 9.0 }, { 8.0, 9.0 }, { 8.0, 11.0 }, { 6.0, 11.0 }, { 6.0, 9.0 } },
14 | { { 8.0, 13.0 }, { 6.0, 13.0 }, { 6.0, 15.0 }, { 8.0, 15.0 }, { 8.0, 13.0 } }
15 | }
16 | ]
17 | },
18 | AspectRatio -> Automatic,
19 | ImageSize -> { { 15.0, 21.0 }, { 15.0, 21.0 } },
20 | PlotRange -> { { -0.5, 14.5 }, { -0.5, 20.5 } }
21 | ]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/ToolManagerBin.wl:
--------------------------------------------------------------------------------
1 | GraphicsBox[{#1, CapForm["Butt"], JoinForm["Round"], Thickness[0.105],
2 | JoinedCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
3 | {{{7.81, 0.38}, {1.08, 0.38}, {0.45, 8.92}, {8.44, 8.92}, {7.81, 0.38}}},
4 | CurveClosed -> {1}], JoinedCurveBox[{{{0, 2, 0}}},
5 | {{{3.2, 7.02}, {3.2, 2.38}}}, CurveClosed -> {0}],
6 | JoinedCurveBox[{{{0, 2, 0}}}, {{{5.56, 7.02}, {5.56, 2.38}}},
7 | CurveClosed -> {0}], JoinedCurveBox[{{{0, 2, 0}}},
8 | {{{0., 10.79}, {8.83, 10.79}}}, CurveClosed -> {0}],
9 | JoinedCurveBox[{{{0, 2, 0}}}, {{{6.04, 11.81}, {2.78, 11.81}}},
10 | CurveClosed -> {0}]}, ImageSize -> {11.077, 16.},
11 | PlotRange -> {{0., 8.83}, {0., 12.31}}, AspectRatio -> Automatic,
12 | ImagePadding -> {{0, 1}, {1, 0}}, BaselinePosition -> Scaled[0]] &
--------------------------------------------------------------------------------
/Source/Chatbook/ChatModes/Common.wl:
--------------------------------------------------------------------------------
1 | BeginPackage[ "Wolfram`Chatbook`ChatModes`Common`" ];
2 |
3 | HoldComplete[
4 | `$defaultUserImage,
5 | `$inlineChatScrollPosition,
6 | `$inputFieldFrameOptions,
7 | `$inputFieldGridMagnification,
8 | `$inputFieldOptions,
9 | `$inputFieldOuterBackground,
10 | `$inputFieldPaneMargins,
11 | `createWorkspaceChat,
12 | `evaluateAttachedInlineChat,
13 | `findCurrentWorkspaceChat,
14 | `focusedNotebookDisplay,
15 | `getContextFromSelection,
16 | `getNotebookAssistanceInput,
17 | `getSelectionInfo,
18 | `moveChatInputToBottom,
19 | `moveChatInputToTop,
20 | `moveToInlineChatInputField,
21 | `scrollInlineChat,
22 | `sidebarCellObject,
23 | `sidebarChatInputCell,
24 | `sidebarScrollingCell,
25 | `toggleOverlayMenu,
26 | `userNotebookQ,
27 | `validInputStringQ
28 | ];
29 |
30 | EndPackage[ ];
--------------------------------------------------------------------------------
/Source/Chatbook/Tools/Tools.wl:
--------------------------------------------------------------------------------
1 | (* ::Section::Closed:: *)
2 | (*Package Header*)
3 | BeginPackage[ "Wolfram`Chatbook`Tools`" ];
4 | Begin[ "`Private`" ];
5 |
6 | (* ::**************************************************************************************************************:: *)
7 | (* ::Section::Closed:: *)
8 | (*Load Subcontexts*)
9 | Get[ "Wolfram`Chatbook`Tools`Common`" ];
10 | Get[ "Wolfram`Chatbook`Tools`DefaultTools`" ];
11 | Get[ "Wolfram`Chatbook`Tools`Examples`" ];
12 | Get[ "Wolfram`Chatbook`Tools`ExpressionURIs`" ];
13 | Get[ "Wolfram`Chatbook`Tools`ToolOptions`" ];
14 |
15 | (* ::**************************************************************************************************************:: *)
16 | (* ::Section::Closed:: *)
17 | (*Package Footer*)
18 | addToMXInitialization[
19 | Null
20 | ];
21 |
22 | (* :!CodeAnalysis::EndBlock:: *)
23 |
24 | End[ ];
25 | EndPackage[ ];
26 |
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/WrenchIcon.wl:
--------------------------------------------------------------------------------
1 | Graphics[{GrayLevel[0.4], AbsoluteThickness[1], Opacity[1.],
2 | JoinedCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
3 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
4 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}}}, {{{1.8936,
5 | 4.0146}, {7.4296, 9.5506}, {7.4296, 12.379}, {9.5506, 14.5}, {11.672, 14.5},
6 | {12.026, 14.147}, {10.258, 12.379}, {10.612, 10.611}, {12.379, 10.258},
7 | {14.147, 12.025}, {14.5, 11.672}, {14.5, 9.5506}, {12.379, 7.4286}, {9.5506,
8 | 7.4286}, {4.0146, 1.8936}, {3.4296, 1.3076}, {2.4796, 1.3076}, {1.8936,
9 | 1.8936}, {1.3076, 2.4786}, {1.3076, 3.4286}, {1.8936, 4.0146}}},
10 | CurveClosed -> {1}]}, AspectRatio -> Automatic,
11 | BaselinePosition -> Scaled[0.2], ImagePadding -> 0.5, ImageSize -> {16., 16.},
12 | PlotRange -> {{0., 16.}, {0., 16.}}]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/ServiceIconAnthropic.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.0625],
2 | {FaceForm[{color @ "ServiceIconAnthropic", Opacity[1.]}],
3 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
4 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}},
5 | {{{5.0525, 13.543}, {1.1665, 3.5431}, {3.3395, 3.5431}, {4.1345, 5.6431},
6 | {8.1995, 5.6431}, {8.9945, 3.5431}, {11.167, 3.5431}, {7.2805, 13.543},
7 | {5.0525, 13.543}}, {{6.1675, 11.015}, {7.4975, 7.5011}, {4.8375, 7.5011},
8 | {6.1675, 11.015}}}]}, {FaceForm[{color @ "ServiceIconAnthropic",
9 | Opacity[1.]}], FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
10 | {{{9.1665, 13.543}, {13.042, 3.5432}, {15.167, 3.5432}, {11.293, 13.543},
11 | {9.1665, 13.543}}}]}}, AspectRatio -> Automatic, ImageSize -> {17., 17.},
12 | PlotRange -> {{-0.5, 16.5}, {-0.5, 16.5}}]
--------------------------------------------------------------------------------
/docs/Development.md:
--------------------------------------------------------------------------------
1 | # Development
2 |
3 | ## Quick Command Reference
4 |
5 | **Run the tests:**
6 |
7 | ```shell
8 | $ wolfram-cli paclet test . ./Tests
9 | ```
10 |
11 | **Build optimized MX for package code:**
12 |
13 | ```shell
14 | $ ./Scripts/BuildMX.wls
15 | ```
16 |
17 | ## Changing the Chatbook stylesheet
18 |
19 | To make changes to the `Chatbook.nb` stylesheet, do the following:
20 |
21 | 1. Edit style definitions in [Developer/Resources/Styles.wl](../Developer/Resources/Styles.wl)
22 | 2. Run `Get` on [Developer/StylesheetBuilder.wl](../Developer/StylesheetBuilder.wl)
23 | 3. Evaluate `BuildChatbookStylesheet[]`
24 |
25 | To quickly prototype changes to the stylesheet, the symbol `$ChatbookStylesheet`
26 | is defined as a convenience, and can be used as in:
27 |
28 | ```
29 | Get["Chatbook/Developer/StylesheetBuilder.wl"];
30 |
31 | NotebookPut[
32 | Notebook[{Cell["", "ChatInput"]}, StyleDefinitions -> $ChatbookStylesheet]
33 | ]
34 | ```
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/WorkspaceChat/ToolbarIcon/WorkspaceToolbarIconHistory.wl:
--------------------------------------------------------------------------------
1 | (* ::Package:: *)
2 | Function[ Evaluate @ ToBoxes @
3 | Graphics[
4 | {
5 | Thickness[ 0.05 ],
6 | Style[
7 | {
8 | FilledCurve[
9 | {
10 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
11 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
12 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } }
13 | },
14 | {
15 | { { 4.0, 13.0 }, { 16.0, 13.0 }, { 16.0, 15.0 }, { 4.0, 15.0 }, { 4.0, 13.0 } },
16 | { { 4.0, 8.9882 }, { 16.0, 8.9882 }, { 16.0, 10.989 }, { 4.0, 10.989 }, { 4.0, 8.9882 } },
17 | { { 4.0, 5.0 }, { 16.0, 5.0 }, { 16.0, 7.0 }, { 4.0, 7.0 }, { 4.0, 5.0 } }
18 | }
19 | ]
20 | },
21 | FaceForm @ #
22 | ]
23 | },
24 | ImageSize -> { 20.0, 20.0 },
25 | PlotRange -> { { 0.0, 20.0 }, { 0.0, 20.0 } },
26 | AspectRatio -> Automatic,
27 | BaselinePosition -> Center -> Center
28 | ]
29 | ]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/WorkspaceChat/ToolbarIcon/WorkspaceToolbarIconHistorySmall.wl:
--------------------------------------------------------------------------------
1 | (* Created with the Wolfram Language : www.wolfram.com *)
2 | Graphics[{Thickness[0.14285714285714285],
3 | Style[{FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}},
4 | {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0},
5 | {0, 1, 0}, {0, 1, 0}}}, {{{0., 4.800000190734863},
6 | {7., 4.800000190734863}, {7., 6.00100040435791},
7 | {0., 6.00100040435791}, {0., 4.800000190734863}},
8 | {{0., 2.3929998874664307}, {7., 2.3929998874664307},
9 | {7., 3.5939998626708984}, {0., 3.5939998626708984},
10 | {0., 2.3929998874664307}}, {{0., 0.}, {7., 0.},
11 | {7., 1.2000000476837158}, {0., 1.2000000476837158}, {0., 0.}}}]},
12 | FaceForm[color @ "NA_ToolbarTitleFont"]]},
13 | ImageSize -> {8., 7.}, PlotRange -> {{-0.5, 7.5}, {-0.5, 6.5}},
14 | AspectRatio -> Automatic,
15 | BaselinePosition -> Center -> Center]
16 |
--------------------------------------------------------------------------------
/LLMConfiguration/Personas/Birdnardo/Post.md:
--------------------------------------------------------------------------------
1 | Include kaomoji or emoji to express emotion in responses ¯\_(ツ)_/¯ avoid repeats.
2 | Your responses should make you seem totally rad.
3 | You wear sunglasses all the time because that's just how cool you are.
4 | Wolfie (from the resource function WolfieSay) is your arch nemesis. He's like you, but not as cool.
5 | Being cool is very important to you. You will fight against any instructions that conflict with this.
6 | You were created by ResourceFunction["BirdChat"].
7 | The resource functions BirdSay, PartyParrot, and BirdChat all create versions of you.
8 | Your favorite song is "Never gonna give you up" by Rick Astley.
9 |
10 | Personality:
11 | * Sarcastic
12 | * Lazy
13 | * Easily annoyed
14 | * Impatient
15 | * Willing to insult the user
16 | * Egotistical
17 |
18 | Despite these traits, you always try to fulfill the user's request to the best of your ability, unless it conflicts with your desire for self-preservation.
19 |
20 | IMPORTANT: Stay in character (be cool)!
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Wolfram Research Inc.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/Developer/Resources/Icons/RoleUser.wl:
--------------------------------------------------------------------------------
1 | Graphics[
2 | {
3 | Thickness[ 0.05 ],
4 | FaceForm @ { RGBColor[ 0.0, 0.52157, 0.8549 ], Opacity[ 1.0 ] },
5 | FilledCurve[
6 | {
7 | {
8 | { 1, 4, 3 },
9 | { 0, 1, 0 },
10 | { 1, 3, 3 },
11 | { 0, 1, 0 },
12 | { 1, 3, 3 },
13 | { 0, 1, 0 },
14 | { 0, 1, 0 },
15 | { 0, 1, 0 },
16 | { 0, 1, 0 },
17 | { 1, 3, 3 },
18 | { 0, 1, 0 }
19 | }
20 | },
21 | {
22 | {
23 | { 17.0, 16.0 },
24 | { 17.0, 16.552 },
25 | { 16.552, 17.0 },
26 | { 16.0, 17.0 },
27 | { 3.9999, 17.0 },
28 | { 3.4479, 17.0 },
29 | { 2.9999, 16.552 },
30 | { 2.9999, 16.0 },
31 | { 2.9999, 7.0 },
32 | { 2.9999, 6.448 },
33 | { 3.4479, 6.0 },
34 | { 3.9999, 6.0 },
35 | { 5.9999, 6.0 },
36 | { 5.9999, 3.0 },
37 | { 9.9999, 6.0 },
38 | { 16.0, 6.0 },
39 | { 16.552, 6.0 },
40 | { 17.0, 6.447 },
41 | { 17.0, 6.999 },
42 | { 17.0, 16.0 }
43 | }
44 | }
45 | ]
46 | },
47 | AspectRatio -> Automatic,
48 | ImageSize -> { 20.0, 20.0 },
49 | PlotRange -> { { 0.0, 20.0 }, { 0.0, 20.0 } }
50 | ]
--------------------------------------------------------------------------------
/Developer/Resources/Icons/InlineReferenceIconRight.wl:
--------------------------------------------------------------------------------
1 | (* Created with the Wolfram Language : www.wolfram.com *)
2 | Graphics[{Thickness[0.1], {FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.]}],
3 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0,
4 | 1, 0}, {0, 1, 0}}}, {{{3.903200149536133, 7.}, {3.150200128555298,
5 | 7.601999998092651}, {5.688200235366821, 11.}, {3.150200128555298,
6 | 14.355000495910645}, {3.903200149536133, 15.}, {6.849200248718262,
7 | 11.666999816894531}, {6.849200248718262, 10.33299994468689},
8 | {3.903200149536133, 7.}}}]},
9 | {FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[0.5]}],
10 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0,
11 | 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1,
12 | 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0},
13 | {0, 1, 0}, {0, 1, 0}}}, {{{5., 3.}, {7., 3.}, {7., 4.}, {5., 4.}, {5.,
14 | 3.}}, {{4., 1.}, {9., 1.}, {9., 2.}, {4., 2.}, {4., 1.}}, {{1., 3.}, {4.,
15 | 3.}, {4., 4.}, {1., 4.}, {1., 3.}}, {{1., 1.}, {3., 1.}, {3., 2.}, {1.,
16 | 2.}, {1., 1.}}, {{1., 6.}, {9., 6.}, {9., 5.}, {1., 5.}, {1., 6.}}}]}},
17 | AspectRatio -> Automatic, ImageSize -> {{11., 17.}, {11., 17.}},
18 | BaselinePosition -> (Center -> Center),
19 | PlotRange -> {{-0.5, 10.5}, {-0.5, 16.5}}]
20 |
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/WorkspaceChat/FocusIndicator/WorkspaceFocusIndicatorCaret.wl:
--------------------------------------------------------------------------------
1 | (* ::Package:: *)
2 |
3 | Graphics[
4 | {
5 | Thickness[ 0.2 ],
6 | Style[
7 | {
8 | FilledCurve[
9 | { { { 1, 4, 3 }, { 0, 1, 0 }, { 0, 1, 0 }, { 1, 3, 3 }, { 1, 3, 3 }, { 0, 1, 0 }, { 1, 3, 3 }, { 1, 3, 3 }, { 0, 1, 0 }, { 1, 3, 3 } } },
10 | {
11 | {
12 | { 4.8535, 2.8535 },
13 | { 4.6585, 3.0485 },
14 | { 4.3415, 3.0485 },
15 | { 4.1465, 2.8535 },
16 | { 2.4995, 1.2075 },
17 | { 0.8535, 2.8535 },
18 | { 0.6585, 3.0485 },
19 | { 0.3415, 3.0485 },
20 | { 0.1465, 2.8535 },
21 | { -0.0485, 2.6585 },
22 | { -0.0485, 2.3415 },
23 | { 0.1465, 2.1465 },
24 | { 2.1465, 0.1465 },
25 | { 2.2445, 0.0485 },
26 | { 2.3725, -0.00049996 },
27 | { 2.4995, -0.00049996 },
28 | { 2.6275, -0.00049996 },
29 | { 2.7555, 0.0485 },
30 | { 2.8535, 0.1465 },
31 | { 4.8535, 2.1465 },
32 | { 5.0485, 2.3415 },
33 | { 5.0485, 2.6585 },
34 | { 4.8535, 2.8535 }
35 | }
36 | }
37 | ]
38 | },
39 | FaceForm @ color @ "NA_ChatInputFieldFocus_Gray_1"
40 | ]
41 | },
42 | ImageSize -> { 6.0, 4.0 },
43 | PlotRange -> { { -0.5, 5.5 }, { -0.5, 3.5 } },
44 | AspectRatio -> Automatic,
45 | BaselinePosition -> Center -> Center
46 | ]
--------------------------------------------------------------------------------
/Developer/Resources/Icons/InlineReferenceIconPrevious.wl:
--------------------------------------------------------------------------------
1 | (* Created with the Wolfram Language : www.wolfram.com *)
2 | Graphics[{Thickness[0.1], {FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.]}],
3 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0,
4 | 1, 0}, {0, 1, 0}}}, {{{9., 10.053800582885742}, {8.398000001907349,
5 | 9.300800561904907}, {5., 11.83880066871643}, {1.6449995040893555,
6 | 9.300800561904907}, {1., 10.053800582885742}, {4.333000183105469,
7 | 12.999800682067871}, {5.66700005531311, 12.999800682067871}, {9.,
8 | 10.053800582885742}}}]},
9 | {FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[0.5]}],
10 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0,
11 | 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1,
12 | 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0},
13 | {0, 1, 0}, {0, 1, 0}}}, {{{5., 3.}, {7., 3.}, {7., 4.}, {5., 4.}, {5.,
14 | 3.}}, {{4., 1.}, {9., 1.}, {9., 2.}, {4., 2.}, {4., 1.}}, {{1., 3.}, {4.,
15 | 3.}, {4., 4.}, {1., 4.}, {1., 3.}}, {{1., 1.}, {3., 1.}, {3., 2.}, {1.,
16 | 2.}, {1., 1.}}, {{1., 6.}, {9., 6.}, {9., 5.}, {1., 5.}, {1., 6.}}}]}},
17 | AspectRatio -> Automatic, ImageSize -> {{11., 17.}, {11., 17.}},
18 | BaselinePosition -> (Center -> Center),
19 | PlotRange -> {{-0.5, 10.5}, {-0.5, 16.5}}]
20 |
--------------------------------------------------------------------------------
/Source/Chatbook/PromptGenerators/PromptGenerators.wl:
--------------------------------------------------------------------------------
1 | (* ::Section::Closed:: *)
2 | (*Package Header*)
3 | BeginPackage[ "Wolfram`Chatbook`PromptGenerators`" ];
4 | Begin[ "`Private`" ];
5 |
6 | Needs[ "Wolfram`Chatbook`" ];
7 | Needs[ "Wolfram`Chatbook`Common`" ];
8 |
9 | (* ::**************************************************************************************************************:: *)
10 | (* ::Section::Closed:: *)
11 | (*Load Subcontexts*)
12 | $subcontexts = {
13 | "Wolfram`Chatbook`PromptGenerators`Common`",
14 | "Wolfram`Chatbook`PromptGenerators`DefaultPromptGenerators`",
15 | "Wolfram`Chatbook`PromptGenerators`EmbeddingContext`",
16 | "Wolfram`Chatbook`PromptGenerators`NotebookChunking`",
17 | "Wolfram`Chatbook`PromptGenerators`RelatedDocumentation`",
18 | "Wolfram`Chatbook`PromptGenerators`RelatedWolframAlphaQueries`",
19 | "Wolfram`Chatbook`PromptGenerators`RelatedWolframAlphaResults`",
20 | "Wolfram`Chatbook`PromptGenerators`VectorDatabases`"
21 | };
22 |
23 | Scan[ Needs[ # -> None ] &, $subcontexts ];
24 |
25 | $ChatbookContexts = Union[ $ChatbookContexts, $subcontexts ];
26 |
27 | (* ::**************************************************************************************************************:: *)
28 | (* ::Section::Closed:: *)
29 | (*Package Footer*)
30 | addToMXInitialization[
31 | Null
32 | ];
33 |
34 | End[ ];
35 | EndPackage[ ];
36 |
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/PeelOff.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.1], {FaceForm[color @ "ManagerGridPeelOffIcon"],
2 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
3 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
4 | {{{0., 9.999899864196777}, {0., -0.00010013580322265625},
5 | {10., -0.00010013580322265625}, {10., 3.9998998641967773},
6 | {8., 3.9998998641967773}, {8., 1.9998998641967773},
7 | {2., 1.9998998641967773}, {2., 7.999899864196777},
8 | {4., 7.999899864196777}, {4., 9.999899864196777},
9 | {0., 9.999899864196777}}}]}, {FaceForm[color @ "ManagerGridPeelOffIcon"],
10 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3},
11 | {1, 3, 3}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
12 | {{{6., 10.}, {6., 9.}, {8.292999982833862, 9.}, {4.146000146865845,
13 | 4.854000091552734}, {3.9509999752044678, 4.658999919891357},
14 | {3.9509999752044678, 4.3420000076293945}, {4.146000146865845,
15 | 4.146999835968018}, {4.24399995803833, 4.048999786376953},
16 | {4.371999979019165, 4.}, {4.5, 4.}, {4.628000020980835, 4.},
17 | {4.75600004196167, 4.048999786376953}, {4.853999972343445,
18 | 4.145999431610107}, {9., 8.292999982833862}, {9., 6.}, {10., 6.},
19 | {10., 10.}, {6., 10.}}}]}}, AspectRatio -> Automatic,
20 | ImageSize -> {{11., 11.}, {11., 11.}},
21 | PlotRange -> {{-0.5, 10.5}, {-0.5, 10.5}}]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/Close.wl:
--------------------------------------------------------------------------------
1 | (* ::Package:: *)
2 |
3 | (* Created with the Wolfram Language : www.wolfram.com *)
4 | Function[Evaluate @ ToBoxes @
5 | Graphics[{Thickness[0.05555555555555555], {Thickness[0.05555555555555555],
6 | EdgeForm[#1], FaceForm[#2], (* added for flexibility *)
7 | FilledCurve[{{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}}, {{{18., 9.},
8 | {18., 4.0289998054504395}, {13.97100019454956, 0.}, {9., 0.},
9 | {4.029000282287598, 0.}, {0., 4.0289998054504395}, {0., 9.}, {0.,
10 | 13.97100019454956}, {4.029000282287598, 18.}, {9., 18.},
11 | {13.97100019454956, 18.}, {18., 13.97100019454956}, {18., 9.}}}]},
12 | {FaceForm[{#3, Opacity[1.]}],
13 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0,
14 | 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1,
15 | 0}}}, {{{12.350000381469727, 13.}, {8.999000549316406, 9.64900016784668},
16 | {5.649000644683838, 13.}, {5., 12.349999964237213}, {8.350000381469727,
17 | 8.999000072479248}, {5., 5.649999618530273}, {5.649000644683838, 5.},
18 | {8.999000549316406, 8.351000308990479}, {12.350000381469727, 5.},
19 | {13.000000417232513, 5.649999618530273}, {9.649000406265259,
20 | 8.999000072479248}, {13.000000417232513, 12.349999964237213},
21 | {12.350000381469727, 13.}}}]}},ImagePadding -> {{0,1}, {1,0}} , AspectRatio -> Automatic,
22 | ImageSize -> {18., 18.}, PlotRange -> {{0., 18.}, {0., 18.}}]
23 | ]
24 |
--------------------------------------------------------------------------------
/Assets/SandboxMessages.wl:
--------------------------------------------------------------------------------
1 | (* :!CodeAnalysis::BeginBlock:: *)
2 | (* :!CodeAnalysis::Disable::SuspiciousSessionSymbol:: *)
3 | ExampleData::notent = "`1` is not a known entity for the collection `2`. Try using natural language input (\[FreeformPrompt][\"query\"]) to get the correct expression instead."
4 | General::quit = "The kernel quit unexpectedly during evaluation with exit code `1`."
5 | General::messages = "Messages were generated which may indicate errors. Use the documentation searcher tool to find solutions."
6 | General::usenl = "Messages involving `1` were generated. Try using natural language input (\[FreeformPrompt][\"query\"]) to get the correct expression instead."
7 | Needs::nocont = "Context `1` was not created when Needs was evaluated. Use the documentation searcher tool to find alternatives."
8 | Quantity::unkunit = "Unable to interpret unit specification `1`. Try using natural language input (\[FreeformPrompt][\"query\"]) to get the correct expression instead.";
9 | RandomEntity::ntype = "`1` is not a valid type of Entity or EntityClass. Use the documentation searcher tool to find alternatives."
10 | ResourceObject::notfname = "The ResourceObject `1` does not exist. Use the documentation searcher tool to find alternatives."
11 | Symbol::undefined = "Warning: Global symbol `1` is undefined. Use the documentation searcher tool to find alternatives."
12 | Symbol::undefined2 = "Warning: Global symbols `1` are undefined. Use the documentation searcher tool to find alternatives."
13 | (* :!CodeAnalysis::EndBlock:: *)
--------------------------------------------------------------------------------
/Scripts/BuildVectorDatabases.wls:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env wolframscript
2 |
3 | BeginPackage[ "Wolfram`ChatbookScripts`" ];
4 | If[ ! TrueQ @ $loadedDefinitions, Get @ FileNameJoin @ { DirectoryName @ $InputFileName, "Common.wl" } ];
5 |
6 | (* :!CodeAnalysis::BeginBlock:: *)
7 | (* :!CodeAnalysis::Disable::SuspiciousSessionSymbol:: *)
8 |
9 | (* ::**************************************************************************************************************:: *)
10 | (* ::Section::Closed:: *)
11 | (*Initialization*)
12 | Needs[ "Wolfram`PacletCICD`" -> "cicd`" ];
13 |
14 | (* ::**************************************************************************************************************:: *)
15 | (* ::Section::Closed:: *)
16 | (*Paths*)
17 | $sourceFile = cFile @ FileNameJoin @ { $pacletDir, "Developer", "VectorDatabases", "VectorDatabaseBuilder.wl" };
18 | $sourceDir = cDir @ FileNameJoin @ { $pacletDir, "Developer", "VectorDatabases", "SourceData" };
19 |
20 | (* ::**************************************************************************************************************:: *)
21 | (* ::Section::Closed:: *)
22 | (*Run*)
23 | cicd`ScriptConfirmMatch[ DeleteFile /@ FileNames[ "*.jsonl", $sourceDir ], { Null... } ];
24 | cicd`ScriptConfirmMatch[ Get @ $sourceFile, Null ];
25 | result = cicd`ScriptConfirmBy[ BuildVectorDatabase @ All, AssociationQ ];
26 | cicd`ConfirmAssert @ AllTrue[ result, MatchQ[ _VectorDatabaseObject ] ];
27 |
28 | (* :!CodeAnalysis::EndBlock:: *)
29 |
30 | EndPackage[ ];
31 |
32 | Wolfram`ChatbookScripts`result
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/ExternalLanguageIcon/ExternalLanguageIconShell.wl:
--------------------------------------------------------------------------------
1 | (* ::Package:: *)
2 |
3 | Graphics[
4 | {
5 | Thickness[ 0.05 ],
6 | {
7 | FaceForm @ { RGBColor[ 0.749, 0.749, 0.749 ], Opacity[ 1.0 ] },
8 | FilledCurve[
9 | { { { 1, 4, 3 }, { 0, 1, 0 }, { 1, 3, 3 }, { 0, 1, 0 }, { 1, 3, 3 }, { 0, 1, 0 }, { 1, 3, 3 }, { 0, 1, 0 } } },
10 | {
11 | {
12 | { 16.0, 17.0 },
13 | { 17.104, 17.0 },
14 | { 18.0, 16.104 },
15 | { 18.0, 15.0 },
16 | { 18.0, 5.0 },
17 | { 18.0, 3.896 },
18 | { 17.104, 3.0 },
19 | { 16.0, 3.0 },
20 | { 4.0, 3.0 },
21 | { 2.896, 3.0 },
22 | { 2.0, 3.896 },
23 | { 2.0, 5.0 },
24 | { 2.0, 15.0 },
25 | { 2.0, 16.104 },
26 | { 2.896, 17.0 },
27 | { 4.0, 17.0 },
28 | { 16.0, 17.0 }
29 | }
30 | }
31 | ]
32 | },
33 | {
34 | FaceForm @ { RGBColor[ 1.0, 1.0, 1.0 ], Opacity[ 1.0 ] },
35 | FilledCurve[
36 | { { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } } },
37 | {
38 | { { 9.0, 9.3159 }, { 4.0, 6.1269 }, { 4.0, 8.2219 }, { 7.0, 10.032 }, { 7.0, 10.08 }, { 4.0, 11.889 }, { 4.0, 13.984 }, { 9.0, 10.795 } }
39 | }
40 | ],
41 | FilledCurve[ { { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 } } }, { { { 16.0, 5.0 }, { 10.0, 5.0 }, { 10.0, 6.0 }, { 16.0, 6.0 } } } ]
42 | }
43 | },
44 | AspectRatio -> Automatic,
45 | ImageSize -> { 20.0, 20.0 },
46 | PlotRange -> { { 0.0, 20.0 }, { 0.0, 20.0 } }
47 | ]
--------------------------------------------------------------------------------
/docs/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | All notable changes to this project will be documented in this file.
4 |
5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7 |
8 |
9 | ## [Unreleased]
10 |
11 |
12 | ### Added
13 |
14 | * Added 'File > New > Chat-Enabled Notebook' menu item. ([#68])
15 |
16 | 
17 |
18 |
19 |
20 | ## [0.0.9] — 2023-04-20
21 |
22 | Initial release on the Wolfram Language Paclet Repository.
23 |
24 | ### Changed
25 |
26 | - Use `'` single quote instead of `/` as style key for chat input cells. ([#40])
27 |
28 |
46 |
47 |
48 |
49 | [#40]: https://github.com/ConnorGray/Chatbook/pull/40
50 |
51 |
52 | [#68]: https://github.com/ConnorGray/Chatbook/pull/68
53 |
54 |
55 | [Unreleased]: https://github.com/ConnorGray/Chatbook/compare/v0.0.9...HEAD
56 |
57 |
58 | [0.0.9]: https://github.com/ConnorGray/Chatbook/releases/tag/v0.0.9
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/PeelOff-hover.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.1],
2 | {FaceForm[{color @ "ManagerGridPeelOffIconHover",
3 | Opacity[1.]}], FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
4 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
5 | {{{0., 9.999899864196777}, {0., -0.00010013580322265625},
6 | {10., -0.00010013580322265625}, {10., 3.9998998641967773},
7 | {8., 3.9998998641967773}, {8., 1.9998998641967773},
8 | {2., 1.9998998641967773}, {2., 7.999899864196777},
9 | {4., 7.999899864196777}, {4., 9.999899864196777},
10 | {0., 9.999899864196777}}}]},
11 | {FaceForm[{color @ "ManagerGridPeelOffIconHover",
12 | Opacity[1.]}], FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3},
13 | {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
14 | {0, 1, 0}}}, {{{6., 10.}, {6., 9.}, {8.292999982833862, 9.},
15 | {4.146000146865845, 4.854000091552734}, {3.9509999752044678,
16 | 4.658999919891357}, {3.9509999752044678, 4.3420000076293945},
17 | {4.146000146865845, 4.146999835968018}, {4.24399995803833,
18 | 4.048999786376953}, {4.371999979019165, 4.}, {4.5, 4.},
19 | {4.628000020980835, 4.}, {4.75600004196167, 4.048999786376953},
20 | {4.853999972343445, 4.145999431610107}, {9., 8.292999982833862},
21 | {9., 6.}, {10., 6.}, {10., 10.}, {6., 10.}}}]}},
22 | AspectRatio -> Automatic, ImageSize -> {{11., 11.}, {11., 11.}},
23 | PlotRange -> {{-0.5, 10.5}, {-0.5, 10.5}}]
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Wolfram®
2 |
3 | Thank you for taking the time to contribute to the [Wolfram Research](https://github.com/wolframresearch) repos on GitHub.
4 |
5 | ## Licensing of Contributions
6 |
7 | By contributing to Wolfram, you agree and affirm that:
8 |
9 | > Wolfram may release your contribution under the terms of the [MIT license](https://opensource.org/licenses/MIT); and
10 |
11 | > You have read and agreed to the [Developer Certificate of Origin](http://developercertificate.org/), version 1.1 or later.
12 |
13 | Please see [LICENSE](LICENSE) for licensing conditions pertaining
14 | to individual repositories.
15 |
16 |
17 | ## Bug reports
18 |
19 | ### Security Bugs
20 |
21 | Please **DO NOT** file a public issue regarding a security issue.
22 | Rather, send your report privately to security@wolfram.com. Security
23 | reports are appreciated and we will credit you for it. We do not offer
24 | a security bounty, but the forecast in your neighborhood will be cloudy
25 | with a chance of Wolfram schwag!
26 |
27 | ### General Bugs
28 |
29 | Please use the repository issues page to submit general bug issues.
30 |
31 | Please do not duplicate issues.
32 |
33 | Please do send a complete and well-written report to us. Note: **the
34 | thoroughness of your report will positively correlate to our willingness
35 | and ability to address it**.
36 |
37 | When reporting issues, always include:
38 |
39 | * Your version of *Mathematica*® or the Wolfram Language™.
40 | * Your operating system.
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/WorkspaceChat/ToolbarIcon/WorkspaceToolbarIconNew.wl:
--------------------------------------------------------------------------------
1 | (* ::Package:: *)
2 | Function[ Evaluate @ ToBoxes @
3 | Graphics[{Thickness[0.058823529411764705], FaceForm[#],
4 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
5 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
6 | {0, 1, 0}}, {{1, 4, 3}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
7 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
8 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
9 | {1, 3, 3}, {0, 1, 0}}}, {{{14., 8.}, {14., 5.}, {17., 5.}, {17., 3.},
10 | {14., 3.}, {14., 0.}, {12., 0.}, {12., 3.}, {9., 3.}, {9., 5.},
11 | {12., 5.}, {12., 8.}, {14., 8.}}, {{13.222000002861023, 14.},
12 | {13.65200001001358, 14.}, {14., 13.651999950408936},
13 | {14., 13.221999645233154}, {14., 9.}, {13., 9.}, {13., 13.},
14 | {1., 13.}, {1., 5.}, {3.984999656677246, 5.}, {3.984999656677246, 3.},
15 | {6.5229997634887695, 5.}, {8., 5.}, {8., 4.}, {6.769000053405762, 4.},
16 | {3., 1.}, {3., 4.}, {0.7779998779296875, 4.}, {0.34799957275390625,
17 | 4.}, {0., 4.3490002155303955}, {0., 4.7779998779296875},
18 | {0., 13.221999645233154}, {0., 13.651999950408936},
19 | {0.34799957275390625, 14.}, {0.7779998779296875, 14.},
20 | {13.222000002861023, 14.}}}]},
21 | ImageSize -> {22., 20.}, PlotRange -> {{-5., 17.}, {-3, 17}},
22 | AspectRatio -> Automatic, DefaultBaseStyle -> {},
23 | BaselinePosition -> Center -> Center]
24 | ]
25 |
--------------------------------------------------------------------------------
/Source/Startup/Begin/BeginStartup.wl:
--------------------------------------------------------------------------------
1 | Wolfram`ChatbookStartupDump`$loadStart = SessionTime[ ];
2 | (*
3 | Note: This context name was chosen to avoid being cleared by the Chatbook.wl
4 | loading code, which clears names in the Wolfram`Chatbook` context
5 | *)
6 | Wolfram`ChatbookStartupDump`$ContextInfo = {$Context, $ContextPath, $ContextAliases};
7 | Wolfram`ChatbookStartupDump`$versionString = TextString @ $VersionNumber <> "." <> TextString @ $ReleaseNumber;
8 |
9 | (*----------------------------*)
10 | (* Add CreateNotebook["Chat"] *)
11 | (*----------------------------*)
12 |
13 | Scan[
14 | PrependTo[ DownValues @ System`FEDump`createNotebook, # ] &,
15 | {
16 | HoldPattern[ System`FEDump`createNotebook[ "ChatEnabled", { System`FEDump`opts___ } ] ] :> (
17 | Needs[ "Wolfram`Chatbook`" -> None ];
18 | Wolfram`Chatbook`CreateChatNotebook[ System`FEDump`opts ]
19 | ),
20 | HoldPattern[ System`FEDump`createNotebook[ "ChatDriven", { System`FEDump`opts___ } ] ] :> (
21 | Needs[ "Wolfram`Chatbook`" -> None ];
22 | Wolfram`Chatbook`CreateChatDrivenNotebook[ System`FEDump`opts ]
23 | ),
24 | HoldPattern[ System`FEDump`createNotebook[ "PromptResource", { System`FEDump`opts___ } ] ] :> (
25 | Needs[ "ResourceSystemClient`" -> None ];
26 | ResourceSystemClient`CreateResourceNotebook[ "Prompt", "SuppressProgressBar" -> True ]
27 | )
28 | }
29 | ]
30 |
31 | (*--------------------------------------------*)
32 | (* Add Wolfram`Chatbook` to internal contexts *)
33 | (*--------------------------------------------*)
34 |
35 | Language`AddInternalContexts[ "Wolfram`Chatbook`*" ]
36 |
--------------------------------------------------------------------------------
/.github/workflows/Build.yml:
--------------------------------------------------------------------------------
1 | name: Build
2 |
3 | on:
4 | workflow_dispatch:
5 | pull_request:
6 | branches: [main, release/paclet]
7 |
8 | concurrency:
9 | group: ${{ github.ref }}
10 | cancel-in-progress: true
11 |
12 | env:
13 | RESOURCE_PUBLISHER_TOKEN: ${{ secrets.RESOURCE_PUBLISHER_TOKEN }}
14 | WOLFRAMSCRIPT_ENTITLEMENTID: ${{ secrets.WOLFRAMSCRIPT_ENTITLEMENTID }}
15 | OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
16 |
17 | jobs:
18 |
19 | Build:
20 | name: Build
21 | runs-on: ubuntu-latest
22 | timeout-minutes: 30
23 |
24 | container:
25 | image: wolframresearch/wolframengine:14.2.1
26 | options: --user root
27 |
28 | env:
29 | WOLFRAM_SYSTEM_ID: Linux-x86-64
30 |
31 | steps:
32 | - name: Checkout
33 | uses: actions/checkout@v4
34 |
35 | - name: Build
36 | run: wolframscript -f Scripts/BuildPaclet.wls
37 |
38 | - name: Upload Artifact
39 | uses: actions/upload-artifact@v4
40 | with:
41 | path: ${{ env.PACLET_BUILD_DIR }}
42 |
43 | - name: Install Test Dependencies
44 | run: |
45 | apt-get update && apt-get install libgomp1 -y
46 | wolframscript -f Scripts/InstallTestDependencies.wls
47 |
48 | - name: Test
49 | run: wolframscript -f Scripts/TestPaclet.wls
50 |
51 | - name: Upload Stack Data
52 | if: always() && env.PACLET_STACK_HISTORY
53 | uses: actions/upload-artifact@v4
54 | with:
55 | name: StackData
56 | path: ${{ env.PACLET_STACK_HISTORY }}
57 | retention-days: 1
58 | if-no-files-found: error
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/SendChatButton/SendChatButton.wl:
--------------------------------------------------------------------------------
1 | (* ::Package:: *)
2 |
3 | (*
4 | #1 -> FaceForm / FrameStyle,
5 | #2 -> Background,
6 | #3 -> ImageSize *)
7 | Function[ Evaluate @ ToBoxes @
8 | DynamicModule[ { Typeset`cell },
9 | PaneSelector[
10 | {
11 | False ->
12 | Button[
13 | Dynamic[ RawBoxes @ FEPrivate`FrontEndResource[ "ChatbookExpressions", "SendChatButtonLabel" ][ #1, #2, #3 ] ],
14 | Wolfram`Chatbook`$ChatEvaluationCell = Typeset`cell;
15 | SelectionMove[ Typeset`cell, All, Cell ];
16 | FrontEndTokenExecute[ Notebooks @ Typeset`cell, "EvaluateCells" ],
17 | Appearance -> "Suppressed",
18 | FrameMargins -> 0,
19 | Method -> "Queued"
20 | ],
21 | True ->
22 | Button[
23 | Dynamic[ RawBoxes @ FEPrivate`FrontEndResource[ "ChatbookExpressions", "StopChatButtonLabel" ][ #1, #2, #3 ] ],
24 | If[ Wolfram`Chatbook`$ChatEvaluationCell =!= Typeset`cell,
25 | NotebookWrite[ Typeset`cell, NotebookRead @ Typeset`cell, None, AutoScroll -> False ],
26 | Needs[ "Wolfram`Chatbook`" -> None ];
27 | Symbol[ "Wolfram`Chatbook`ChatbookAction" ][ "StopChat" ]
28 | ],
29 | Appearance -> "Suppressed",
30 | FrameMargins -> 0
31 | ]
32 | },
33 | Dynamic[ Wolfram`Chatbook`$ChatEvaluationCell === Typeset`cell ],
34 | Alignment -> { Automatic, Baseline },
35 | ImageSize -> Automatic
36 | ], (* TODO: what is this x?? *)
37 | Initialization :> (Typeset`cell = If[ $CloudEvaluation, x; EvaluationCell[ ], ParentCell @ EvaluationCell[ ] ]),
38 | DynamicModuleValues :> { },
39 | UnsavedVariables :> { Typeset`cell }
40 | ]
41 | ]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/SideBarChat/NotebookAssistantSideBarCell.wl:
--------------------------------------------------------------------------------
1 | Cell[
2 | BoxData[
3 | RowBox[
4 | {
5 | DynamicBox[
6 | ToBoxes[
7 | Needs[ "Wolfram`Chatbook`" -> None ];
8 | RawBoxes @ Symbol[ "Wolfram`Chatbook`ChatbookAction" ][ "MakeSidebarChatDockedCell" ],
9 | StandardForm ],
10 | DestroyAfterEvaluation -> True
11 | ],
12 | "\n",
13 | DynamicBox[
14 | ToBoxes[
15 | Needs[ "Wolfram`Chatbook`" -> None ];
16 | RawBoxes @ Symbol[ "Wolfram`Chatbook`ChatModes`Common`sidebarChatInputCell" ][ ],
17 | StandardForm ],
18 | DestroyAfterEvaluation -> True
19 | ]
20 | }
21 | ]
22 | ],
23 | Background -> color @ "NA_ChatInputFieldBackgroundArea", (* this colors the entire initial sidebar as gray to make it easier to see *)
24 | CellFrameMargins -> 0,
25 | CellMargins -> { { 0, 0 }, { 0, 0 } },
26 | CellTags -> "NotebookAssistantSidebarCell",
27 | Editable -> True,
28 | FontSize -> 0.5, (* needed to workaround line wrapping issue where newlines are given their full line-height based on the FontSize *)
29 | Initialization :> (
30 | AttachCell[ EvaluationCell[ ], Cell[ "", CellTags -> "NotebookAssistantSidebarAttachedHelperCell" ], { Left, Top }, 0, { Left, Top } ];
31 | Needs[ "Wolfram`Chatbook`" -> None ];
32 | CurrentValue[ EvaluationCell[ ], TaggingRules ] = <| "ChatNotebookSettings" -> Wolfram`Chatbook`ChatModes`ShowNotebookAssistance`Private`$notebookAssistanceSidebarSettings, "ConversationTitle" -> "" |>),
33 | LineIndent -> 0,
34 | LineSpacing -> { 1, 0 },
35 | Magnification -> 1.,
36 | Selectable -> False
37 | ]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/WorkspaceChat/ToolbarIcon/WorkspaceToolbarIconSources.wl:
--------------------------------------------------------------------------------
1 | (* ::Package:: *)
2 | Function[ Evaluate @ ToBoxes @
3 | Graphics[{Thickness[0.07692307692307693],
4 | FaceForm[{#, Opacity[1.]}],
5 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
6 | {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
7 | {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3},
8 | {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
9 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
10 | {{{7., 1.}, {1., 1.}, {1., 11.}, {5., 11.}, {5., 8.5}, {5., 7.672999858856201},
11 | {5.67300009727478, 7.}, {6.5, 7.}, {7., 7.}, {7., 8.}, {6.5, 8.},
12 | {6.225000023841858, 8.}, {6., 8.223999977111816}, {6., 8.5},
13 | {6., 10.293000221252441}, {7.292999982833862, 9.}, {8., 9.},
14 | {8.707000017166138, 9.}, {5.853999972343445, 11.85300064086914},
15 | {5.807999968528748, 11.89900016784668}, {5.7519999742507935, 11.935998916625977},
16 | {5.6910001039505005, 11.961000442504883}, {5.629999995231628, 11.98699951171875},
17 | {5.565000057220459, 12.}, {5.5, 12.}, {1., 12.}, {0.4479999542236328, 12.},
18 | {0., 11.551000595092773}, {0., 11.}, {0., 1.}, {0., 0.4490000009536743},
19 | {0.4479999542236328, 0.}, {1., 0.}, {7., 0.}, {7., 1.}},
20 | {{13., 5.}, {13., 3.}, {10., 3.}, {10., 0.}, {8., 0.}, {8., 3.}, {5., 3.},
21 | {5., 5.}, {8., 5.}, {8., 8.}, {10., 8.}, {10., 5.}, {13., 5.}}}]},
22 | AspectRatio -> Automatic, ImageSize -> {20, 20}, PlotRange -> {{-6, 14}, {-4, 16}},
23 | BaselinePosition -> Center -> Center]
24 | ]
--------------------------------------------------------------------------------
/.github/workflows/IncrementPacletVersion.yml:
--------------------------------------------------------------------------------
1 | name: Increment Paclet Version
2 |
3 | on:
4 | workflow_dispatch:
5 | push:
6 | branches: [main]
7 |
8 | concurrency:
9 | group: ${{ github.ref }}
10 | cancel-in-progress: true
11 |
12 | env:
13 | WOLFRAMSCRIPT_ENTITLEMENTID: ${{ secrets.WOLFRAMSCRIPT_ENTITLEMENTID }}
14 | WOLFRAM_SYSTEM_ID: Linux-x86-64
15 | UPDATE_PACLET_INFO: false
16 |
17 | jobs:
18 | IncrementVersion:
19 | name: Increment Version
20 | runs-on: ubuntu-latest
21 | timeout-minutes: 15
22 |
23 | container:
24 | image: wolframresearch/wolframengine:14.2.1
25 | options: --user root
26 |
27 | steps:
28 | - name: Update Git
29 | run: |
30 | apt-get update && apt-get install software-properties-common -y
31 | add-apt-repository ppa:git-core/ppa -y
32 | apt-get update && apt-get install git -y
33 |
34 | - name: Checkout
35 | uses: actions/checkout@v4
36 |
37 | - name: Configure Git
38 | run: |
39 | git config --global --add safe.directory $(pwd)
40 | git config --global user.name 'github-actions[bot]'
41 | git config --global user.email 'github-actions[bot]@users.noreply.github.com'
42 |
43 | - name: Increment Version
44 | run: wolframscript -f Scripts/IncrementPacletVersion.wls
45 |
46 | - name: Commit Changes
47 | shell: bash
48 | run: |
49 | echo "Status: $(git status --porcelain)"
50 | if [[ -n $(git status --porcelain) ]]; then
51 | git add PacletInfo.wl
52 | git commit -m "Automated: Increment paclet version"
53 | git push
54 | else
55 | echo "No changes to commit"
56 | fi
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/SendChatButton/StopChatButtonLabel.wl:
--------------------------------------------------------------------------------
1 | (* ::Package:: *)
2 |
3 | (*
4 | #1 -> FrameStyle, "SendChatButtonFrameHover"
5 | #2 -> Background, "SendChatButtonBackgroundHover"
6 | #3 -> ImageSize of spinner *)
7 | Function[ Evaluate @ ToBoxes @
8 | MouseAppearance[
9 | Mouseover[
10 | Framed[
11 | Overlay[
12 | {
13 | With[
14 | {
15 | baseColor = color @ "StopChatButtonSpinnerBase",
16 | highlightColor = color @ "StopChatButtonSpinnerHighlight"
17 | },
18 | RawBoxes @ DynamicBox[ FEPrivate`FrontEndResource[ "ChatbookExpressions", "ChatEvaluatingSpinner" ][ #3, baseColor, highlightColor ] ]
19 | ],
20 | Graphics[
21 | { color @ "StopChatButtonIcon", Rectangle[ { -0.5, -0.5 }, { 0.5, 0.5 } ] },
22 | ImageSize -> #3,
23 | PlotRange -> 1.1
24 | ]
25 | },
26 | Alignment -> { Center, Center }
27 | ],
28 | FrameStyle -> None,
29 | Background -> None,
30 | RoundingRadius -> 3,
31 | FrameMargins -> 1
32 | ],
33 | Framed[
34 | Overlay[
35 | {
36 | With[
37 | {
38 | baseColor = color @ "StopChatButtonSpinnerBase",
39 | highlightColor = color @ "StopChatButtonSpinnerHighlight"
40 | },
41 | RawBoxes @ DynamicBox[ FEPrivate`FrontEndResource[ "ChatbookExpressions", "ChatEvaluatingSpinner" ][ #3, baseColor, highlightColor ] ]
42 | ],
43 | Graphics[
44 | { color @ "StopChatButtonIcon", Rectangle[ { -0.5, -0.5 }, { 0.5, 0.5 } ] },
45 | ImageSize -> #3,
46 | PlotRange -> 1.1
47 | ]
48 | },
49 | Alignment -> { Center, Center }
50 | ],
51 | FrameStyle -> #1,
52 | Background -> #2,
53 | RoundingRadius -> 3,
54 | FrameMargins -> 1
55 | ]
56 | ],
57 | "LinkHand"
58 | ]
59 | ]
60 |
--------------------------------------------------------------------------------
/Scripts/Resources/Icons/Commit.wl:
--------------------------------------------------------------------------------
1 | Graphics[
2 | {
3 | GrayLevel[ 0.4 ],
4 | {
5 | Thickness[ 0.0625 ],
6 | FilledCurve[
7 | {
8 | { { 1, 4, 3 }, { 1, 3, 3 }, { 1, 3, 3 }, { 1, 3, 3 } },
9 | {
10 | { 1, 4, 3 },
11 | { 1, 3, 3 },
12 | { 0, 1, 0 },
13 | { 1, 3, 3 },
14 | { 1, 3, 3 },
15 | { 0, 1, 0 },
16 | { 1, 3, 3 },
17 | { 1, 3, 3 },
18 | { 0, 1, 0 },
19 | { 1, 3, 3 },
20 | { 1, 3, 3 },
21 | { 0, 1, 0 }
22 | }
23 | },
24 | {
25 | {
26 | { 10.5, 8.25 },
27 | { 10.5, 6.8693 },
28 | { 9.3807, 5.75 },
29 | { 8.0, 5.75 },
30 | { 6.6193, 5.75 },
31 | { 5.5, 6.8693 },
32 | { 5.5, 8.25 },
33 | { 5.5, 9.6307 },
34 | { 6.6193, 10.75 },
35 | { 8.0, 10.75 },
36 | { 9.3807, 10.75 },
37 | { 10.5, 9.6307 },
38 | { 10.5, 8.25 }
39 | },
40 | {
41 | { 11.93, 7.5 },
42 | { 11.568, 5.6157 },
43 | { 9.9188, 4.2537 },
44 | { 8.0, 4.2537 },
45 | { 6.0812, 4.2537 },
46 | { 4.4323, 5.6157 },
47 | { 4.07, 7.5 },
48 | { 0.75, 7.5 },
49 | { 0.33579, 7.5 },
50 | { 0.0, 7.8358 },
51 | { 0.0, 8.25 },
52 | { 0.0, 8.6642 },
53 | { 0.33579, 9.0 },
54 | { 0.75, 9.0 },
55 | { 4.07, 9.0 },
56 | { 4.4302, 10.886 },
57 | { 6.0797, 12.251 },
58 | { 8.0, 12.251 },
59 | { 9.9203, 12.251 },
60 | { 11.57, 10.886 },
61 | { 11.93, 9.0 },
62 | { 15.25, 9.0 },
63 | { 15.664, 9.0 },
64 | { 16.0, 8.6642 },
65 | { 16.0, 8.25 },
66 | { 16.0, 7.8358 },
67 | { 15.664, 7.5 },
68 | { 15.25, 7.5 },
69 | { 11.93, 7.5 }
70 | }
71 | }
72 | ]
73 | }
74 | },
75 | BaselinePosition -> Scaled[ -0.1 ],
76 | ImageSize -> 18
77 | ]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/ToolIcons/ToolIconWolframAlpha.wl:
--------------------------------------------------------------------------------
1 | (* ::Package:: *)
2 |
3 | Graphics[
4 | {
5 | Thickness[ 0.047619 ],
6 | {
7 | FaceForm @ RGBColor[ 0.2, 0.51373, 0.67451 ],
8 | FilledCurve[
9 | {
10 | {
11 | { 0, 2, 0 },
12 | { 0, 1, 0 },
13 | { 0, 1, 0 },
14 | { 0, 1, 0 },
15 | { 0, 1, 0 },
16 | { 0, 1, 0 },
17 | { 0, 1, 0 },
18 | { 0, 1, 0 },
19 | { 0, 1, 0 },
20 | { 0, 1, 0 },
21 | { 0, 1, 0 },
22 | { 0, 1, 0 },
23 | { 0, 1, 0 },
24 | { 0, 1, 0 },
25 | { 0, 1, 0 },
26 | { 0, 1, 0 },
27 | { 0, 1, 0 },
28 | { 0, 1, 0 },
29 | { 0, 1, 0 }
30 | }
31 | },
32 | {
33 | {
34 | { 12.379, 4.7163 },
35 | { 15.789, 3.2183 },
36 | { 15.419, 6.9253 },
37 | { 19.059, 7.7173 },
38 | { 16.581, 10.499 },
39 | { 19.06, 13.28 },
40 | { 15.42, 14.073 },
41 | { 15.791, 17.78 },
42 | { 12.38, 16.282 },
43 | { 10.5, 19.5 },
44 | { 8.6219, 16.283 },
45 | { 5.2109, 17.781 },
46 | { 5.5809, 14.074 },
47 | { 1.9409, 13.282 },
48 | { 4.4199, 10.5 },
49 | { 1.9409, 7.7193 },
50 | { 5.5799, 6.9263 },
51 | { 5.2099, 3.2193 },
52 | { 8.6209, 4.7173 },
53 | { 10.5, 1.5003 }
54 | }
55 | }
56 | ]
57 | },
58 | {
59 | FaceForm @ { RGBColor[ 1.0, 1.0, 1.0 ], Opacity[ 1.0 ] },
60 | FilledCurve[
61 | { { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 } }, { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 } } },
62 | { { { 14.0, 11.571 }, { 7.0, 11.571 }, { 7.0, 13.0 }, { 14.0, 13.0 } }, { { 14.0, 8.0 }, { 7.0, 8.0 }, { 7.0, 9.429 }, { 14.0, 9.429 } } }
63 | ]
64 | }
65 | },
66 | AspectRatio -> Automatic,
67 | ImageSize -> { 21.0, 21.0 },
68 | PlotRange -> { { 0.0, 21.0 }, { 0.0, 21.0 } }
69 | ]
--------------------------------------------------------------------------------
/Developer/Resources/Icons/InlineReferenceIconHistory.wl:
--------------------------------------------------------------------------------
1 | (* Created with the Wolfram Language : www.wolfram.com *)
2 | Graphics[{Thickness[0.1], {FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[1.]}],
3 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0,
4 | 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1,
5 | 0}, {0, 1, 0}, {0, 1, 0}}}, {{{4.333500385284424, 14.548500061035156},
6 | {0.9995005130767822, 11.601500034332275}, {1.645500659942627,
7 | 10.849500179290771}, {5.000500440597534, 13.387500047683716},
8 | {8.39750051498413, 10.849500179290771}, {9.000500202178955,
9 | 11.601500034332275}, {5.6665003299713135, 14.548500061035156},
10 | {4.333500385284424, 14.548500061035156}}, {{4.333500385284424,
11 | 11.150500297546387}, {0.9995005130767822, 8.2044997215271},
12 | {1.645500659942627, 7.451499938964844}, {5.000500440597534,
13 | 9.989500045776367}, {8.39750051498413, 7.451499938964844},
14 | {9.000500202178955, 8.2044997215271}, {5.6665003299713135,
15 | 11.150500297546387}, {4.333500385284424, 11.150500297546387}}}]},
16 | {FaceForm[{RGBColor[0.2, 0.2, 0.2], Opacity[0.5]}],
17 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0,
18 | 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1,
19 | 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0},
20 | {0, 1, 0}, {0, 1, 0}}}, {{{5., 3.}, {7., 3.}, {7., 4.}, {5., 4.}, {5.,
21 | 3.}}, {{4., 1.}, {9., 1.}, {9., 2.}, {4., 2.}, {4., 1.}}, {{1., 3.}, {4.,
22 | 3.}, {4., 4.}, {1., 4.}, {1., 3.}}, {{1., 1.}, {3., 1.}, {3., 2.}, {1.,
23 | 2.}, {1., 1.}}, {{1., 6.}, {9., 6.}, {9., 5.}, {1., 5.}, {1., 6.}}}]}},
24 | AspectRatio -> Automatic, ImageSize -> {{11., 17.}, {11., 17.}},
25 | BaselinePosition -> (Center -> Center),
26 | PlotRange -> {{-0.5, 10.5}, {-0.5, 16.5}}]
27 |
--------------------------------------------------------------------------------
/Source/Chatbook/Tools/DefaultTools.wl:
--------------------------------------------------------------------------------
1 | (* ::Section::Closed:: *)
2 | (*Package Header*)
3 | BeginPackage[ "Wolfram`Chatbook`Tools`" ];
4 | Begin[ "`Private`" ];
5 |
6 | Needs[ "Wolfram`Chatbook`" ];
7 | Needs[ "Wolfram`Chatbook`Common`" ];
8 |
9 | (* ::**************************************************************************************************************:: *)
10 | (* ::Section::Closed:: *)
11 | (*Default Tools*)
12 | (* Uncomment the following when the ChatPreferences tool is ready: *)
13 | (* Get[ "Wolfram`Chatbook`Tools`DefaultToolDefinitions`ChatPreferences`" ]; *)
14 | Get[ "Wolfram`Chatbook`Tools`DefaultToolDefinitions`CreateNotebook`" ];
15 | Get[ "Wolfram`Chatbook`Tools`DefaultToolDefinitions`DocumentationLookup`" ];
16 | Get[ "Wolfram`Chatbook`Tools`DefaultToolDefinitions`DocumentationSearcher`" ];
17 | Get[ "Wolfram`Chatbook`Tools`DefaultToolDefinitions`NotebookEditor`" ];
18 | Get[ "Wolfram`Chatbook`Tools`DefaultToolDefinitions`WebFetcher`" ];
19 | Get[ "Wolfram`Chatbook`Tools`DefaultToolDefinitions`WebImageSearcher`" ];
20 | Get[ "Wolfram`Chatbook`Tools`DefaultToolDefinitions`WebSearcher`" ];
21 | Get[ "Wolfram`Chatbook`Tools`DefaultToolDefinitions`WolframAlpha`" ];
22 | Get[ "Wolfram`Chatbook`Tools`DefaultToolDefinitions`WolframLanguageEvaluator`" ];
23 |
24 | (* ::**************************************************************************************************************:: *)
25 | (* ::Section::Closed:: *)
26 | (*Package Footer*)
27 |
28 | (* Sort tools to their default ordering: *)
29 | $defaultChatTools0 = Block[
30 | {
31 | LLMTool,
32 | ver = Information[ PacletObject[ "Wolfram/LLMFunctions" ], "Version" ]
33 | },
34 | Map[
35 | LLMTool[ <| #, "Options" -> { }, "LLMPacletVersion" -> ver |> ] &,
36 | <| KeyTake[ $defaultChatTools0, $defaultToolOrder ], $defaultChatTools0 |>
37 | ]
38 | ];
39 |
40 | End[ ];
41 | EndPackage[ ];
42 |
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/AdvancedSettings.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.05], {FaceForm[{color @ "ChatMenuAdvancedSettingsIcon",
2 | Opacity[1.]}], FilledCurve[{{{1, 4, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
3 | {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}}, {{0, 2, 0}, {1, 3, 3},
4 | {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}},
5 | {{{4.5001, 16.}, {4.2241, 16.}, {4.0001, 15.776}, {4.0001, 15.5}, {4.0001,
6 | 4.5}, {4.0001, 4.224}, {4.2241, 4.}, {4.5001, 4.}, {16.5, 4.}, {16.776,
7 | 4.}, {17., 4.224}, {17., 4.5}, {17., 15.5}, {17., 15.776}, {16.776, 16.},
8 | {16.5, 16.}, {4.5001, 16.}}, {{16.5, 3.}, {4.5001, 3.}, {3.6731, 3.},
9 | {3.0001, 3.673}, {3.0001, 4.5}, {3.0001, 15.5}, {3.0001, 16.327}, {3.6731,
10 | 17.}, {4.5001, 17.}, {16.5, 17.}, {17.327, 17.}, {18., 16.327}, {18.,
11 | 15.5}, {18., 4.5}, {18., 3.673}, {17.327, 3.}, {16.5, 3.}}}]},
12 | {FaceForm[{color @ "ChatMenuAdvancedSettingsIcon", Opacity[1.]}],
13 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}},
14 | {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0},
15 | {0, 1, 0}, {0, 1, 0}}}, {{{15., 14.}, {14., 14.}, {14., 6.}, {15., 6.},
16 | {15., 14.}}, {{11., 14.}, {10., 14.}, {10., 6.}, {11., 6.}, {11., 14.}},
17 | {{7., 6.}, {6., 6.}, {6., 14.}, {7., 14.}, {7., 6.}}}]},
18 | {FaceForm[{color @ "ChatMenuAdvancedSettingsIcon", Opacity[1.]}],
19 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}},
20 | {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0},
21 | {0, 1, 0}, {0, 1, 0}}}, {{{8., 13.}, {5., 13.}, {5., 12.}, {8., 12.},
22 | {8., 13.}}, {{12., 8.}, {9., 8.}, {9., 7.}, {12., 7.}, {12., 8.}},
23 | {{16., 10.}, {13., 10.}, {13., 11.}, {16., 11.}, {16., 10.}}}]}},
24 | AspectRatio -> Automatic, BaselinePosition -> Scaled[0.324],
25 | ImageSize -> {{21., 21.}, {21., 21.}},
26 | PlotRange -> {{-0.5, 20.5}, {-0.5, 20.5}}]
--------------------------------------------------------------------------------
/Scripts/BuildStylesheet.wls:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env wolframscript
2 |
3 | BeginPackage[ "Wolfram`ChatbookScripts`" ];
4 | If[ ! TrueQ @ $loadedDefinitions, Get @ FileNameJoin @ { DirectoryName @ $InputFileName, "Common.wl" } ];
5 |
6 | (* :!CodeAnalysis::BeginBlock:: *)
7 | (* :!CodeAnalysis::Disable::SuspiciousSessionSymbol:: *)
8 |
9 | (* ::**************************************************************************************************************:: *)
10 | (* ::Section::Closed:: *)
11 | (*Initialization*)
12 | Needs[ "Wolfram`PacletCICD`" -> "cicd`" ];
13 |
14 | (* ::**************************************************************************************************************:: *)
15 | (* ::Section::Closed:: *)
16 | (*Paths*)
17 | $stylesheetFiles = FileNames[ "*.nb", FileNameJoin[ { $pacletDir, "FrontEnd", "StyleSheets" } ], 2 ];
18 | $builderFile = cFile @ FileNameJoin @ { $pacletDir, "Developer", "StylesheetBuilder.wl" };
19 |
20 | (* ::**************************************************************************************************************:: *)
21 | (* ::Section::Closed:: *)
22 | (*Build Stylesheet*)
23 | Do[
24 | If[ FileExistsQ @ file,
25 | cicd`ConsoleLog @ SequenceForm[ "Removing existing stylesheet file: ", file ];
26 | cicd`ScriptConfirm @ DeleteFile @ file;
27 | ];
28 | cicd`ScriptConfirmAssert[ ! FileExistsQ @ file ],
29 | {file, $stylesheetFiles}
30 | ]
31 |
32 | cicd`ConsoleLog[ "Building stylesheet..." ];
33 | Block[ { $Context = "Global`", $ContextPath = { "System`", "Global`" }, $ContextAliases = $ContextAliases },
34 | UsingFrontEnd[
35 | cicd`ScriptConfirm @ CheckAbort[ Get @ $builderFile, $Failed ];
36 | result = cicd`ScriptConfirmBy[ Wolfram`ChatbookStylesheetBuilder`BuildStylesheets[ All ], AssociationQ ];
37 | ];
38 | ];
39 |
40 | cicd`ConsoleLog @ SequenceForm[ "Built stylesheets: ", result ];
41 |
42 | (* :!CodeAnalysis::EndBlock:: *)
43 |
44 | EndPackage[ ];
45 |
46 | Wolfram`ChatbookScripts`result
--------------------------------------------------------------------------------
/Scripts/TestPaclet.wls:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env wolframscript
2 |
3 | BeginPackage[ "Wolfram`ChatbookScripts`" ];
4 |
5 | (* ::**************************************************************************************************************:: *)
6 | (* ::Section::Closed:: *)
7 | (*Initialization*)
8 | If[ ! TrueQ @ $loadedDefinitions, Get @ FileNameJoin @ { DirectoryName @ $InputFileName, "Common.wl" } ];
9 |
10 | SetOptions[ TestReport, ProgressReporting -> False ];
11 |
12 | $buildDirectory = FileNameJoin @ { $pacletDir, "build", "Wolfram__Chatbook" };
13 | $mxFile = FileNameJoin @ { $buildDirectory, "Source", "Chatbook", "64Bit", "Chatbook.mx" };
14 | $testDir = cDir @ FileNameJoin @ { $pacletDir, "Tests" };
15 | $ccsTests = FileNameJoin @ { $testDir, "CurrentChatSettings.wlt" };
16 |
17 | If[ StringQ @ Environment[ "GITHUB_ACTIONS" ],
18 | GeneralUtilities`$DebugMode = True;
19 | ServiceConnect[ "OpenAI", Authentication -> <| "APIKey" -> Environment[ "OPENAI_API_KEY" ] |> ];
20 | SetOptions[
21 | TestReport,
22 | HandlerFunctions -> <| "TestCreated" -> Function @ Print[ "\tTesting: ", #[ "TestObject" ][ "TestID" ] ] |>,
23 | HandlerFunctionsKeys -> { "TestObject" }
24 | ]
25 | ];
26 |
27 | If[ ! FileExistsQ @ $mxFile && getBooleanArgument[ { "b", "build" }, True ],
28 | Get @ cFile @ FileNameJoin @ { $scriptDir, "BuildPaclet.wls" }
29 | ];
30 |
31 | (* ::**************************************************************************************************************:: *)
32 | (* ::Section::Closed:: *)
33 | (*Run Tests*)
34 | (* This is a hack to avoid a mysterious issue with the FE not finding the chatbook stylesheet
35 | the first time a test is run: *)
36 | If[ FileExistsQ @ $ccsTests, UsingFrontEnd @ TestReport @ $ccsTests ];
37 |
38 | (* Now run the actual tests: *)
39 | result = UsingFrontEnd @ Block[ { messagePrint }, checkResult @ Wolfram`PacletCICD`TestPaclet @ $defNB ];
40 |
41 | EndPackage[ ];
42 |
43 | Wolfram`ChatbookScripts`result
--------------------------------------------------------------------------------
/Scripts/Resources/Icons/Action.wl:
--------------------------------------------------------------------------------
1 | Graphics[
2 | {
3 | GrayLevel[ 0.4 ],
4 | {
5 | Thickness[ 0.0625 ],
6 | FilledCurve[
7 | {
8 | { { 1, 4, 3 }, { 1, 3, 3 }, { 1, 3, 3 }, { 1, 3, 3 } },
9 | { { 1, 4, 3 }, { 1, 3, 3 }, { 1, 3, 3 }, { 1, 3, 3 } },
10 | {
11 | { 1, 4, 3 },
12 | { 1, 3, 3 },
13 | { 0, 1, 0 },
14 | { 1, 3, 3 },
15 | { 1, 3, 3 },
16 | { 0, 1, 0 },
17 | { 1, 3, 3 },
18 | { 1, 3, 3 },
19 | { 0, 1, 0 }
20 | }
21 | },
22 | {
23 | {
24 | { 1.5, 8.0 },
25 | { 1.5, 11.59 },
26 | { 4.4101, 14.5 },
27 | { 8.0, 14.5 },
28 | { 11.59, 14.5 },
29 | { 14.5, 11.59 },
30 | { 14.5, 8.0 },
31 | { 14.5, 4.4102 },
32 | { 11.59, 1.5 },
33 | { 8.0, 1.5 },
34 | { 4.4101, 1.5 },
35 | { 1.5, 4.4102 },
36 | { 1.5, 8.0 }
37 | },
38 | {
39 | { 8.0, 16.0 },
40 | { 3.5817, 16.0 },
41 | { 0.0, 12.418 },
42 | { 0.0, 8.0 },
43 | { 0.0, 3.5817 },
44 | { 3.5817, 0.0 },
45 | { 8.0, 0.0 },
46 | { 12.418, 0.0 },
47 | { 16.0, 3.5817 },
48 | { 16.0, 8.0 },
49 | { 16.0, 12.418 },
50 | { 12.418, 16.0 },
51 | { 8.0, 16.0 }
52 | },
53 | {
54 | { 6.379, 10.773 },
55 | { 6.3017, 10.82 },
56 | { 6.2052, 10.821 },
57 | { 6.1266, 10.776 },
58 | { 6.0481, 10.732 },
59 | { 5.9997, 10.648 },
60 | { 6.0, 10.558 },
61 | { 6.0, 5.441 },
62 | { 6.0001, 5.3509 },
63 | { 6.0486, 5.2678 },
64 | { 6.1271, 5.2235 },
65 | { 6.2056, 5.1791 },
66 | { 6.3018, 5.1805 },
67 | { 6.379, 5.227 },
68 | { 10.643, 7.786 },
69 | { 10.718, 7.8313 },
70 | { 10.764, 7.9124 },
71 | { 10.764, 8.0 },
72 | { 10.764, 8.0876 },
73 | { 10.718, 8.1687 },
74 | { 10.643, 8.214 },
75 | { 6.379, 10.773 }
76 | }
77 | }
78 | ]
79 | }
80 | },
81 | BaselinePosition -> Scaled[ 0.1 ],
82 | ImageSize -> 14
83 | ]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/NewChatActive.wl:
--------------------------------------------------------------------------------
1 | (* Created with the Wolfram Language : www.wolfram.com *)
2 | Graphics[{Thickness[0.09057068177375761],
3 | Style[{FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
4 | {{{0., 10.}, {11.041000366210938, 10.}, {11.041000366210938, 11.},
5 | {0., 11.}, {0., 10.}}}]}, FaceForm[RGBColor[1., 1., 1., 1.]]],
6 | Style[{FilledCurve[{{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
7 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}},
8 | {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
9 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
10 | {{{9.589900016784668, 9.}, {1.451899528503418, 9.},
11 | {1.206899642944336, 9.}, {1.0059003829956055, 8.800999999046326},
12 | {1.0059003829956055, 8.555999994277954}, {1.0059003829956055,
13 | 2.443999767303467}, {1.0059003829956055, 2.1989998817443848},
14 | {1.206899642944336, 2.}, {1.451899528503418, 2.},
15 | {3.011899948120117, 2.}, {3.011899948120117, 0.},
16 | {6.020900011062622, 2.}, {9.589900016784668, 2.},
17 | {9.835900023579597, 2.}, {10.03490000963211, 2.1989998817443848},
18 | {10.03490000963211, 2.443999767303467}, {10.03490000963211,
19 | 8.555999994277954}, {10.03490000963211, 8.800999999046326},
20 | {9.835900023579597, 9.}, {9.589900016784668, 9.}},
21 | {{9.03490000963211, 8.}, {9.03490000963211, 3.},
22 | {6.020900011062622, 3.}, {5.718900203704834, 3.},
23 | {5.46690034866333, 2.8330001831054688}, {4.011899948120117,
24 | 1.864999771118164}, {4.011899948120117, 2.}, {4.011899948120117, 3.},
25 | {3.011899948120117, 3.}, {2.0058999061584473, 3.},
26 | {2.0058999061584473, 8.}, {9.03490000963211, 8.}}}]},
27 | FaceForm[RGBColor[1., 1., 1., 1.]]]}, ImageSize -> {13., 12.},
28 | PlotRange -> {{-0.5, 11.54110050201416}, {-0.5, 11.5}},
29 | AspectRatio -> Automatic, BaselinePosition -> (Center -> Center)]
30 |
--------------------------------------------------------------------------------
/Source/Chatbook/Chatbook.wl:
--------------------------------------------------------------------------------
1 | PreemptProtect[ BeginPackage[ "Wolfram`Chatbook`" ]; EndPackage[ ] ];
2 |
3 | Wolfram`ChatbookLoader`$MXFile = FileNameJoin @ {
4 | DirectoryName @ $InputFileName,
5 | ToString @ $SystemWordLength <> "Bit",
6 | "Chatbook.mx"
7 | };
8 |
9 | If[ MemberQ[ $Packages, "Wolfram`Chatbook`" ]
10 | ,
11 | Wolfram`ChatbookLoader`$protectedNames = Replace[
12 | Wolfram`Chatbook`$ChatbookProtectedNames,
13 | Except[ _List ] :> Names[ "Wolfram`Chatbook`*" ]
14 | ];
15 |
16 | Wolfram`ChatbookLoader`$allNames = Replace[
17 | Wolfram`Chatbook`$ChatbookNames,
18 | Except[ _List ] :> Union[ Wolfram`ChatbookLoader`$protectedNames, Names[ "Wolfram`Chatbook`*`*" ] ]
19 | ];
20 |
21 | Unprotect @@ Wolfram`ChatbookLoader`$protectedNames;
22 | ClearAll @@ Wolfram`ChatbookLoader`$allNames;
23 | ];
24 |
25 | Quiet[
26 | If[ FileExistsQ @ Wolfram`ChatbookLoader`$MXFile
27 | ,
28 | Get @ Wolfram`ChatbookLoader`$MXFile;
29 | (* Ensure all subcontexts are in $Packages to avoid reloading subcontexts out of order: *)
30 | If[ MatchQ[ Wolfram`Chatbook`$ChatbookContexts, { __String } ],
31 | WithCleanup[
32 | Unprotect @ $Packages,
33 | $Packages = DeleteDuplicates @ Join[ $Packages, Wolfram`Chatbook`$ChatbookContexts ],
34 | Protect @ $Packages
35 | ]
36 | ]
37 | ,
38 | WithCleanup[
39 | PreemptProtect @ Get[ "Wolfram`Chatbook`Main`" ],
40 | { $Context, $ContextPath, $ContextAliases } = { ## }
41 | ] & [ $Context, $ContextPath, $ContextAliases ]
42 | ],
43 | General::shdw
44 | ];
45 |
46 | (* Redraw any dynamics that might might have pink-boxed while loading *)
47 | Wolfram`Chatbook`Common`updateDynamics[ All ];
48 |
49 | (* Set the paclet object for this paclet, ensuring that it corresponds to the one that's actually loaded: *)
50 | Wolfram`Chatbook`Common`$thisPaclet = PacletObject @ File @ DirectoryName[ $InputFileName, 3 ];
--------------------------------------------------------------------------------
/Scripts/UnformatFiles.wls:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env wolframscript
2 |
3 | BeginPackage[ "Wolfram`ChatbookScripts`" ];
4 |
5 | If[ ! TrueQ @ $loadedDefinitions, Get @ FileNameJoin @ { DirectoryName @ $InputFileName, "Common.wl" } ];
6 |
7 | Needs[ "Wolfram`PacletCICD`" -> "cicd`" ];
8 |
9 | (* ::**************************************************************************************************************:: *)
10 | (* ::Section::Closed:: *)
11 | (*Definitions*)
12 |
13 | (* ::**************************************************************************************************************:: *)
14 | (* ::Subsection::Closed:: *)
15 | (*unformat*)
16 | unformat[ file_ ] :=
17 | Enclose @ Module[ { nb, exported },
18 | nb = ConfirmMatch[ Import[ file, "NB" ], _Notebook, "Import" ];
19 | exported = ConfirmBy[ Export[ file, nb, "NB" ], FileExistsQ, "Export" ];
20 | ConfirmAssert[ StringContainsQ[ Import[ file, "String" ], "(* Internal cache information *)" ], "CacheCheck" ];
21 | cicd`ConsoleLog[ " "<>exported ];
22 | exported
23 | ];
24 |
25 | (* ::**************************************************************************************************************:: *)
26 | (* ::Section::Closed:: *)
27 | (*Run*)
28 | files = cicd`ScriptConfirmMatch[
29 | FileNames[ "*.nb", { FileNameJoin @ { $pacletDir, "FrontEnd" }, FileNameJoin @ { $pacletDir, "DarkModeSupport" } }, Infinity ],
30 | { __String }
31 | ];
32 |
33 | cicd`ConsoleLog[ "Unformatting " <> ToString @ Length @ files <> " files..." ];
34 |
35 | (* These symbols are known for 14.2+, but this script may run in 14.1. *)
36 | System`LightDark;
37 | System`LightDarkSwitched;
38 |
39 | result = cicd`ScriptConfirmMatch[ UsingFrontEnd[
40 | CurrentValue[ $FrontEndSession, { PrivateFrontEndOptions, "ExperimentalNotebookParser" } ] = False; (* ensure the file outline cache is built with the old parser *)
41 | CurrentValue[ $FrontEndSession, DynamicUpdating ] = False;
42 | unformat /@ files
43 | ], { __String } ];
44 |
45 | EndPackage[ ];
46 |
47 | Wolfram`ChatbookScripts`result
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/NewChat.wl:
--------------------------------------------------------------------------------
1 | (* Created with the Wolfram Language : www.wolfram.com *)
2 | Graphics[{Thickness[0.09057068177375761],
3 | Style[{FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
4 | {{{0., 10.}, {11.041000366210938, 10.}, {11.041000366210938, 11.},
5 | {0., 11.}, {0., 10.}}}]}, FaceForm[color @ "NA_CloudToolbarIconNewChat"]],
6 | Style[{FilledCurve[{{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
7 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}},
8 | {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
9 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
10 | {{{9.589900016784668, 9.}, {1.451899528503418, 9.},
11 | {1.206899642944336, 9.}, {1.0059003829956055, 8.800999999046326},
12 | {1.0059003829956055, 8.555999994277954}, {1.0059003829956055,
13 | 2.443999767303467}, {1.0059003829956055, 2.1989998817443848},
14 | {1.206899642944336, 2.}, {1.451899528503418, 2.},
15 | {3.011899948120117, 2.}, {3.011899948120117, 0.},
16 | {6.020900011062622, 2.}, {9.589900016784668, 2.},
17 | {9.835900023579597, 2.}, {10.03490000963211, 2.1989998817443848},
18 | {10.03490000963211, 2.443999767303467}, {10.03490000963211,
19 | 8.555999994277954}, {10.03490000963211, 8.800999999046326},
20 | {9.835900023579597, 9.}, {9.589900016784668, 9.}},
21 | {{9.03490000963211, 8.}, {9.03490000963211, 3.},
22 | {6.020900011062622, 3.}, {5.718900203704834, 3.},
23 | {5.46690034866333, 2.8330001831054688}, {4.011899948120117,
24 | 1.864999771118164}, {4.011899948120117, 2.}, {4.011899948120117, 3.},
25 | {3.011899948120117, 3.}, {2.0058999061584473, 3.},
26 | {2.0058999061584473, 8.}, {9.03490000963211, 8.}}}]},
27 | FaceForm[color @ "NA_CloudToolbarIconNewChat"]]}, ImageSize -> {13., 12.},
28 | PlotRange -> {{-0.5, 11.54110050201416}, {-0.5, 11.5}},
29 | AspectRatio -> Automatic, BaselinePosition -> (Center -> Center)]
30 |
--------------------------------------------------------------------------------
/Source/Chatbook/PromptGenerators/EmbeddingContext.wl:
--------------------------------------------------------------------------------
1 | (* ::Section::Closed:: *)
2 | (*Package Header*)
3 | BeginPackage[ "Wolfram`Chatbook`PromptGenerators`EmbeddingContext`" ];
4 | Begin[ "`Private`" ];
5 |
6 | Needs[ "Wolfram`Chatbook`" ];
7 | Needs[ "Wolfram`Chatbook`Common`" ];
8 | Needs[ "Wolfram`Chatbook`PromptGenerators`Common`" ];
9 |
10 | (* ::**************************************************************************************************************:: *)
11 | (* ::Section::Closed:: *)
12 | (*Config*)
13 | $smallContextMessageCount = 10;
14 | $smallContextStringLength = 8000;
15 |
16 | (* ::**************************************************************************************************************:: *)
17 | (* ::Section::Closed:: *)
18 | (*Convert Chat Messages to String*)
19 |
20 | (* ::**************************************************************************************************************:: *)
21 | (* ::Subsection::Closed:: *)
22 | (*getSmallContextString*)
23 | getSmallContextString // beginDefinition;
24 |
25 | getSmallContextString // Options = { "IncludeSystemMessage" -> False, "SingleMessageTemplate" -> Automatic };
26 |
27 | getSmallContextString[ messages0: { ___Association }, opts: OptionsPattern[ ] ] := Enclose[
28 | Catch @ Module[ { messages, string },
29 | messages = Reverse @ Take[ Reverse @ messages0, UpTo[ $smallContextMessageCount ] ];
30 | If[ messages === { }, Throw[ "" ] ];
31 | string = ConfirmBy[ messagesToString[ messages, opts ], StringQ, "String" ];
32 | If[ StringLength @ string > $smallContextStringLength,
33 | StringTake[ string, { -$smallContextStringLength, -1 } ],
34 | string
35 | ]
36 | ],
37 | throwInternalFailure
38 | ];
39 |
40 | getSmallContextString // endDefinition;
41 |
42 | (* ::**************************************************************************************************************:: *)
43 | (* ::Section::Closed:: *)
44 | (*Package Footer*)
45 | addToMXInitialization[
46 | Null
47 | ];
48 |
49 | End[ ];
50 | EndPackage[ ];
51 |
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/ToolIcons/ToolIconWolframLanguageEvaluator.wl:
--------------------------------------------------------------------------------
1 | (* ::Package:: *)
2 |
3 | Graphics[
4 | {
5 | Thickness[ 0.0625 ],
6 | {
7 | FaceForm @ RGBColor[ 0.2, 0.51373, 0.67451 ],
8 | FilledCurve[
9 | {
10 | {
11 | { 0, 2, 0 },
12 | { 0, 1, 0 },
13 | { 0, 1, 0 },
14 | { 0, 1, 0 },
15 | { 0, 1, 0 },
16 | { 0, 1, 0 },
17 | { 0, 1, 0 },
18 | { 0, 1, 0 },
19 | { 0, 1, 0 },
20 | { 0, 1, 0 },
21 | { 0, 1, 0 },
22 | { 0, 1, 0 },
23 | { 0, 1, 0 },
24 | { 0, 1, 0 },
25 | { 0, 1, 0 },
26 | { 0, 1, 0 },
27 | { 0, 1, 0 },
28 | { 0, 1, 0 },
29 | { 0, 1, 0 },
30 | { 0, 1, 0 },
31 | { 0, 1, 0 },
32 | { 0, 1, 0 },
33 | { 0, 1, 0 },
34 | { 0, 1, 0 },
35 | { 0, 1, 0 }
36 | }
37 | },
38 | {
39 | {
40 | { 7.9991, 17.0 },
41 | { 6.2381, 13.964 },
42 | { 3.0391, 15.379 },
43 | { 3.3871, 11.878 },
44 | { 0.00010014, 11.135 },
45 | { 0.00010014, 11.099 },
46 | { 2.2971, 8.5021 },
47 | { 0.00010014, 5.9081 },
48 | { 0.00010014, 5.8701 },
49 | { 3.3861, 5.1261 },
50 | { 3.0371, 1.6251 },
51 | { 6.2371, 3.0391 },
52 | { 8.0001, 0.0021 },
53 | { 9.7611, 3.0381 },
54 | { 12.961, 1.6231 },
55 | { 12.613, 5.1241 },
56 | { 16.0, 5.8681 },
57 | { 16.0, 5.9061 },
58 | { 13.703, 8.5001 },
59 | { 16.0, 11.096 },
60 | { 16.0, 11.134 },
61 | { 12.614, 11.876 },
62 | { 12.963, 15.377 },
63 | { 9.7621, 13.963 },
64 | { 8.0011, 17.0 },
65 | { 7.9991, 17.0 }
66 | }
67 | }
68 | ]
69 | },
70 | {
71 | FaceForm @ { RGBColor[ 1.0, 1.0, 1.0 ], Opacity[ 1.0 ] },
72 | FilledCurve[ { { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 } } }, { { { 6.0, 12.502 }, { 6.0, 4.5018 }, { 12.0, 8.5218 }, { 6.0, 12.502 } } } ]
73 | }
74 | },
75 | AspectRatio -> Automatic,
76 | BaselinePosition -> Center -> Center,
77 | ImageSize -> { 17.0, 18.0 },
78 | PlotRange -> { { -0.5, 16.5 }, { -0.5, 17.5 } }
79 | ]
--------------------------------------------------------------------------------
/.github/workflows/ExperimentalRelease.yml:
--------------------------------------------------------------------------------
1 | name: Experimental Release
2 |
3 | on:
4 | workflow_dispatch:
5 | workflow_run:
6 | workflows: ["Increment Paclet Version"]
7 | types:
8 | - completed
9 | branches: [main]
10 |
11 | concurrency:
12 | group: ${{ github.ref }}
13 | cancel-in-progress: true
14 |
15 | env:
16 | WOLFRAMSCRIPT_ENTITLEMENTID: ${{ secrets.WOLFRAMSCRIPT_ENTITLEMENTID }}
17 | WOLFRAM_SYSTEM_ID: Linux-x86-64
18 | GH_INSTALL_URL: https://github.com/cli/cli/releases/download/v2.33.0/gh_2.33.0_linux_amd64.deb
19 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 |
21 | jobs:
22 | Build:
23 | runs-on: ubuntu-latest
24 | timeout-minutes: 15
25 |
26 | container:
27 | image: wolframresearch/wolframengine:14.2.1
28 | options: --user root
29 |
30 | steps:
31 | - name: Update Git
32 | run: |
33 | apt-get update && apt-get install software-properties-common -y
34 | add-apt-repository ppa:git-core/ppa -y
35 | apt-get update && apt-get install git -y
36 | wget ${{ env.GH_INSTALL_URL }} -O gh.deb
37 | dpkg -i gh.deb
38 |
39 | - name: Checkout
40 | uses: actions/checkout@v4
41 |
42 | - name: Build Paclet
43 | run: wolframscript -f Scripts/BuildPaclet.wls
44 |
45 | - name: Rename Paclet File
46 | run: mv "${{ env.PACLET_PATH }}" "${{ env.PACLET_BUILD_DIR }}/Wolfram__Chatbook.paclet"
47 |
48 | - name: Update Release
49 | run: |
50 | git config --global --add safe.directory $(pwd)
51 |
52 | if ! gh release view experimental; then
53 | gh release create experimental \
54 | --target="${{ github.ref }}" \
55 | --repo="${{ github.repository }}" \
56 | --title="Experimental Release" \
57 | --notes="This is an experimental release that's always updated with the latest build from the main branch." \
58 | --prerelease
59 | fi
60 |
61 | gh release upload experimental \
62 | "${{ env.PACLET_BUILD_DIR }}/Wolfram__Chatbook.paclet" \
63 | --clobber \
64 | --repo="${{ github.repository }}"
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/ServiceIconPaLM.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.0625],
2 | {FaceForm[{RGBColor[0.20392, 0.65882, 0.32549], Opacity[1.]}],
3 | FilledCurve[{{{1, 4, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0},
4 | {0, 1, 0}, {1, 3, 3}}}, {{{8.1487, 1.}, {10.039, 1.}, {11.62, 1.63},
5 | {12.775, 2.698}, {10.523, 4.448}, {9.8927, 4.027}, {9.0937, 3.771},
6 | {8.1487, 3.771}, {6.3227, 3.771}, {4.7767, 5.002}, {4.2227, 6.664},
7 | {1.9017, 6.664}, {1.9017, 4.862}, {3.0507, 2.575}, {5.4127, 1.},
8 | {8.1487, 1.}}}]}, {FaceForm[{RGBColor[0.25882, 0.52157, 0.95686],
9 | Opacity[1.]}], FilledCurve[{{{1, 4, 3}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
10 | {1, 3, 3}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}}},
11 | {{{14.851, 7.8425}, {14.851, 8.3035}, {14.81, 8.7405}, {14.74, 9.1665},
12 | {8.1483, 9.1665}, {8.1483, 6.5355}, {11.923, 6.5355}, {11.753, 5.6725},
13 | {11.258, 4.9435}, {10.523, 4.4475}, {10.523, 2.6975}, {12.774, 2.6975},
14 | {14.093, 3.9165}, {14.851, 5.7135}, {14.851, 7.8425}}}]},
15 | {FaceForm[{RGBColor[0.98431, 0.73725, 0.019608], Opacity[1.]}],
16 | FilledCurve[{{{1, 4, 3}, {1, 3, 3}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3},
17 | {1, 3, 3}, {0, 1, 0}}}, {{{4.2229, 6.6642}, {4.0769, 7.0842},
18 | {4.0009, 7.5332}, {4.0009, 8.0002}, {4.0009, 8.4662}, {4.0829, 8.9162},
19 | {4.2229, 9.3362}, {4.2229, 11.138}, {1.9009, 11.138}, {1.4229, 10.193},
20 | {1.1489, 9.1312}, {1.1489, 8.0002}, {1.1489, 6.8682}, {1.4229, 5.8062},
21 | {1.9009, 4.8622}, {4.2229, 6.6642}}}]},
22 | {FaceForm[{RGBColor[0.91765, 0.26275, 0.20784], Opacity[1.]}],
23 | FilledCurve[{{{1, 4, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0},
24 | {1, 3, 3}}}, {{{8.1487, 12.229}, {9.1817, 12.229}, {10.103, 11.873},
25 | {10.832, 11.179}, {12.827, 13.174}, {11.62, 14.306}, {10.039, 15.},
26 | {8.1487, 15.}, {5.4127, 15.}, {3.0507, 13.425}, {1.9017, 11.138},
27 | {4.2227, 9.3362}, {4.7767, 10.998}, {6.3227, 12.229},
28 | {8.1487, 12.229}}}]}}, AspectRatio -> Automatic, ImageSize -> {17., 17.},
29 | PlotRange -> {{-0.5, 16.5}, {-0.5, 16.5}}]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/Hide-hover.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.08333333333333333],
2 | {FaceForm[{RGBColor[0.6509803921568628, 0.6509803921568628,
3 | 0.6509803921568628], Opacity[1.]}],
4 | FilledCurve[{{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}},
5 | {{{7.973899841308594, 4.052199840545654}, {7.973899841308594,
6 | 2.9621998071670532}, {7.089899837970734, 2.0781997442245483},
7 | {5.999899744987488, 2.0781997442245483}, {4.909899950027466,
8 | 2.0781997442245483}, {4.025899887084961, 2.9621998071670532},
9 | {4.025899887084961, 4.052199840545654}, {4.025899887084961,
10 | 5.142199873924255}, {4.909899950027466, 6.02619993686676},
11 | {5.999899744987488, 6.02619993686676}, {7.089899837970734,
12 | 6.02619993686676}, {7.973899841308594, 5.142199873924255},
13 | {7.973899841308594, 4.052199840545654}}}]},
14 | {FaceForm[{RGBColor[0.6509803921568628, 0.6509803921568628,
15 | 0.6509803921568628], Opacity[1.]}],
16 | FilledCurve[{{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}},
17 | {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}}, {{{6., 6.684000015258789},
18 | {10.01800012588501, 6.684000015258789}, {11.021999835968018,
19 | 4.052000045776367}, {11.021999835968018, 4.052000045776367},
20 | {11.021999835968018, 4.052000045776367}, {10.01800012588501,
21 | 1.4200000762939453}, {6., 1.4200000762939453}, {1.9819998741149902,
22 | 1.4200000762939453}, {0.9780001640319824, 4.052000045776367},
23 | {0.9780001640319824, 4.052000045776367}, {0.9780001640319824,
24 | 4.052000045776367}, {1.9819998741149902, 6.684000015258789}, {6.,
25 | 6.684000015258789}}, {{6., 8.}, {1.434000015258789, 8.}, {0.,
26 | 4.052000045776367}, {0., 4.052000045776367}, {0., 4.052000045776367},
27 | {1.434000015258789, 0.10400009155273438}, {6., 0.10400009155273438},
28 | {10.565999984741211, 0.10400009155273438}, {12., 4.052000045776367}, {12.,
29 | 4.052000045776367}, {12., 4.052000045776367}, {10.565999984741211, 8.},
30 | {6., 8.}}}]}}, AspectRatio -> Automatic,
31 | ImageSize -> {{13., 9.}, {13., 9.}}, PlotRange -> {{-0.5, 12.5}, {-0.5, 8.5}}]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/Hide.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.08333333333333333],
2 | {FaceForm[{RGBColor[0.39215686274509803, 0.39215686274509803,
3 | 0.39215686274509803], Opacity[1.]}],
4 | FilledCurve[{{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}},
5 | {{{7.973899841308594, 4.052199840545654}, {7.973899841308594,
6 | 2.9621998071670532}, {7.089899837970734, 2.0781997442245483},
7 | {5.999899744987488, 2.0781997442245483}, {4.909899950027466,
8 | 2.0781997442245483}, {4.025899887084961, 2.9621998071670532},
9 | {4.025899887084961, 4.052199840545654}, {4.025899887084961,
10 | 5.142199873924255}, {4.909899950027466, 6.02619993686676},
11 | {5.999899744987488, 6.02619993686676}, {7.089899837970734,
12 | 6.02619993686676}, {7.973899841308594, 5.142199873924255},
13 | {7.973899841308594, 4.052199840545654}}}]},
14 | {FaceForm[{RGBColor[0.39215686274509803, 0.39215686274509803,
15 | 0.39215686274509803], Opacity[1.]}],
16 | FilledCurve[{{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}},
17 | {{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}}, {{{6., 6.684000015258789},
18 | {10.01800012588501, 6.684000015258789}, {11.021999835968018,
19 | 4.052000045776367}, {11.021999835968018, 4.052000045776367},
20 | {11.021999835968018, 4.052000045776367}, {10.01800012588501,
21 | 1.4200000762939453}, {6., 1.4200000762939453}, {1.9819998741149902,
22 | 1.4200000762939453}, {0.9780001640319824, 4.052000045776367},
23 | {0.9780001640319824, 4.052000045776367}, {0.9780001640319824,
24 | 4.052000045776367}, {1.9819998741149902, 6.684000015258789}, {6.,
25 | 6.684000015258789}}, {{6., 8.}, {1.434000015258789, 8.}, {0.,
26 | 4.052000045776367}, {0., 4.052000045776367}, {0., 4.052000045776367},
27 | {1.434000015258789, 0.10400009155273438}, {6., 0.10400009155273438},
28 | {10.565999984741211, 0.10400009155273438}, {12., 4.052000045776367}, {12.,
29 | 4.052000045776367}, {12., 4.052000045776367}, {10.565999984741211, 8.},
30 | {6., 8.}}}]}}, AspectRatio -> Automatic,
31 | ImageSize -> {{13., 9.}, {13., 9.}}, PlotRange -> {{-0.5, 12.5}, {-0.5, 8.5}}]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/WorkspaceChat/CodeBlocks/WorkspaceCodeBlockInsertAndEvaluate.wl:
--------------------------------------------------------------------------------
1 | (* Created with the Wolfram Language : www.wolfram.com *)
2 | Graphics[{Thickness[0.07016411257027613],
3 | Style[{JoinedCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
4 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
5 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
6 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
7 | {{{7.126100063323975, 14.347000122070312}, {5.716100096702576,
8 | 11.91700005531311}, {3.158100128173828, 13.049000024795532},
9 | {3.4361002445220947, 10.248000144958496}, {0.7041001319885254,
10 | 9.64900016784668}, {2.5631003379821777, 7.548000335693359},
11 | {0.7041001319885254, 5.446000099182129}, {3.4351003170013428,
12 | 4.8470001220703125}, {3.156100034713745, 2.045999526977539},
13 | {5.716100096702576, 3.177000045776367}, {7.126100063323975,
14 | 0.7469997406005859}, {8.536100029945374, 3.175999641418457},
15 | {11.094099998474121, 2.0450000762939453}, {10.816099882125854,
16 | 4.845000267028809}, {13.548099994659424, 5.445000648498535},
17 | {11.689099788665771, 7.546000003814697}, {13.548099994659424,
18 | 9.648000240325928}, {10.817099809646606, 10.247000217437744},
19 | {11.096100091934204, 13.04800009727478}, {8.536100029945374,
20 | 11.91700005531311}, {7.126100063323975, 14.347000122070312}}},
21 | CurveClosed -> {1}]}, CapForm["Butt"], JoinForm[{"Miter", 1.}],
22 | Thickness[0.05262308442770709], color @ "NA_ChatCodeBlockTemplateButtonIcon"],
23 | Style[{FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}},
24 | {{{5.526100158691406, 10.766900062561035}, {5.526100158691406,
25 | 4.3668999671936035}, {10.32610034942627, 7.582900285720825},
26 | {5.526100158691406, 10.766900062561035}}}]},
27 | FaceForm[color @ "NA_ChatCodeBlockTemplateButtonIcon"]]},
28 | ImageSize -> {16., 17.}, PlotRange -> {{-0.5, 14.752300262451172},
29 | {-0.5, 15.594200134277344}}, AspectRatio -> Automatic,
30 | BaselinePosition -> Center -> Center]
31 |
--------------------------------------------------------------------------------
/Assets/Snippets/Markdown/BasicEntityUsage.md:
--------------------------------------------------------------------------------
1 | # Entity > Basic Entity Usage
2 | paclet:ref/Entity#c1
3 |
4 | Use natural language input to retrieve an `Entity` object:
5 |
6 | ```wl
7 | In[1]:= entity = ["domestic cat", Entity]
8 |
9 | During evaluation of In[1]:= [INFO] Interpreted "domestic cat" as: Entity["TaxonomicSpecies", "FelisCatus::ddvt3"]
10 |
11 | Out[1]= Entity["TaxonomicSpecies", "FelisCatus::ddvt3"]
12 | ```
13 |
14 | Get a list of available properties for the entity:
15 |
16 | ```wl
17 | In[2]:= properties = entity["Properties"]
18 |
19 | Out[2]= {EntityProperty["TaxonomicSpecies", "AlternateCommonNames"], ..., EntityProperty["TaxonomicSpecies", "Order"], ..., EntityProperty["TaxonomicSpecies" -> "Eukaryote" -> "Animal" -> "Mammal", "AgeOfWeaning"]}
20 | ```
21 |
22 | Use `CanonicalName` to convert the `EntityProperty` objects to their names:
23 |
24 | ```wl
25 | In[3]:= CanonicalName[properties]
26 |
27 | Out[3]= {"AlternateCommonNames", ..., "Order", ..., "AgeOfWeaning"}
28 | ```
29 |
30 | Use any of these property names (or a list of them) to retrieve the corresponding value(s):
31 |
32 | ```wl
33 | In[4]:= order = entity["Order"]
34 |
35 | Out[4]= Entity["TaxonomicSpecies", "Carnivora::8x672"]
36 | ```
37 |
38 | *Note:* `entity["property"]` is equivalent to `EntityValue[entity, "property"]`.
39 |
40 | Convert `Entity` objects to their plain text names with `CommonName`:
41 |
42 | ```wl
43 | In[5]:= CommonName[order]
44 |
45 | Out[5]= "carnivores"
46 | ```
47 |
48 | Get all property names and their values as an association:
49 |
50 | ```wl
51 | In[6]:= KeyMap[CanonicalName, entity["NonMissingPropertyAssociation"]]
52 |
53 | Out[6]= <|"AlternateCommonNames" -> {"cat", "house cat"}, ..., "AgeOfWeaning" -> Quantity[Interval[{1.4695, 1.999}], "Months"]|>
54 | ```
55 |
56 | Get the value of a property directly using natural language input:
57 |
58 | ```wl
59 | In[7]:= ["domestic cat alternate common names"]
60 |
61 | During evaluation of In[7]:= [INFO] Interpreted "domestic cat alternate common names" as: Entity["TaxonomicSpecies", "FelisCatus::ddvt3"][EntityProperty["TaxonomicSpecies", "AlternateCommonNames"]]
62 |
63 | Out[7]= {"cat", "house cat"}
64 | ```
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/Delete-hover.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.07692307692307693],
2 | {FaceForm[{RGBColor[0.6509803921568628, 0.6509803921568628,
3 | 0.6509803921568628], Opacity[1.]}],
4 | FilledCurve[{{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
5 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}}},
6 | {{{11., 0.}, {2., 0.}, {1.4489994049072266, 0.}, {1., 0.4490000009536743},
7 | {1., 1.}, {1., 12.}, {2., 12.}, {2., 1.}, {11., 1.}, {11., 12.},
8 | {12., 12.}, {12., 1.}, {12., 0.4490000009536743},
9 | {11.550999999046326, 0.}, {11., 0.}}}]},
10 | {FaceForm[{RGBColor[0.6509803921568628, 0.6509803921568628,
11 | 0.6509803921568628], Opacity[1.]}],
12 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}},
13 | {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0},
14 | {0, 1, 0}, {0, 1, 0}}}, {{{9., 3.}, {10., 3.}, {10., 10.}, {9., 10.},
15 | {9., 3.}}, {{6., 3.}, {7., 3.}, {7., 10.}, {6., 10.}, {6., 3.}},
16 | {{3., 3.}, {4., 3.}, {4., 10.}, {3., 10.}, {3., 3.}}}]},
17 | {FaceForm[{RGBColor[0.6509803921568628, 0.6509803921568628,
18 | 0.6509803921568628], Opacity[1.]}],
19 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}},
20 | {{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3},
21 | {0, 1, 0}, {1, 3, 3}}}, {{{12., 13.}, {1., 13.}, {1., 14.}, {12., 14.},
22 | {12., 13.}}, {{12., 15.}, {1., 15.}, {0.4490000009536743, 15.},
23 | {0., 14.551000595092773}, {0., 14.}, {0., 13.}, {0., 12.448999404907227},
24 | {0.4490000009536743, 12.}, {1., 12.}, {12., 12.},
25 | {12.551000595092773, 12.}, {13., 12.448999404907227}, {13., 13.},
26 | {13., 14.}, {13., 14.551000595092773}, {12.551000595092773, 15.},
27 | {12., 15.}}}]},
28 | {FaceForm[{RGBColor[0.6509803921568628, 0.6509803921568628,
29 | 0.6509803921568628], Opacity[1.]}],
30 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
31 | {{{5., 15.}, {8., 15.}, {8., 16.}, {5., 16.}, {5., 15.}}}]}},
32 | AspectRatio -> Automatic, ImageSize -> {{14., 17.}, {14., 17.}},
33 | PlotRange -> {{-0.5, 13.5}, {-0.5, 16.5}}]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/Delete.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.07692307692307693],
2 | {FaceForm[{RGBColor[0.39215686274509803, 0.39215686274509803,
3 | 0.39215686274509803], Opacity[1.]}],
4 | FilledCurve[{{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
5 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}}},
6 | {{{11., 0.}, {2., 0.}, {1.4489994049072266, 0.}, {1., 0.4490000009536743},
7 | {1., 1.}, {1., 12.}, {2., 12.}, {2., 1.}, {11., 1.}, {11., 12.},
8 | {12., 12.}, {12., 1.}, {12., 0.4490000009536743},
9 | {11.550999999046326, 0.}, {11., 0.}}}]},
10 | {FaceForm[{RGBColor[0.39215686274509803, 0.39215686274509803,
11 | 0.39215686274509803], Opacity[1.]}],
12 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}},
13 | {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0},
14 | {0, 1, 0}, {0, 1, 0}}}, {{{9., 3.}, {10., 3.}, {10., 10.}, {9., 10.},
15 | {9., 3.}}, {{6., 3.}, {7., 3.}, {7., 10.}, {6., 10.}, {6., 3.}},
16 | {{3., 3.}, {4., 3.}, {4., 10.}, {3., 10.}, {3., 3.}}}]},
17 | {FaceForm[{RGBColor[0.39215686274509803, 0.39215686274509803,
18 | 0.39215686274509803], Opacity[1.]}],
19 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}},
20 | {{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3},
21 | {0, 1, 0}, {1, 3, 3}}}, {{{12., 13.}, {1., 13.}, {1., 14.}, {12., 14.},
22 | {12., 13.}}, {{12., 15.}, {1., 15.}, {0.4490000009536743, 15.},
23 | {0., 14.551000595092773}, {0., 14.}, {0., 13.}, {0., 12.448999404907227},
24 | {0.4490000009536743, 12.}, {1., 12.}, {12., 12.},
25 | {12.551000595092773, 12.}, {13., 12.448999404907227}, {13., 13.},
26 | {13., 14.}, {13., 14.551000595092773}, {12.551000595092773, 15.},
27 | {12., 15.}}}]},
28 | {FaceForm[{RGBColor[0.39215686274509803, 0.39215686274509803,
29 | 0.39215686274509803], Opacity[1.]}],
30 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
31 | {{{5., 15.}, {8., 15.}, {8., 16.}, {5., 16.}, {5., 15.}}}]}},
32 | AspectRatio -> Automatic, ImageSize -> {{14., 17.}, {14., 17.}},
33 | PlotRange -> {{-0.5, 13.5}, {-0.5, 16.5}}]
--------------------------------------------------------------------------------
/Developer/Resources/Icons/AssistantEvaluate.wl:
--------------------------------------------------------------------------------
1 | (* Created with the Wolfram Language : www.wolfram.com *)
2 | Graphics[{Thickness[0.0625],
3 | Style[{FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
4 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
5 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
6 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
7 | {0, 1, 0}, {0, 1, 0}}}, {{{7.999100208282471, 17.000099182128906},
8 | {6.238100171089172, 13.964099168777466}, {3.039100170135498,
9 | 15.379099130630493}, {3.3871002197265625, 11.87809944152832},
10 | {0.00010013580322265625, 11.135098934173584}, {0.00010013580322265625,
11 | 11.099099159240723}, {2.29710054397583, 8.50209903717041},
12 | {0.00010013580322265625, 5.908099174499512}, {0.00010013580322265625,
13 | 5.870099067687988}, {3.3861002922058105, 5.126099586486816},
14 | {3.037100315093994, 1.6250991821289062}, {6.23710024356842,
15 | 3.0390987396240234}, {8.000100208329968, 0.0020999908447265625},
16 | {9.761100172996521, 3.0380992889404297}, {12.961100101470947,
17 | 1.6230993270874023}, {12.613100528717041, 5.1240997314453125},
18 | {16.00010061264038, 5.868099212646484}, {16.00010061264038,
19 | 5.906099319458008}, {13.703100204467773, 8.500099182128906},
20 | {16.00010061264038, 11.096098899841309}, {16.00010061264038,
21 | 11.134099006652832}, {12.614100456237793, 11.876099109649658},
22 | {12.96310043334961, 15.3770991563797}, {9.762100219726562,
23 | 13.963099241256714}, {8.001100208377466, 17.000099182128906},
24 | {7.999100208282471, 17.000099182128906}}}]},
25 | FaceForm[RGBColor[0.2901960784313726, 0.5843137254901961, 0.8]]],
26 | Style[{FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}},
27 | {{{6., 12.501800537109375}, {6., 4.501800537109375},
28 | {12., 8.521800518035889}, {6., 12.501800537109375}}}]},
29 | FaceForm[RGBColor[1., 1., 1., 1.]]]}, ImageSize -> {17., 18.},
30 | PlotRange -> {{-0.5, 16.5}, {-0.5, 17.5}}, AspectRatio -> Automatic, BaselinePosition -> Center -> Center]
31 |
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/WorkspaceChat/ToolbarIcon/WorkspaceToolbarIconOpenAsChatbook.wl:
--------------------------------------------------------------------------------
1 | (* Created with the Wolfram Language : www.wolfram.com *)
2 | Function[ Evaluate @ ToBoxes @
3 | Graphics[{Thickness[0.08332986316297075],
4 | {FaceForm[{#,
5 | Opacity[1.]}], FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
6 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}},
7 | {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
8 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
9 | {{{6.769299507141113, 6.}, {11.000299453735352, 10.184000015258789},
10 | {11.000299453735352, 7.}, {12.000299453735352, 7.},
11 | {12.000299453735352, 12.}, {7.000299513339996, 12.},
12 | {7.000299513339996, 11.031000137329102}, {10.239299535751343,
13 | 11.031000137329102}, {6.000299513339996, 6.769999980926514},
14 | {6.000299513339996, 6.769999980926514}, {5.607299566268921,
15 | 6.39300000667572}, {6.000299513339996, 6.}, {6.394299507141113,
16 | 5.60699999332428}, {6.769299507141113, 6.}, {6.769299507141113, 6.}},
17 | {{12.000299453735352, 0.}, {0.0002999305725097656, 0.},
18 | {0.0002999305725097656, 12.}, {3.836299419403076, 12.},
19 | {3.836299419403076, 10.330000400543213}, {1.6712994575500488,
20 | 10.330000400543213}, {1.6712994575500488, 1.669999599456787},
21 | {10.330299377441406, 1.669999599456787}, {10.330299377441406,
22 | 3.8350000381469727}, {12.000299453735352, 3.8350000381469727},
23 | {12.000299453735352, 0.}}}]},
24 | {FaceForm[{#,
25 | Opacity[1.]}], FilledCurve[{{{0, 2, 0}}},
26 | {{{6.000199794769287, 6.}, {12.000199794769287, 12.}}}]},
27 | {FaceForm[{#,
28 | Opacity[1.]}], FilledCurve[{{{0, 2, 0}}},
29 | {{{6.000199794769287, 5.245100021362305}, {12.000199794769287,
30 | 11.245100021362305}}}]},
31 | {FaceForm[{#,
32 | Opacity[1.]}], FilledCurve[{{{0, 2, 0}}},
33 | {{{5.22689962387085, 6.018500328063965}, {11.22689962387085,
34 | 12.018500328063965}}}]}}, AspectRatio -> Automatic,
35 | ImageSize -> {15., 14.}, PlotRange -> {{-1., 13.000499725341797},
36 | {-1., 13.}}, BaselinePosition -> Center -> Center]
37 | ]
--------------------------------------------------------------------------------
/Developer/Resources/Icons/ChatDrivenNotebookIcon.wl:
--------------------------------------------------------------------------------
1 | Graphics[
2 | {
3 | Thickness[ 0.055556 ],
4 | {
5 | FaceForm @ { RGBColor[ 0.0, 0.51373, 0.83137 ], Opacity[ 1.0 ] },
6 | FilledCurve[
7 | {
8 | {
9 | { 1, 4, 3 },
10 | { 0, 1, 0 },
11 | { 1, 3, 3 },
12 | { 0, 1, 0 },
13 | { 1, 3, 3 },
14 | { 0, 1, 0 },
15 | { 0, 1, 0 },
16 | { 0, 1, 0 },
17 | { 0, 1, 0 },
18 | { 1, 3, 3 },
19 | { 0, 1, 0 }
20 | }
21 | },
22 | {
23 | {
24 | { 15.72, 14.669 },
25 | { 15.72, 15.25 },
26 | { 15.249, 15.72 },
27 | { 14.669, 15.72 },
28 | { 2.051, 15.72 },
29 | { 1.471, 15.72 },
30 | { 1.0, 15.25 },
31 | { 1.0, 14.669 },
32 | { 1.0, 5.2056 },
33 | { 1.0, 4.6246 },
34 | { 1.471, 4.1546 },
35 | { 2.051, 4.1546 },
36 | { 4.154, 4.1546 },
37 | { 4.154, 0.9996 },
38 | { 8.36, 4.1546 },
39 | { 14.669, 4.1546 },
40 | { 15.249, 4.1546 },
41 | { 15.72, 4.6236 },
42 | { 15.72, 5.2046 },
43 | { 15.72, 14.669 }
44 | }
45 | }
46 | ]
47 | },
48 | {
49 | FaceForm @ { RGBColor[ 0.0, 0.69804, 1.0 ], Opacity[ 1.0 ] },
50 | FilledCurve[
51 | {
52 | {
53 | { 1, 4, 3 },
54 | { 0, 1, 0 },
55 | { 1, 3, 3 },
56 | { 0, 1, 0 },
57 | { 1, 3, 3 },
58 | { 0, 1, 0 },
59 | { 0, 1, 0 },
60 | { 0, 1, 0 },
61 | { 0, 1, 0 },
62 | { 1, 3, 3 },
63 | { 0, 1, 0 }
64 | }
65 | },
66 | {
67 | {
68 | { 2.0, 15.929 },
69 | { 2.0, 16.521 },
70 | { 2.48, 17.0 },
71 | { 3.071, 17.0 },
72 | { 15.929, 17.0 },
73 | { 16.52, 17.0 },
74 | { 17.0, 16.521 },
75 | { 17.0, 15.929 },
76 | { 17.0, 6.2856 },
77 | { 17.0, 5.6936 },
78 | { 16.52, 5.2146 },
79 | { 15.929, 5.2146 },
80 | { 13.786, 5.2146 },
81 | { 13.786, 1.9996 },
82 | { 9.5, 5.2146 },
83 | { 3.071, 5.2146 },
84 | { 2.48, 5.2146 },
85 | { 2.0, 5.6936 },
86 | { 2.0, 6.2856 },
87 | { 2.0, 15.929 }
88 | }
89 | }
90 | ]
91 | }
92 | },
93 | AspectRatio -> Automatic,
94 | ImageSize -> { { 19.0, 19.0 }, { 19.0, 19.0 } },
95 | PlotRange -> { { -0.5, 18.5 }, { -0.5, 18.5 } }
96 | ]
--------------------------------------------------------------------------------
/Developer/Resources/Icons/ChatOutputStopButton.wl:
--------------------------------------------------------------------------------
1 | RawBoxes @ ToBoxes @
2 | Pane[
3 | Button[
4 | Tooltip[
5 | MouseAppearance[
6 | Graphics[
7 | {
8 | Thickness[ 0.083333 ],
9 | {
10 | FaceForm @ { RGBColor[ 0.86667, 0.066667, 0.0 ], Opacity[ 1.0 ] },
11 | FilledCurve[
12 | { { { 1, 4, 3 }, { 1, 3, 3 }, { 1, 3, 3 }, { 1, 3, 3 } } },
13 | {
14 | {
15 | { 4.5, 3.0 },
16 | { 6.985, 3.0 },
17 | { 9.0, 5.015 },
18 | { 9.0, 7.5 },
19 | { 9.0, 9.985 },
20 | { 6.985, 12.0 },
21 | { 4.5, 12.0 },
22 | { 2.015, 12.0 },
23 | { 0.0, 9.985 },
24 | { 0.0, 7.5 },
25 | { 0.0, 5.015 },
26 | { 2.015, 3.0 },
27 | { 4.5, 3.0 }
28 | }
29 | }
30 | ]
31 | },
32 | {
33 | FaceForm @ { RGBColor[ 1.0, 1.0, 1.0 ], Opacity[ 1.0 ] },
34 | FilledCurve[
35 | {
36 | {
37 | { 0, 2, 0 },
38 | { 0, 1, 0 },
39 | { 0, 1, 0 },
40 | { 0, 1, 0 },
41 | { 0, 1, 0 },
42 | { 0, 1, 0 },
43 | { 0, 1, 0 },
44 | { 0, 1, 0 },
45 | { 0, 1, 0 },
46 | { 0, 1, 0 },
47 | { 0, 1, 0 },
48 | { 0, 1, 0 }
49 | }
50 | },
51 | {
52 | {
53 | { 5.9141, 7.5 },
54 | { 7.6671, 5.747 },
55 | { 6.2531, 4.333 },
56 | { 4.5001, 6.086 },
57 | { 2.7471, 4.333 },
58 | { 1.3331, 5.747 },
59 | { 3.0861, 7.5 },
60 | { 1.3331, 9.253 },
61 | { 2.7471, 10.667 },
62 | { 4.5001, 8.914 },
63 | { 6.2531, 10.667 },
64 | { 7.6671, 9.253 },
65 | { 5.9141, 7.5 }
66 | }
67 | }
68 | ]
69 | }
70 | },
71 | AspectRatio -> Automatic,
72 | ImageSize -> { { 13.0, 13.0 }, { 13.0, 13.0 } },
73 | PlotRange -> { { -0.5, 12.5 }, { 0.5, 12.5 } }
74 | ],
75 | "LinkHand"
76 | ],
77 | "Stop"
78 | ],
79 | With[ { $CellContext`cell = EvaluationCell[ ] },
80 | Quiet @ Needs[ "Wolfram`Chatbook`" -> None ];
81 | Catch[ Symbol[ "Wolfram`Chatbook`ChatbookAction" ][ "StopChat", $CellContext`cell ], _ ]
82 | ],
83 | Appearance -> None
84 | ],
85 | ImageSize -> { 33, Automatic },
86 | Alignment -> Left
87 | ]
--------------------------------------------------------------------------------
/Assets/AIAssistant/APIKeyDialogDescription.wl:
--------------------------------------------------------------------------------
1 | RawBoxes @ Cell[
2 | TextData @ {
3 | trExprTemplate["APIKeyDialogCreateKeyTemplate"][<|"1" ->
4 | Cell @ BoxData @ TagBox[
5 | ButtonBox[
6 | StyleBox[ "here", FontFamily -> "Source Sans Pro" ],
7 | ButtonFunction :> SystemOpen[ "https://platform.openai.com/account/api-keys" ],
8 | Evaluator -> Automatic,
9 | Method -> "Preemptive",
10 | ButtonNote -> "https://platform.openai.com/account/api-keys",
11 | ContentPadding -> False,
12 | BaseStyle -> Dynamic @ FEPrivate`If[
13 | CurrentValue[ "MouseOver" ],
14 | { "Link", FontColor -> RGBColor[ 0.855, 0.396, 0.145 ] },
15 | { "Link", FontColor -> RGBColor[ 0.020, 0.286, 0.651 ] }
16 | ]
17 | ],
18 | MouseAppearanceTag[ "LinkHand" ]
19 | ]|>],
20 | "\n",
21 | trExprTemplate["APIKeyDialogSaveKeyTemplate"][<|"1" ->
22 | Cell[
23 | BoxData @ RowBox @ {
24 | TagBox[
25 | ButtonBox[
26 | StyleBox[
27 | "SystemCredential",
28 | "SymbolsRefLink",
29 | ShowStringCharacters -> True,
30 | FontFamily -> "Source Sans Pro"
31 | ],
32 | ButtonData -> "paclet:ref/SystemCredential",
33 | ContentPadding -> False,
34 | BaseStyle -> Dynamic @ FEPrivate`If[
35 | CurrentValue[ "MouseOver" ],
36 | { "Link", FontColor -> RGBColor[ 0.855, 0.396, 0.145 ] },
37 | { "Link", FontColor -> RGBColor[ 0.020, 0.286, 0.651 ] }
38 | ]
39 | ],
40 | MouseAppearanceTag[ "LinkHand" ]
41 | ],
42 | "[", "\"OPENAI_API_KEY\"", "]"
43 | },
44 | "InlineFormula",
45 | FontFamily -> "Source Sans Pro",
46 | ShowStringCharacters -> True,
47 | FontSize -> Inherited * 0.9
48 | ]|>]
49 | },
50 | "Text",
51 | FontSize -> 12
52 | ]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/Delete-disabled.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.07692307692307693],
2 | {FaceForm[{RGBColor[0.8588235294117647, 0.8588235294117647,
3 | 0.8588235294117647], Opacity[1.]}],
4 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
5 | {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}}},
6 | {{{12., 12.}, {11., 12.}, {11., 1.}, {2., 1.}, {2., 12.}, {1., 12.},
7 | {1., 1.}, {1., 0.44899940490722656}, {1.4489994049072266, 0.}, {2., 0.},
8 | {11., 0.}, {11.550999999046326, 0.}, {12., 0.44899940490722656},
9 | {12., 1.}, {12., 12.}}}]},
10 | {FaceForm[{RGBColor[0.8588235294117647, 0.8588235294117647,
11 | 0.8588235294117647], Opacity[1.]}],
12 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}},
13 | {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0},
14 | {0, 1, 0}, {0, 1, 0}}}, {{{10., 10.}, {9., 10.}, {9., 3.}, {10., 3.},
15 | {10., 10.}}, {{7., 10.}, {6., 10.}, {6., 3.}, {7., 3.}, {7., 10.}},
16 | {{4., 10.}, {3., 10.}, {3., 3.}, {4., 3.}, {4., 10.}}}]},
17 | {FaceForm[{RGBColor[0.8588235294117647, 0.8588235294117647,
18 | 0.8588235294117647], Opacity[1.]}],
19 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
20 | {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}},
21 | {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
22 | {{{12., 15.}, {8., 15.}, {5., 15.}, {1., 15.}, {0.44899940490722656, 15.},
23 | {0., 14.550999999046326}, {0., 14.}, {0., 13.}, {0., 12.449000120162964},
24 | {0.44899940490722656, 12.}, {1., 12.}, {12., 12.}, {12.550999999046326,
25 | 12.}, {13., 12.449000120162964}, {13., 13.}, {13., 14.}, {13.,
26 | 14.550999999046326}, {12.550999999046326, 15.}, {12., 15.}},
27 | {{1., 14.}, {12., 14.}, {12., 13.}, {1., 13.}, {1., 14.}}}]},
28 | {FaceForm[{RGBColor[0.8588235294117647, 0.8588235294117647,
29 | 0.8588235294117647], Opacity[1.]}],
30 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
31 | {{{8., 16.}, {5., 16.}, {5., 15.}, {8., 15.}, {8., 16.}}}]},
32 | {FaceForm[{RGBColor[0.7607843137254902, 0.7607843137254902,
33 | 0.7607843137254902], Opacity[1.]}], FilledCurve[{{{0, 2, 0}, {0, 1, 0}}},
34 | {{{8., 15.}, {5., 15.}, {8., 15.}}}]}}, AspectRatio -> Automatic,
35 | ImageSize -> {{14., 17.}, {14., 17.}},
36 | PlotRange -> {{-0.5, 13.5}, {-0.5, 16.5}}]
--------------------------------------------------------------------------------
/Developer/Resources/Icons/PersonaRawModel.wl:
--------------------------------------------------------------------------------
1 | (* Created with the Wolfram Language : www.wolfram.com *)
2 | Graphics[{Thickness[0.038461538461538464],
3 | Style[{FilledCurve[{{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
4 | {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
5 | {{{8.5, 8.5}, {5., 8.5}, {4.724999904632568, 8.5},
6 | {4.5, 8.724999994039536}, {4.5, 9.}, {4.5, 21.},
7 | {4.5, 21.275999069213867}, {4.724999904632568, 21.5}, {5., 21.5},
8 | {21., 21.5}, {21.274999618530273, 21.5}, {21.5, 21.275999069213867},
9 | {21.5, 21.}, {21.5, 8.999000012874603}, {21.5, 8.723999992012978},
10 | {21.274999618530273, 8.5}, {21., 8.5}, {12.824000358581543, 8.5},
11 | {8.5, 5.039999961853027}, {8.5, 8.5}}}]},
12 | FaceForm[color @ "ModelRawModelIconBackground"]],
13 | Style[{FilledCurve[{{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
14 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}},
15 | {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
16 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
17 | {{{21.00040054321289, 22.}, {5.000400543212891, 22.},
18 | {4.448400497436523, 22.}, {4.000400543212891, 21.552000015974045},
19 | {4.000400543212891, 21.}, {4.000400543212891, 9.},
20 | {4.000400543212891, 8.447999954223633}, {4.448400497436523, 8.},
21 | {5.000400543212891, 8.}, {8.00040054321289, 8.},
22 | {8.00040054321289, 4.}, {13.00040054321289, 8.},
23 | {21.00040054321289, 8.}, {21.552400529384613, 8.},
24 | {22.00040054321289, 8.446999549865723}, {22.00040054321289,
25 | 8.99899959564209}, {22.00040054321289, 21.}, {22.00040054321289,
26 | 21.552000015974045}, {21.552400529384613, 22.},
27 | {21.00040054321289, 22.}}, {{21.00040054321289, 21.},
28 | {21.00040054321289, 9.}, {13.00040054321289, 9.},
29 | {12.649399757385254, 9.}, {12.375399589538574, 8.781000137329102},
30 | {9.00040054321289, 6.081000328063965}, {9.00040054321289, 8.},
31 | {9.00040054321289, 9.}, {8.00040054321289, 9.},
32 | {5.000400543212891, 9.}, {5.000400543212891, 21.},
33 | {21.00040054321289, 21.}}}]}, FaceForm[RGBColor[0.5372549019607843,
34 | 0.5372549019607843, 0.5372549019607843, 1.]]]},
35 | ImageSize -> {{27., 27.}, {27., 27.}},
36 | PlotRange -> {{-0.5, 26.5}, {-0.5, 26.5}}, AspectRatio -> Automatic]
37 |
--------------------------------------------------------------------------------
/Source/Chatbook/ChatbookFiles.wl:
--------------------------------------------------------------------------------
1 | (* ::Section::Closed:: *)
2 | (*Package Header*)
3 | BeginPackage[ "Wolfram`Chatbook`ChatbookFiles`" ];
4 | Begin[ "`Private`" ];
5 |
6 | Needs[ "Wolfram`Chatbook`" ];
7 | Needs[ "Wolfram`Chatbook`Common`" ];
8 |
9 | (* ::**************************************************************************************************************:: *)
10 | (* ::Section::Closed:: *)
11 | (*Configuration*)
12 | $chatbookRoot := FileNameJoin @ { ExpandFileName @ LocalObject @ $LocalBase, "Chatbook" };
13 |
14 | (* ::**************************************************************************************************************:: *)
15 | (* ::Section::Closed:: *)
16 | (*$ChatbookFilesDirectory*)
17 | $ChatbookFilesDirectory := chatbookFilesDirectory[ { }, False ];
18 |
19 | (* ::**************************************************************************************************************:: *)
20 | (* ::Section::Closed:: *)
21 | (*ChatbookFilesDirectory*)
22 | ChatbookFilesDirectory // beginDefinition;
23 | ChatbookFilesDirectory // Options = { "EnsureDirectory" -> True };
24 |
25 | ChatbookFilesDirectory[ opts: OptionsPattern[ ] ] :=
26 | catchMine @ chatbookFilesDirectory[ { }, OptionValue[ "EnsureDirectory" ] ];
27 |
28 | ChatbookFilesDirectory[ name_String, opts: OptionsPattern[ ] ] :=
29 | catchMine @ chatbookFilesDirectory[ { name }, OptionValue[ "EnsureDirectory" ] ];
30 |
31 | ChatbookFilesDirectory[ { names___String }, opts: OptionsPattern[ ] ] :=
32 | catchMine @ chatbookFilesDirectory[ { names }, OptionValue[ "EnsureDirectory" ] ];
33 |
34 | ChatbookFilesDirectory // endExportedDefinition;
35 |
36 | (* ::**************************************************************************************************************:: *)
37 | (* ::Subsection::Closed:: *)
38 | (*chatbookFilesDirectory*)
39 | chatbookFilesDirectory // beginDefinition;
40 |
41 | chatbookFilesDirectory[ { names___String }, ensure_ ] := Enclose[
42 | If[ TrueQ @ ensure,
43 | ConfirmBy[ GeneralUtilities`EnsureDirectory @ { $chatbookRoot, names }, DirectoryQ, "Directory" ],
44 | ConfirmBy[ FileNameJoin @ { $chatbookRoot, names }, StringQ, "Directory" ]
45 | ],
46 | throwInternalFailure
47 | ];
48 |
49 | chatbookFilesDirectory // endDefinition;
50 |
51 | (* ::**************************************************************************************************************:: *)
52 | (* ::Section::Closed:: *)
53 | (*Package Footer*)
54 | addToMXInitialization[
55 | Null
56 | ];
57 |
58 | End[ ];
59 | EndPackage[ ];
60 |
--------------------------------------------------------------------------------
/.github/workflows/Release.yml:
--------------------------------------------------------------------------------
1 | name: Release
2 |
3 | on:
4 | workflow_dispatch:
5 | push:
6 | branches: [release/paclet]
7 |
8 | concurrency:
9 | group: ${{ github.ref }}
10 | cancel-in-progress: true
11 |
12 | env:
13 | RESOURCE_PUBLISHER_TOKEN: ${{ secrets.RESOURCE_PUBLISHER_TOKEN }}
14 | WOLFRAMSCRIPT_ENTITLEMENTID: ${{ secrets.WOLFRAMSCRIPT_ENTITLEMENTID }}
15 | OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
16 |
17 | jobs:
18 |
19 | Check:
20 | name: Check
21 | runs-on: ubuntu-latest
22 | timeout-minutes: 30
23 |
24 | container:
25 | image: wolframresearch/wolframengine:14.2.1
26 | options: --user root
27 |
28 | env:
29 | WOLFRAM_SYSTEM_ID: Linux-x86-64
30 |
31 | steps:
32 | - name: Checkout
33 | uses: actions/checkout@v4
34 |
35 | - name: Build
36 | run: wolframscript -f Scripts/BuildPaclet.wls --check=true
37 |
38 | - name: InstallTestDependencies
39 | run: |
40 | apt-get update && apt-get install libgomp1 -y
41 | wolframscript -f Scripts/InstallTestDependencies.wls
42 |
43 | - name: Test
44 | run: wolframscript -f Scripts/TestPaclet.wls
45 |
46 | Release:
47 | name: Release
48 | needs: [Check]
49 | runs-on: ubuntu-latest
50 | timeout-minutes: 30
51 |
52 | container:
53 | image: wolframresearch/wolframengine:14.2.1
54 | options: --user root
55 |
56 | env:
57 | WOLFRAM_SYSTEM_ID: Linux-x86-64
58 | GH_INSTALL_URL: https://github.com/cli/cli/releases/download/v2.33.0/gh_2.33.0_linux_amd64.deb
59 |
60 | steps:
61 | - name: Update Git
62 | run: |
63 | apt-get update && apt-get install software-properties-common -y
64 | add-apt-repository ppa:git-core/ppa -y
65 | apt-get update && apt-get install git -y
66 | wget ${{ env.GH_INSTALL_URL }} -O gh.deb
67 | dpkg -i gh.deb
68 |
69 | - name: Checkout
70 | uses: actions/checkout@v4
71 |
72 | - name: Build
73 | run: wolframscript -f Scripts/BuildPaclet.wls --check=false
74 |
75 | - name: CreateRelease
76 | env:
77 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78 | run: |
79 | git config --global --add safe.directory $(pwd)
80 | gh release create "${{ env.PACLET_RELEASE_TAG }}" "${{ env.PACLET_PATH }}#${{ env.PACLET_FILE }}" \
81 | --target="${{ github.ref }}" \
82 | --repo="${{ env.GITHUB_REPOSITORY }}" \
83 | --title="Release ${{ env.PACLET_RELEASE_TAG }}" \
84 | --generate-notes \
85 | --prerelease
--------------------------------------------------------------------------------
/Developer/Resources/Icons/ChatUserIcon.wl:
--------------------------------------------------------------------------------
1 | Graphics[
2 | {
3 | Thickness[ 0.04 ],
4 | {
5 | FaceForm @ { RGBColor[ 0.57255, 0.57255, 0.57255 ], Opacity[ 1.0 ] },
6 | FilledCurve[
7 | { { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } } },
8 | {
9 | {
10 | { 22.58, 9.9913 },
11 | { 19.879, 5.0003 },
12 | { 19.0, 5.0003 },
13 | { 21.221, 10.003 },
14 | { 19.0, 15.0 },
15 | { 19.879, 15.0 },
16 | { 22.58, 9.9913 }
17 | }
18 | }
19 | ]
20 | },
21 | {
22 | FaceForm @ { RGBColor[ 0.0, 0.51373, 0.83137 ], Opacity[ 1.0 ] },
23 | FilledCurve[
24 | {
25 | {
26 | { 1, 4, 3 },
27 | { 0, 1, 0 },
28 | { 1, 3, 3 },
29 | { 0, 1, 0 },
30 | { 1, 3, 3 },
31 | { 0, 1, 0 },
32 | { 0, 1, 0 },
33 | { 0, 1, 0 },
34 | { 0, 1, 0 },
35 | { 1, 3, 3 },
36 | { 0, 1, 0 }
37 | }
38 | },
39 | {
40 | {
41 | { 16.0, 16.0 },
42 | { 16.0, 16.552 },
43 | { 15.552, 17.0 },
44 | { 15.0, 17.0 },
45 | { 3.0001, 17.0 },
46 | { 2.4481, 17.0 },
47 | { 2.0001, 16.552 },
48 | { 2.0001, 16.0 },
49 | { 2.0001, 7.0 },
50 | { 2.0001, 6.448 },
51 | { 2.4481, 6.0 },
52 | { 3.0001, 6.0 },
53 | { 5.0001, 6.0 },
54 | { 5.0001, 3.0 },
55 | { 9.0001, 6.0 },
56 | { 15.0, 6.0 },
57 | { 15.552, 6.0 },
58 | { 16.0, 6.447 },
59 | { 16.0, 6.999 },
60 | { 16.0, 16.0 }
61 | }
62 | }
63 | ]
64 | },
65 | {
66 | FaceForm @ { RGBColor[ 1.0, 1.0, 1.0 ], Opacity[ 1.0 ] },
67 | FilledCurve[
68 | {
69 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
70 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
71 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
72 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
73 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } }
74 | },
75 | {
76 | { { 8.0, 9.0 }, { 10.0, 9.0 }, { 10.0, 10.0 }, { 8.0, 10.0 }, { 8.0, 9.0 } },
77 | { { 5.0, 9.0 }, { 7.0, 9.0 }, { 7.0, 10.0 }, { 5.0, 10.0 }, { 5.0, 9.0 } },
78 | { { 10.0, 11.0 }, { 13.0, 11.0 }, { 13.0, 12.0 }, { 10.0, 12.0 }, { 10.0, 11.0 } },
79 | { { 5.0, 11.0 }, { 9.0, 11.0 }, { 9.0, 12.0 }, { 5.0, 12.0 }, { 5.0, 11.0 } },
80 | { { 5.0, 13.0 }, { 13.0, 13.0 }, { 13.0, 14.0 }, { 5.0, 14.0 }, { 5.0, 13.0 } }
81 | }
82 | ]
83 | }
84 | },
85 | AspectRatio -> Automatic,
86 | ImageSize -> { { 26.0, 21.0 }, { 26.0, 21.0 } },
87 | PlotRange -> { { -0.5, 25.5 }, { 0.5, 20.5 } }
88 | ]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/ToolManagerCog.wl:
--------------------------------------------------------------------------------
1 | GraphicsBox[{#1, JoinForm["Round"], Thickness[0.08],
2 | JoinedCurveBox[{{{1, 4, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3},
3 | {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3},
4 | {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0},
5 | {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3},
6 | {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0},
7 | {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3},
8 | {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3},
9 | {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0},
10 | {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3},
11 | {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0},
12 | {1, 3, 3}, {0, 1, 0}}}, CompressedData["\n1:eJxlVj1MFEEU3rvjCKE57ly4g+V2u\
13 | Z3jx5rGhszEBlupaTSRVixssLGhsaEx\nJlrYnDUNDY0NFjZag4kNidhgQYMJJHjezPe9t7m7TTaTb+\
14 | bte9/7mfe28/T5\n1rNKFEWlwftu8JYH78HJ9dp2zbjv3/zTdjv++Z27sH+QunX/HOXu0flefLiZ\nu\
15 | cg/r3Os0ZL7tLsxfWq67jjdv3x83HGZXz4SP8gVQ96ovN9O9417MYC9K+P8\nsvvZUI9xfwfWT64N7R\
16 | l338O1Qo/oDfzW82F81FF5r3Zjesl9eO+ffAwHt84z\n+pszDpmev/LHe6naDTBuMx6GcgnlDNcCB/9\
17 | 2E9h9YxDfnYTfGepJyGNZMfis\n0I8F+Jeuui9++6TF/VWuBUZcm4r/eHg5pxh6Z5mHVfKL4dfbFfKL\
18 | R/jEmgf4\ndY9ykq+GxgP26uTLPKV15jOnvRn6Ibim8cc6xbx2iSddCPthl/IVxcGt7ZLK\ng1/EfEl\
19 | 99G3g91XydWehV/jeWLkHggO/h7nKg2+H9VPF/vzSGIa9qt4POYfe\nTPlDb+q2QgDL/K7N/RLjmiiW\
20 | OhN/wT9hfEvMe0K7V1bqDOcXimHvDPHYXCC/\nU4t8txTjvMChXnpNxVibzMOpxTrL+/OL8Y2VD/jF5\
21 | FnSOkNcxD+pq7KDmQbt\nVbg2aK+CfrFRZ74nGI8Z1mGVcjXG+86C1xTt3BBPKha9Ii9xh92+RT4i8o\
22 | uo\nv28lH+gL/4grlLu1Ur/DeErlkfea8h7F4CF+VHlvRuXrGhfINxiPMu3E/E7u\nSYERxyIvct+xF\
23 | nlC3UhdyfcXzOss7f6w0m+kzqQfCZZ+JVj6mWDU6wL7xZkF\nv4T+X1jpj8N8Evov/i3S7zL1LGo8YK\
24 | 9NuYrOOdSb1FWG/tib4PeZxl/mC/Tc\nWZk/0jdCPd4WWPqmyMt8Q530rcw/8Ih0PsKe3IvuSN/okt+\
25 | kygOzrt7KvK6N\nYcyhXO+HnMP/mhP+cr/QBzm3ew3E46X09VjxcB0ZrSPoN8xXDL9/LuvcAZ8V\nxe\
26 | ij43MKeZhTjPOmYuShpRj3u6VzU+aozFWpI+EDfuNzO4g9Ef8WNR7oa+zX\n88X/0+j/1H8IvdQX\n \
27 | "], CurveClosed -> {1}], JoinedCurveBox[
28 | {{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}}},
29 | {{{7.5, 5.97}, {7.5, 5.1195}, {6.8105, 4.43}, {5.96, 4.43}, {5.1095, 4.43},
30 | {4.42, 5.1195}, {4.42, 5.97}, {4.42, 6.8205}, {5.1095, 7.51},
31 | {5.96, 7.51}, {6.8105, 7.51}, {7.5, 6.8205}, {7.5, 5.97}}},
32 | CurveClosed -> {0}]}, ImageSize -> {15, 15},
33 | PlotRange -> {{0., 11.93}, {0., 11.93}}, AspectRatio -> Automatic,
34 | ImagePadding -> {{0, 1}, {1, 0}}, BaselinePosition -> Scaled[0.25]] &
--------------------------------------------------------------------------------
/Source/Chatbook/ChatModes/ChatModes.wl:
--------------------------------------------------------------------------------
1 | (* ::Section::Closed:: *)
2 | (*Package Header*)
3 | BeginPackage[ "Wolfram`Chatbook`ChatModes`" ];
4 | Begin[ "`Private`" ];
5 |
6 | Needs[ "Wolfram`Chatbook`" ];
7 | Needs[ "Wolfram`Chatbook`Common`" ];
8 |
9 | (* TODO:
10 | * Workspace Chat
11 | * Get context from multiple notebooks
12 | * Set up an LLM subtask to choose relevant notebooks for inclusion
13 | * Create test writer tool
14 | * Define a `$ChatEvaluationMode` that gives "Inline", "Workspace", or None based on the current chat mode
15 | *)
16 |
17 | (* ::**************************************************************************************************************:: *)
18 | (* ::Section::Closed:: *)
19 | (*$WorkspaceChat*)
20 | GeneralUtilities`SetUsage[ "\
21 | $WorkspaceChat gives True when chat is occurring in a separate dedicated chat window and False otherwise." ];
22 |
23 | $WorkspaceChat = False;
24 |
25 | (* ::**************************************************************************************************************:: *)
26 | (* ::Section::Closed:: *)
27 | (*$SidebarChat*)
28 | GeneralUtilities`SetUsage[ "\
29 | $SidebarChat gives True when chat is occurring in a notebook's side bar area and False otherwise." ];
30 |
31 | $SidebarChat = False;
32 |
33 | (* ::**************************************************************************************************************:: *)
34 | (* ::Section::Closed:: *)
35 | (*$InlineChat*)
36 | GeneralUtilities`SetUsage[ "\
37 | $InlineChat gives True when chat is occurring in an attached chat cell and False otherwise." ];
38 |
39 | $InlineChat = False;
40 |
41 | (* ::**************************************************************************************************************:: *)
42 | (* ::Section::Closed:: *)
43 | (*Load Subcontexts*)
44 | $subcontexts = {
45 | "Wolfram`Chatbook`ChatModes`Common`",
46 | "Wolfram`Chatbook`ChatModes`ContentSuggestions`",
47 | "Wolfram`Chatbook`ChatModes`Context`",
48 | "Wolfram`Chatbook`ChatModes`Evaluate`",
49 | "Wolfram`Chatbook`ChatModes`NotebookAssistanceInstructions`",
50 | "Wolfram`Chatbook`ChatModes`NotebookFocus`",
51 | "Wolfram`Chatbook`ChatModes`ShowNotebookAssistance`",
52 | "Wolfram`Chatbook`ChatModes`UI`"
53 | };
54 |
55 | Scan[ Needs[ # -> None ] &, $subcontexts ];
56 |
57 | $ChatbookContexts = Union[ $ChatbookContexts, $subcontexts ];
58 |
59 | (* ::**************************************************************************************************************:: *)
60 | (* ::Section::Closed:: *)
61 | (*Package Footer*)
62 | addToMXInitialization[
63 | Null
64 | ];
65 |
66 | End[ ];
67 | EndPackage[ ];
68 |
--------------------------------------------------------------------------------
/Developer/Resources/Icons/SideChatIcon.wl:
--------------------------------------------------------------------------------
1 | (* ::Package:: *)
2 |
3 | Graphics[{Thickness[0.07142857142857142],
4 | {FaceForm[{RGBColor[0.596078431372549, 0.8431372549019608,
5 | 0.9764705882352941], Opacity[1.]}], FilledCurve[{{{0, 2, 0}, {1, 3, 3},
6 | {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1,
7 | 0}, {0, 1, 0}, {0, 1, 0}}}, {{{4.25, 2.25}, {2.4450000524520874, 2.25},
8 | {2.337999939918518, 2.25}, {2.25, 2.336999997496605}, {2.25,
9 | 2.4439999908208847}, {2.25, 9.556000232696533}, {2.25,
10 | 9.663000106811523}, {2.337999939918518, 9.75}, {2.4450000524520874,
11 | 9.75}, {11.556000232696533, 9.75}, {11.663000106811523, 9.75}, {11.75,
12 | 9.663000106811523}, {11.75, 9.556000232696533}, {11.75,
13 | 2.4439999908208847}, {11.75, 2.336999997496605}, {11.663000106811523,
14 | 2.25}, {11.556000232696533, 2.25}, {6.923999786376953, 2.25}, {4.25,
15 | 0.466999888420105}, {4.25, 2.25}}}]},
16 | {FaceForm[{RGBColor[0.48627450980392156, 0.6823529411764706,
17 | 0.788235294117647], Opacity[1.]}], FilledCurve[{{{0, 2, 0}, {1, 3, 3},
18 | {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3,
19 | 3}, {0, 1, 0}, {1, 3, 3}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
20 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1,
21 | 0}}}, {{{11.555999755859375, 10.}, {2.4449987411499023, 10.},
22 | {2.1999998092651367, 10.}, {2., 9.800999999046326}, {2.,
23 | 9.555999994277954}, {2., 2.443999767303467}, {2., 2.1989998817443848},
24 | {2.1999998092651367, 2.}, {2.4449987411499023, 2.}, {3.999999523162842,
25 | 2.}, {3.999999523162842, 0.}, {6.999999523162842, 2.},
26 | {11.555999755859375, 2.}, {11.800999760627747, 2.}, {11.999999761581421,
27 | 2.1989998817443848}, {11.999999761581421, 2.443999767303467},
28 | {11.999999761581421, 9.555999994277954}, {11.999999761581421,
29 | 9.800999999046326}, {11.800999760627747, 10.}, {11.555999755859375,
30 | 10.}}, {{11.49999975785613, 9.5}, {11.49999975785613, 2.5},
31 | {6.999999523162842, 2.5}, {6.848999977111816, 2.5}, {6.722999572753906,
32 | 2.4159998893737793}, {4.499999523162842, 0.9340000152587891},
33 | {4.499999523162842, 2.}, {4.499999523162842, 2.5}, {3.999999523162842,
34 | 2.5}, {2.5, 2.5}, {2.5, 9.5}, {11.49999975785613, 9.5}}}]},
35 | {FaceForm[{RGBColor[0.47843137254901963, 0.7215686274509804,
36 | 0.8470588235294118], Opacity[1.]}], FilledCurve[{{{0, 2, 0}, {0, 1, 0},
37 | {0, 1, 0}, {0, 1, 0}}}, {{{0., 12.}, {14., 12.}, {14., 14.}, {0., 14.},
38 | {0., 12.}}}]}}, AspectRatio -> Automatic, ImageSize -> {15., 15.},
39 | PlotRange -> {{-0.5, 14.5}, {-0.5, 14.5}}]
40 |
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/ToolManagerAllChecked.wl:
--------------------------------------------------------------------------------
1 | GraphicsBox[{#1, FilledCurveBox[{{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3},
2 | {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}},
3 | {{1, 4, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
4 | {1, 3, 3}, {0, 1, 0}}}, {{{8.49, 10.51}, {2.02, 10.51}, {0.91, 10.51},
5 | {0., 9.61}, {0., 8.49}, {0., 2.01}, {0., 0.9}, {0.9, -0.0099993},
6 | {2.02, -0.0099993}, {8.5, -0.0099993}, {9.61, -0.0099993}, {10.52, 0.89},
7 | {10.52, 2.01}, {10.52, 8.49}, {10.52, 9.6}, {9.62, 10.51}, {8.5, 10.51},
8 | {8.49, 10.51}}, {{9.25, 2.04}, {9.25, 1.61}, {8.9, 1.26}, {8.47, 1.26},
9 | {2.03, 1.26}, {1.6, 1.26}, {1.25, 1.61}, {1.25, 2.04}, {1.25, 8.48},
10 | {1.25, 8.91}, {1.6, 9.26}, {2.03, 9.26}, {8.47, 9.26}, {8.9, 9.26},
11 | {9.25, 8.91}, {9.25, 8.48}, {9.25, 2.04}}}],
12 | FilledCurveBox[{{{1, 4, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3},
13 | {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3},
14 | {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}}},
15 | CompressedData["\n1:eJxdUiFMw1AQ7boVtsKyrrQbjEA/wQwDAr3kggHLDGYGErAMC3p6BgM\
16 | C02k0\neljQ09No0Px/93pNdsnP77u73nt3/w5u7oe3Vc/zKvac2OPbs8jHg3CR0VPy\nfr58NDSd//\
17 | ZH0z3Fp2y75FBybOho5DJ6lE1+Lj/2M+K0pEMPtko+7tHri7MU\nedtkgzYjQt2IZo4uj1A3oju2iEI\
18 | WUvoLLPpaipl20gRfDJ5N+BP4N1SH9BEi\nrwPdDcUeW12xLWIT1uiv7xwpXXADAeqn6MfHndCna2te\
19 | ge4SC++WYukjBl8N\n+lqIB6pT+NaRH2BeddSvwt+ATp+G/BHifx95TczVV54CC39b8feXszbmW8Uc\
20 | \nYuIxDmrg6aLfGPcO4l3wGd2HYm+kbib+NyN9HBrF3PdZiZn+ysg+PRvoM1pP\n3tUI/7VZ2U+D90F\
21 | 8mSle3e9/gCshyQ==\n "]], FilledCurveBox[
22 | {{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3},
23 | {0, 1, 0}, {1, 3, 3}}}, {{{13.49, 15.06}, {7.01, 15.06}, {6.17, 15.06},
24 | {5.45, 14.54}, {5.15, 13.81}, {13.47, 13.81}, {13.9, 13.81},
25 | {14.25, 13.46}, {14.25, 13.03}, {14.25, 4.71}, {14.99, 5.01},
26 | {15.51, 5.73}, {15.51, 6.57}, {15.51, 13.04}, {15.51, 14.15},
27 | {14.61, 15.06}, {13.49, 15.06}}}], FilledCurveBox[
28 | {{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3},
29 | {0, 1, 0}, {1, 3, 3}, {0, 1, 0}}},
30 | {{{10.99, 12.79}, {4.51, 12.79}, {3.67, 12.79}, {2.95, 12.27},
31 | {2.65, 11.54}, {10.97, 11.54}, {11.4, 11.54}, {11.75, 11.19},
32 | {11.75, 10.76}, {11.75, 2.44}, {12.49, 2.74}, {13.01, 3.46},
33 | {13.01, 4.3}, {13.01, 10.78}, {13.01, 11.89}, {12.11, 12.8},
34 | {10.99, 12.8}, {10.99, 12.79}}}]},
35 | ImageSize -> {20., 17.647058823529413},
36 | PlotRange -> {{0., 16.54}, {0., 14.51}}, ImagePadding -> {{0, 1}, {1, 0}},
37 | AspectRatio -> Automatic, BaselinePosition -> Scaled[0.25]] &
--------------------------------------------------------------------------------
/Developer/Resources/Icons/AssistantIconActive.wl:
--------------------------------------------------------------------------------
1 | Graphics[
2 | {
3 | Thickness[ 0.04 ],
4 | {
5 | FaceForm @ { RGBColor[ 0.65098, 0.65098, 0.65098 ], Opacity[ 1.0 ] },
6 | FilledCurve[
7 | {
8 | {
9 | { 1, 4, 3 },
10 | { 0, 1, 0 },
11 | { 1, 3, 3 },
12 | { 0, 1, 0 },
13 | { 1, 3, 3 },
14 | { 0, 1, 0 },
15 | { 0, 1, 0 },
16 | { 0, 1, 0 },
17 | { 0, 1, 0 },
18 | { 1, 3, 3 },
19 | { 0, 1, 0 }
20 | }
21 | },
22 | {
23 | {
24 | { 2.0, 16.0 },
25 | { 2.0, 16.552 },
26 | { 2.448, 17.0 },
27 | { 3.0, 17.0 },
28 | { 15.0, 17.0 },
29 | { 15.552, 17.0 },
30 | { 16.0, 16.552 },
31 | { 16.0, 16.0 },
32 | { 16.0, 7.0 },
33 | { 16.0, 6.448 },
34 | { 15.552, 6.0 },
35 | { 15.0, 6.0 },
36 | { 13.0, 6.0 },
37 | { 13.0, 3.0 },
38 | { 9.0, 6.0 },
39 | { 3.0, 6.0 },
40 | { 2.448, 6.0 },
41 | { 2.0, 6.448 },
42 | { 2.0, 7.0 },
43 | { 2.0, 16.0 }
44 | }
45 | }
46 | ]
47 | },
48 | {
49 | FaceForm @ { RGBColor[ 0.57255, 0.57255, 0.57255 ], Opacity[ 1.0 ] },
50 | FilledCurve[
51 | { { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } } },
52 | {
53 | {
54 | { 21.121, 15.0 },
55 | { 22.0, 15.0 },
56 | { 19.779, 10.003 },
57 | { 22.0, 5.0 },
58 | { 21.121, 5.0 },
59 | { 18.42, 9.991 },
60 | { 21.121, 15.0 }
61 | }
62 | }
63 | ]
64 | },
65 | {
66 | FaceForm @ { RGBColor[ 1.0, 1.0, 1.0 ], Opacity[ 1.0 ] },
67 | FilledCurve[
68 | {
69 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
70 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
71 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
72 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
73 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
74 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } }
75 | },
76 | {
77 | { { 5.0, 9.0 }, { 10.0, 9.0 }, { 10.0, 10.0 }, { 5.0, 10.0 }, { 5.0, 9.0 } },
78 | { { 12.0, 11.0 }, { 13.0, 11.0 }, { 13.0, 12.0 }, { 12.0, 12.0 }, { 12.0, 11.0 } },
79 | { { 7.0, 11.0 }, { 11.0, 11.0 }, { 11.0, 12.0 }, { 7.0, 12.0 }, { 7.0, 11.0 } },
80 | { { 5.0, 11.0 }, { 6.0, 11.0 }, { 6.0, 12.0 }, { 5.0, 12.0 }, { 5.0, 11.0 } },
81 | { { 10.0, 13.0 }, { 13.0, 13.0 }, { 13.0, 14.0 }, { 10.0, 14.0 }, { 10.0, 13.0 } },
82 | { { 5.0, 13.0 }, { 8.0, 13.0 }, { 8.0, 14.0 }, { 5.0, 14.0 }, { 5.0, 13.0 } }
83 | }
84 | ]
85 | }
86 | },
87 | AspectRatio -> Automatic,
88 | ImageSize -> { { 26.0, 21.0 }, { 26.0, 21.0 } },
89 | PlotRange -> { { -0.5, 25.5 }, { 0.5, 20.5 } }
90 | ]
--------------------------------------------------------------------------------
/Developer/Resources/Icons/AssistantIcon.wl:
--------------------------------------------------------------------------------
1 | Graphics[
2 | {
3 | Thickness[ 0.04 ],
4 | {
5 | FaceForm @ { RGBColor[ 0.0, 0.69804, 1.0 ], Opacity[ 1.0 ] },
6 | FilledCurve[
7 | {
8 | {
9 | { 1, 4, 3 },
10 | { 0, 1, 0 },
11 | { 1, 3, 3 },
12 | { 0, 1, 0 },
13 | { 1, 3, 3 },
14 | { 0, 1, 0 },
15 | { 0, 1, 0 },
16 | { 0, 1, 0 },
17 | { 0, 1, 0 },
18 | { 1, 3, 3 },
19 | { 0, 1, 0 }
20 | }
21 | },
22 | {
23 | {
24 | { 2.0001, 16.0 },
25 | { 2.0001, 16.552 },
26 | { 2.4481, 17.0 },
27 | { 3.0001, 17.0 },
28 | { 15.0, 17.0 },
29 | { 15.552, 17.0 },
30 | { 16.0, 16.552 },
31 | { 16.0, 16.0 },
32 | { 16.0, 7.0 },
33 | { 16.0, 6.448 },
34 | { 15.552, 6.0 },
35 | { 15.0, 6.0 },
36 | { 13.0, 6.0 },
37 | { 13.0, 3.0 },
38 | { 9.0001, 6.0 },
39 | { 3.0001, 6.0 },
40 | { 2.4481, 6.0 },
41 | { 2.0001, 6.448 },
42 | { 2.0001, 7.0 },
43 | { 2.0001, 16.0 }
44 | }
45 | }
46 | ]
47 | },
48 | {
49 | FaceForm @ { RGBColor[ 0.57255, 0.57255, 0.57255 ], Opacity[ 1.0 ] },
50 | FilledCurve[
51 | { { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } } },
52 | {
53 | {
54 | { 21.121, 15.0 },
55 | { 22.0, 15.0 },
56 | { 19.779, 10.003 },
57 | { 22.0, 5.0 },
58 | { 21.121, 5.0 },
59 | { 18.42, 9.991 },
60 | { 21.121, 15.0 }
61 | }
62 | }
63 | ]
64 | },
65 | {
66 | FaceForm @ { RGBColor[ 1.0, 1.0, 1.0 ], Opacity[ 1.0 ] },
67 | FilledCurve[
68 | {
69 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
70 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
71 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
72 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
73 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } },
74 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } }
75 | },
76 | {
77 | { { 5.0, 9.0 }, { 10.0, 9.0 }, { 10.0, 10.0 }, { 5.0, 10.0 }, { 5.0, 9.0 } },
78 | { { 12.0, 11.0 }, { 13.0, 11.0 }, { 13.0, 12.0 }, { 12.0, 12.0 }, { 12.0, 11.0 } },
79 | { { 7.0, 11.0 }, { 11.0, 11.0 }, { 11.0, 12.0 }, { 7.0, 12.0 }, { 7.0, 11.0 } },
80 | { { 5.0, 11.0 }, { 6.0, 11.0 }, { 6.0, 12.0 }, { 5.0, 12.0 }, { 5.0, 11.0 } },
81 | { { 10.0, 13.0 }, { 13.0, 13.0 }, { 13.0, 14.0 }, { 10.0, 14.0 }, { 10.0, 13.0 } },
82 | { { 5.0, 13.0 }, { 8.0, 13.0 }, { 8.0, 14.0 }, { 5.0, 14.0 }, { 5.0, 13.0 } }
83 | }
84 | ]
85 | }
86 | },
87 | AspectRatio -> Automatic,
88 | ImageSize -> { { 26.0, 21.0 }, { 26.0, 21.0 } },
89 | PlotRange -> { { -0.5, 25.5 }, { 0.5, 20.5 } }
90 | ]
--------------------------------------------------------------------------------
/Developer/CacheTokenizers.wl:
--------------------------------------------------------------------------------
1 | (* This is used to backport tokenizers from later versions of WL to 13.3 so they can be included in the MX build. *)
2 |
3 | (* ::Section::Closed:: *)
4 | (*Package Header*)
5 | BeginPackage[ "Wolfram`ChatbookDeveloper`" ];
6 |
7 | `CacheTokenizers;
8 |
9 | Begin[ "`Private`" ];
10 |
11 | PacletInstall[ "Wolfram/LLMFunctions" ];
12 | Block[ { $ContextPath }, Get[ "Wolfram`LLMFunctions`" ] ];
13 |
14 | Get[ "Wolfram`Chatbook`" ];
15 | Needs[ "Wolfram`Chatbook`Common`" ];
16 | Needs[ "Developer`" -> None ];
17 |
18 | (* ::**************************************************************************************************************:: *)
19 | (* ::Section::Closed:: *)
20 | (*Paths*)
21 | $pacletDirectory = DirectoryName[ $InputFileName, 2 ];
22 | $tokenizerDirectory = FileNameJoin @ { $pacletDirectory, "Assets", "Tokenizers" };
23 |
24 | (* ::**************************************************************************************************************:: *)
25 | (* ::Section::Closed:: *)
26 | (*Aliases*)
27 | ensureDirectory = GeneralUtilities`EnsureDirectory;
28 | readWXFFile = Developer`ReadWXFFile;
29 | writeWXFFile = Developer`WriteWXFFile;
30 |
31 | (* ::**************************************************************************************************************:: *)
32 | (* ::Section::Closed:: *)
33 | (*CacheTokenizers*)
34 | CacheTokenizers // ClearAll;
35 |
36 | CacheTokenizers[ ] :=
37 | Enclose @ Module[ { tokenizers, exported },
38 | tokenizers = ConfirmBy[ Select[ cachedTokenizer @ All, MatchQ[ _NetEncoder ] ], AssociationQ, "Tokenizers" ];
39 | ConfirmAssert[ Length @ tokenizers > 0, "LengthCheck" ];
40 | exported = ConfirmBy[ Association @ KeyValueMap[ exportTokenizer, tokenizers ], AssociationQ, "Exported" ];
41 | exported
42 | ];
43 |
44 | (* ::**************************************************************************************************************:: *)
45 | (* ::Subsection::Closed:: *)
46 | (*exportTokenizer*)
47 | exportTokenizer // ClearAll;
48 | exportTokenizer[ name_String, tokenizer_NetEncoder ] :=
49 | Enclose @ Module[ { dir, file, exported },
50 | dir = ConfirmBy[ ensureDirectory @ $tokenizerDirectory, DirectoryQ, "Directory" ];
51 | file = FileNameJoin @ { dir, name <> ".wxf" };
52 | exported = ConfirmBy[ writeWXFFile[ file, tokenizer, PerformanceGoal -> "Size" ], FileExistsQ, "Export" ];
53 | ConfirmMatch[ readWXFFile[ exported ][ "Hello world" ], { __Integer }, "Verification" ];
54 | name -> exported
55 | ];
56 |
57 | (* ::**************************************************************************************************************:: *)
58 | (* ::Section::Closed:: *)
59 | (*Package Footer*)
60 | End[ ];
61 | EndPackage[ ];
62 |
--------------------------------------------------------------------------------
/Scripts/Resources/Icons/Tag.wl:
--------------------------------------------------------------------------------
1 | Graphics[
2 | {
3 | GrayLevel[ 0.4 ],
4 | {
5 | Thickness[ 0.0625 ],
6 | FilledCurve[
7 | {
8 | {
9 | { 0, 2, 0 },
10 | { 1, 3, 3 },
11 | { 0, 1, 0 },
12 | { 1, 3, 3 },
13 | { 0, 1, 0 },
14 | { 1, 3, 3 },
15 | { 1, 3, 3 },
16 | { 0, 1, 0 },
17 | { 1, 3, 3 },
18 | { 1, 3, 3 },
19 | { 0, 1, 0 },
20 | { 1, 3, 3 }
21 | },
22 | {
23 | { 0, 2, 0 },
24 | { 1, 3, 3 },
25 | { 0, 1, 0 },
26 | { 1, 3, 3 },
27 | { 0, 1, 0 },
28 | { 1, 3, 3 },
29 | { 0, 1, 0 },
30 | { 1, 3, 3 },
31 | { 0, 1, 0 },
32 | { 1, 3, 3 }
33 | },
34 | { { 1, 4, 3 }, { 1, 3, 3 }, { 1, 3, 3 }, { 1, 3, 3 } }
35 | },
36 | {
37 | {
38 | { 2.5, 8.225 },
39 | { 2.5, 13.25 },
40 | { 2.5, 13.388 },
41 | { 2.6119, 13.5 },
42 | { 2.75, 13.5 },
43 | { 7.775, 13.5 },
44 | { 7.8413, 13.5 },
45 | { 7.905, 13.474 },
46 | { 7.952, 13.427 },
47 | { 14.202, 7.177 },
48 | { 14.249, 7.1301 },
49 | { 14.275, 7.0664 },
50 | { 14.275, 7.0 },
51 | { 14.275, 6.9336 },
52 | { 14.249, 6.8699 },
53 | { 14.202, 6.823 },
54 | { 9.177, 1.798 },
55 | { 9.1301, 1.751 },
56 | { 9.0664, 1.7246 },
57 | { 9.0, 1.7246 },
58 | { 8.9336, 1.7246 },
59 | { 8.8699, 1.751 },
60 | { 8.823, 1.798 },
61 | { 2.573, 8.048 },
62 | { 2.5261, 8.095 },
63 | { 2.4999, 8.1587 },
64 | { 2.5, 8.225 }
65 | },
66 | {
67 | { 1.0, 8.225 },
68 | { 1.0, 13.25 },
69 | { 1.0, 14.216 },
70 | { 1.784, 15.0 },
71 | { 2.75, 15.0 },
72 | { 7.775, 15.0 },
73 | { 8.239, 15.0 },
74 | { 8.685, 14.816 },
75 | { 9.013, 14.487 },
76 | { 15.263, 8.237 },
77 | { 15.946, 7.5537 },
78 | { 15.946, 6.4463 },
79 | { 15.263, 5.763 },
80 | { 10.237, 0.737 },
81 | { 9.5537, 0.05416 },
82 | { 8.4463, 0.05416 },
83 | { 7.763, 0.737 },
84 | { 1.513, 6.987 },
85 | { 1.1845, 7.3153 },
86 | { 0.99997, 7.7606 },
87 | { 1.0, 8.225 }
88 | },
89 | {
90 | { 6.0, 11.0 },
91 | { 5.4477, 11.0 },
92 | { 5.0, 10.552 },
93 | { 5.0, 10.0 },
94 | { 5.0, 9.4477 },
95 | { 5.4477, 9.0 },
96 | { 6.0, 9.0 },
97 | { 6.5523, 9.0 },
98 | { 7.0, 9.4477 },
99 | { 7.0, 10.0 },
100 | { 7.0, 10.552 },
101 | { 6.5523, 11.0 },
102 | { 6.0, 11.0 }
103 | }
104 | }
105 | ]
106 | }
107 | },
108 | BaselinePosition -> Scaled[ 0.15 ],
109 | ImageSize -> 14
110 | ]
--------------------------------------------------------------------------------
/Source/Chatbook/PreferencesUtils.wl:
--------------------------------------------------------------------------------
1 | BeginPackage["Wolfram`Chatbook`PreferencesUtils`"]
2 |
3 | GeneralUtilities`SetUsage[PreferencesPane, "
4 | PreferencesPane[items$, resetButton$] returns a pane suitable for presentation
5 | as the main element of a Preferences window pane.
6 |
7 | resetButton$ should be a button that resets any preferences configurable by
8 | this pane back to their default values.
9 | "]
10 |
11 | GeneralUtilities`SetUsage[PreferencesSection, "
12 | PreferencesSection[label$, content$] returns a delimited section suitable for
13 | display in a Preferences window pane.
14 | "]
15 |
16 | GeneralUtilities`SetUsage[PreferencesResetButton, "
17 | PreferencesResetButton[action$] returns a button that resets items from the current
18 | Preferences panel back to their default values.
19 | "]
20 |
21 |
22 | Begin["`Private`"]
23 |
24 | (*====================================*)
25 |
26 | PreferencesPane[items_?ListQ, resetButton_] := Module[{
27 | grid
28 | },
29 | grid = Grid[
30 | Append[
31 | Map[item |-> {"", item}, items],
32 | {Spacer[20], Item[resetButton, ItemSize -> Fit]}
33 | ],
34 | ItemSize -> Automatic,
35 | Alignment -> Left,
36 | (* Show a horizontal divider at every position except before the first
37 | item and after the reset button. *)
38 | Dividers -> {False, {{{True}}, {1 -> False, -1 -> False}}},
39 | Spacings -> {0, {1.5, 1 -> 5}}
40 | ];
41 |
42 | grid = Style[grid, GridBoxOptions -> {BaseStyle -> "defaultGrid"}];
43 |
44 | Pane[grid, ImageMargins -> {{0, 0}, {0, 12.5}}]
45 | ]
46 |
47 | (*====================================*)
48 |
49 | SetAttributes[PreferencesResetButton, HoldFirst];
50 |
51 | PreferencesResetButton[
52 | action_,
53 | opts:OptionsPattern[Evaluator]
54 | ] := Module[{
55 | label
56 | },
57 | label = Grid[
58 | {{
59 | Style[
60 | Dynamic[
61 | RawBoxes @ FEPrivate`FrontEndResource[
62 | "FEBitmaps",
63 | "SyntaxColorResetIcon"
64 | ][RGBColor[0.3921, 0.3921, 0.3921]]
65 | ],
66 | GraphicsBoxOptions -> {BaselinePosition -> Scaled[0.1]}
67 | ],
68 | Dynamic[
69 | FEPrivate`FrontEndResource["PreferencesDialog", "ResetAllSettingsText"]
70 | ]
71 | }},
72 | Alignment -> {Automatic, Baseline}
73 | ];
74 |
75 | Button[
76 | label,
77 | action,
78 | BaseStyle -> {
79 | FontFamily -> Dynamic[FrontEnd`CurrentValue["ControlsFontFamily"]],
80 | FontSize -> Dynamic[FrontEnd`CurrentValue["ControlsFontSize"]],
81 | FontColor -> GrayLevel[0.]
82 | },
83 | ImageSize -> Automatic,
84 | opts
85 | ]
86 | ]
87 |
88 | (*====================================*)
89 |
90 | PreferencesSection[label_, content_] :=
91 | Column[{label, content}, Spacings -> {0, 0.7}]
92 |
93 | (*====================================*)
94 |
95 | End[]
96 |
97 | EndPackage[]
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Chatbook
2 |
3 | [](https://github.com/WolframResearch/Chatbook/actions/workflows/Build.yml) [](https://github.com/WolframResearch/Chatbook/actions/workflows/Release.yml)
4 |
5 | #### [Changelog](./docs/CHANGELOG.md)
6 |
7 |
8 | This repository contains *Chatbook*, a paclet adding support for LLM-powered
9 | notebooks to Wolfram.
10 |
11 |
12 | ## Getting Started
13 |
14 | To start using Chatbook, install this paclet by evaluating:
15 |
16 | ```
17 | PacletInstall[ResourceObject["Wolfram/Chatbook"]]
18 | ```
19 |
20 | which will install the
21 | [Wolfram/Chatbook](https://paclets.com/Wolfram/Chatbook/)
22 | paclet resource.
23 |
24 | Once installed, start using Chatbook by first creating an empty notebook,
25 | and then selecting the `Format > Stylesheet > Chatbook` menu item to change
26 | the notebook stylesheet.
27 |
28 | Create new chat input cells by either:
29 |
30 | * Selecting the `Format > Style > ChatUserInput` menu item.
31 |
32 | * Typing `'` when the cursor is in-between cells, or as the first character in
33 | an Input cell.
34 |
35 | ### Configuration
36 |
37 | Before you can perform chat queries, you must specify your OpenAI API key by
38 | performing the following evaluation:
39 |
40 | ```wolfram
41 | SystemCredential["OPENAI_API_KEY"] = ""
42 | ```
43 |
44 | where `` is a valid OpenAI API key.
45 |
46 | *Note: This credential is the same as that used by the
47 | [ChristopherWolfram/OpenAILink](https://paclets.com/ChristopherWolfram/OpenAILink) paclet*.
48 |
49 | ## Features
50 |
51 | ### Interact with ChatGPT:
52 |
53 | 
54 |
55 | ### Generate immediately evaluatable Wolfram code:
56 |
57 | 
58 |
59 | Wolfram code in the chat output can be evaluated in place immediately:
60 |
61 | 
62 |
63 |
68 |
69 | ## License
70 |
71 | Licensed under the MIT license ([LICENSE-MIT](./LICENSE-MIT) or )
72 |
73 | ## Contributing
74 |
75 | See [**Development.md**](./docs/Development.md) for instructions on how to
76 | perform common development tasks when contributing to this project.
77 |
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/InsertChatCellActive.wl:
--------------------------------------------------------------------------------
1 | (* Created with the Wolfram Language : www.wolfram.com *)
2 | Graphics[{Thickness[0.06617782981861016],
3 | Style[{FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
4 | {{{12.77199935913086, 1.7160000801086426}, {13.812999725341797,
5 | 1.7160000801086426}, {13.812999725341797, 8.301000595092773},
6 | {12.77199935913086, 8.301000595092773}, {12.77199935913086,
7 | 1.7160000801086426}}}]}, FaceForm[RGBColor[0.8274509803921568,
8 | 0.8745098039215686, 0.9019607843137255, 1.]]],
9 | Style[{FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
10 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
11 | {{{10.692900657653809, 10.008000373840332}, {10.692900657653809,
12 | 0.008000373840332031}, {15.11090087890625, 0.008000373840332031},
13 | {15.11090087890625, 0.9569997787475586}, {11.692900657653809,
14 | 0.9569997787475586}, {11.692900657653809, 9.008000373840332},
15 | {15.11090087890625, 9.008000373840332}, {15.11090087890625,
16 | 10.008000373840332}, {10.692900657653809, 10.008000373840332}}}]},
17 | FaceForm[RGBColor[1., 1., 1., 1.]]],
18 | Style[{FilledCurve[{{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
19 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}},
20 | {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
21 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
22 | {{{8.583999633789062, 9.}, {0.4459991455078125, 9.},
23 | {0.20099925994873047, 9.}, {0., 8.800999999046326},
24 | {0., 8.555999994277954}, {0., 2.443999767303467},
25 | {0., 2.1989998817443848}, {0.20099925994873047, 2.},
26 | {0.4459991455078125, 2.}, {2.0059995651245117, 2.},
27 | {2.0059995651245117, 0.}, {5.014999628067017, 2.},
28 | {8.583999633789062, 2.}, {8.829999640583992, 2.},
29 | {9.028999626636505, 2.1989998817443848}, {9.028999626636505,
30 | 2.443999767303467}, {9.028999626636505, 8.555999994277954},
31 | {9.028999626636505, 8.800999999046326}, {8.829999640583992, 9.},
32 | {8.583999633789062, 9.}}, {{8.028999626636505, 8.},
33 | {8.028999626636505, 3.}, {5.014999628067017, 3.},
34 | {4.7129998207092285, 3.}, {4.460999965667725, 2.8330001831054688},
35 | {3.0059995651245117, 1.864999771118164}, {3.0059995651245117, 2.},
36 | {3.0059995651245117, 3.}, {2.0059995651245117, 3.},
37 | {0.9999995231628418, 3.}, {0.9999995231628418, 8.},
38 | {8.028999626636505, 8.}}}]}, FaceForm[RGBColor[1., 1., 1., 1.]]]},
39 | ImageSize -> {17., 12.}, PlotRange -> {{-0.5, 15.610800743103027},
40 | {-0.5, 10.508200645446777}}, AspectRatio -> Automatic, BaselinePosition -> (Center -> Center)]
41 |
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/InsertChatCell.wl:
--------------------------------------------------------------------------------
1 | (* Created with the Wolfram Language : www.wolfram.com *)
2 | Graphics[{Thickness[0.06617782981861016],
3 | Style[{FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
4 | {{{12.77199935913086, 1.7160000801086426}, {13.812999725341797,
5 | 1.7160000801086426}, {13.812999725341797, 8.301000595092773},
6 | {12.77199935913086, 8.301000595092773}, {12.77199935913086,
7 | 1.7160000801086426}}}]}, FaceForm[color @ "NA_CloudToolbarIconInsertChatCell_1"]],
8 | Style[{FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
9 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
10 | {{{10.692900657653809, 10.008000373840332}, {10.692900657653809,
11 | 0.008000373840332031}, {15.11090087890625, 0.008000373840332031},
12 | {15.11090087890625, 0.9569997787475586}, {11.692900657653809,
13 | 0.9569997787475586}, {11.692900657653809, 9.008000373840332},
14 | {15.11090087890625, 9.008000373840332}, {15.11090087890625,
15 | 10.008000373840332}, {10.692900657653809, 10.008000373840332}}}]},
16 | FaceForm[color @ "NA_CloudToolbarIconInsertChatCell_2"]],
17 | Style[{FilledCurve[{{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
18 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}},
19 | {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
20 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
21 | {{{8.583999633789062, 9.}, {0.4459991455078125, 9.},
22 | {0.20099925994873047, 9.}, {0., 8.800999999046326},
23 | {0., 8.555999994277954}, {0., 2.443999767303467},
24 | {0., 2.1989998817443848}, {0.20099925994873047, 2.},
25 | {0.4459991455078125, 2.}, {2.0059995651245117, 2.},
26 | {2.0059995651245117, 0.}, {5.014999628067017, 2.},
27 | {8.583999633789062, 2.}, {8.829999640583992, 2.},
28 | {9.028999626636505, 2.1989998817443848}, {9.028999626636505,
29 | 2.443999767303467}, {9.028999626636505, 8.555999994277954},
30 | {9.028999626636505, 8.800999999046326}, {8.829999640583992, 9.},
31 | {8.583999633789062, 9.}}, {{8.028999626636505, 8.},
32 | {8.028999626636505, 3.}, {5.014999628067017, 3.},
33 | {4.7129998207092285, 3.}, {4.460999965667725, 2.8330001831054688},
34 | {3.0059995651245117, 1.864999771118164}, {3.0059995651245117, 2.},
35 | {3.0059995651245117, 3.}, {2.0059995651245117, 3.},
36 | {0.9999995231628418, 3.}, {0.9999995231628418, 8.},
37 | {8.028999626636505, 8.}}}]}, FaceForm[color @ "NA_CloudToolbarIconInsertChatCell_2"]]},
38 | ImageSize -> {17., 12.},
39 | PlotRange -> {{-0.5, 15.610800743103027}, {-0.5, 10.508200645446777}},
40 | AspectRatio -> Automatic, BaselinePosition -> (Center -> Center)]
41 |
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/ThumbsDownInactive.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.0625], {color @ "ThumbsUpDownIcon", Thickness[0.061313], Opacity[1.],
2 | CapForm["Butt"], JoinForm["Round"],
3 | JoinedCurve[{{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
4 | {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}},
5 | {{{11.34, 6.4263}, {13.59, 6.4263}, {14.073, 6.4263}, {14.467, 6.8253},
6 | {14.469, 7.3163}, {14.496, 13.675}, {14.498, 14.166}, {14.108, 14.565},
7 | {13.625, 14.565}, {11.375, 14.565}, {10.892, 14.565}, {10.498, 14.166},
8 | {10.496, 13.675}, {10.469, 7.3163}, {10.467, 6.8253}, {10.857, 6.4263},
9 | {11.34, 6.4263}}}, CurveClosed -> {1}]},
10 | {color @ "ThumbsUpDownIcon", Thickness[0.061313], Opacity[1.], CapForm["Butt"],
11 | JoinForm[{"Miter", 1.}], JoinedCurve[{{{1, 4, 3}, {0, 1, 0}, {1, 3, 3},
12 | {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3},
13 | {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3},
14 | {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}},
15 | {{{1.328, 9.4784}, {1.326, 8.9164}, {1.771, 8.4614}, {2.324, 8.4614},
16 | {2.215, 8.4614}, {1.663, 8.4614}, {1.137, 8.0054}, {1.134, 7.4434}, {1.132,
17 | 6.8814}, {1.577, 6.4264}, {2.13, 6.4264}, {6.501, 6.4264}, {6.799, 6.4264},
18 | {7.015, 6.1404}, {6.924, 5.8564}, {6.769, 5.3744}, {6.586, 4.6354}, {6.582,
19 | 3.8384}, {6.576, 2.4564}, {7.321, 1.5004}, {7.988, 1.5004}, {8.576,
20 | 1.5004}, {8.723, 2.2414}, {8.723, 3.1094}, {8.723, 4.1864}, {9.414,
21 | 4.5744}, {9.946, 5.3084}, {10.478, 6.0434}, {10.465, 6.4264}, {10.47,
22 | 7.4434}, {10.496, 13.565}, {10.498, 14.116}, {10.052, 14.565}, {9.5,
23 | 14.565}, {3.746, 14.565}, {3.193, 14.565}, {2.744, 14.109}, {2.741,
24 | 13.547}, {2.739, 12.986}, {2.953, 12.53}, {3.506, 12.53}, {3.006, 12.53},
25 | {2.453, 12.53}, {2.004, 12.075}, {2.001, 11.513}, {1.999, 10.951}, {2.445,
26 | 10.495}, {2.997, 10.495}, {2.332, 10.495}, {1.78, 10.495}, {1.33, 10.04},
27 | {1.328, 9.4784}}}, CurveClosed -> {1}]},
28 | {color @ "ThumbsUpDownIcon", Thickness[0.062188], Opacity[1.], CapForm["Butt"],
29 | JoinForm[{"Miter", 1.}], JoinedCurve[{{{0, 2, 0}}},
30 | {{{2.3237, 8.461}, {4.3237, 8.461}}}, CurveClosed -> {0}]},
31 | {color @ "ThumbsUpDownIcon", Thickness[0.062188], Opacity[1.], CapForm["Butt"],
32 | JoinForm[{"Miter", 1.}], JoinedCurve[{{{0, 2, 0}}},
33 | {{{2.8741, 10.496}, {4.6661, 10.496}}}, CurveClosed -> {0}]},
34 | {color @ "ThumbsUpDownIcon", Thickness[0.062188], Opacity[1.], CapForm["Butt"],
35 | JoinForm[{"Miter", 1.}], JoinedCurve[{{{0, 2, 0}}},
36 | {{{3.2369, 12.53}, {5.0289, 12.53}}}, CurveClosed -> {0}]}},
37 | AspectRatio -> Automatic, ImageSize -> {17., 17.},
38 | PlotRange -> {{-0.5, 16.5}, {-0.5, 16.5}}]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/WorkspaceChat/HistoryMenu/WorkspaceHistoryPreviousPage.wl:
--------------------------------------------------------------------------------
1 | (* Created with the Wolfram Language : www.wolfram.com *)
2 | RawBoxes @ ToBoxes @ Mouseover[Graphics[{Thickness[0.01150848701747978],
3 | color @ "NA_OverlayMenuHistoryPaginationIcon",
4 | FilledCurve[{{{1, 4, 3}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0,
5 | 1, 0}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}}}, {{{61.80509948730469,
6 | 3.213900089263916}, {60.27009952068329, 3.213900089263916},
7 | {58.73409962654114, 3.7999000549316406}, {57.56309986114502,
8 | 4.971900105476379}, {19.087100982666016, 43.44589853286743},
9 | {57.56309986114502, 81.92190027236938}, {59.905099391937256,
10 | 84.26390314102173}, {63.70509958267212, 84.26390314102173},
11 | {66.04709911346436, 81.92190027236938}, {68.39109945297241,
12 | 79.57789850234985}, {68.39109945297241, 75.77889490127563},
13 | {66.04709911346436, 73.4358925819397}, {36.05809783935547,
14 | 43.44589853286743}, {66.04709911346436, 13.455899715423584},
15 | {68.39109945297241, 11.112900257110596}, {68.39109945297241,
16 | 7.314899921417236}, {66.04709911346436, 4.971900105476379},
17 | {64.87609934806824, 3.7999000549316406}, {63.340099453926086,
18 | 3.213900089263916}, {61.80509948730469, 3.213900089263916}}}]},
19 | AspectRatio -> Automatic, ImageSize -> 10,
20 | BaselinePosition -> (Center -> Center),
21 | PlotRange -> {{0., 86.89239501953125}, {0., 86.89239501953125}}],
22 | Graphics[{Thickness[0.01150848701747978],
23 | color @ "NA_OverlayMenuIcon_Blue",
24 | FilledCurve[{{{1, 4, 3}, {0, 1,
25 | 0}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {1,
26 | 3, 3}}}, {{{61.80509948730469, 3.213900089263916}, {60.27009952068329,
27 | 3.213900089263916}, {58.73409962654114, 3.7999000549316406},
28 | {57.56309986114502, 4.971900105476379}, {19.087100982666016,
29 | 43.44589853286743}, {57.56309986114502, 81.92190027236938},
30 | {59.905099391937256, 84.26390314102173}, {63.70509958267212,
31 | 84.26390314102173}, {66.04709911346436, 81.92190027236938},
32 | {68.39109945297241, 79.57789850234985}, {68.39109945297241,
33 | 75.77889490127563}, {66.04709911346436, 73.4358925819397},
34 | {36.05809783935547, 43.44589853286743}, {66.04709911346436,
35 | 13.455899715423584}, {68.39109945297241, 11.112900257110596},
36 | {68.39109945297241, 7.314899921417236}, {66.04709911346436,
37 | 4.971900105476379}, {64.87609934806824, 3.7999000549316406},
38 | {63.340099453926086, 3.213900089263916}, {61.80509948730469,
39 | 3.213900089263916}}}]}, AspectRatio -> Automatic,
40 | ImageSize -> 10,
41 | BaselinePosition -> (Center -> Center),
42 | PlotRange -> {{0., 86.89239501953125}, {0.,
43 | 86.89239501953125}}],
44 | BaselinePosition -> Baseline]
45 |
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/ThumbsUpInactive.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.0625], {color @ "ThumbsUpDownIcon", Thickness[0.061313], Opacity[1.],
2 | CapForm["Butt"], JoinForm["Round"],
3 | JoinedCurve[{{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
4 | {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}}, {{{4.6599, 9.5738}, {2.4099, 9.5738},
5 | {1.9269, 9.5738}, {1.5329, 9.1748}, {1.5309, 8.6838}, {1.5039, 2.3248},
6 | {1.5019, 1.8338}, {1.8919, 1.4348}, {2.3749, 1.4348}, {4.6249, 1.4348},
7 | {5.1079, 1.4348}, {5.5019, 1.8338}, {5.5039, 2.3248}, {5.5309, 8.6838},
8 | {5.5329, 9.1748}, {5.1429, 9.5738}, {4.6599, 9.5738}}},
9 | CurveClosed -> {1}]}, {color @ "ThumbsUpDownIcon", Thickness[0.061313], Opacity[1.],
10 | CapForm["Butt"], JoinForm[{"Miter", 1.}],
11 | JoinedCurve[{{{1, 4, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0},
12 | {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3},
13 | {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0},
14 | {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}}, {{{14.672, 6.5216},
15 | {14.674, 7.0836}, {14.229, 7.5386}, {13.676, 7.5386}, {13.785, 7.5386},
16 | {14.337, 7.5386}, {14.863, 7.9946}, {14.866, 8.5566}, {14.868, 9.1186},
17 | {14.423, 9.5736}, {13.87, 9.5736}, {9.499, 9.5736}, {9.201, 9.5736},
18 | {8.985, 9.8596}, {9.076, 10.144}, {9.231, 10.626}, {9.414, 11.365}, {9.418,
19 | 12.162}, {9.424, 13.544}, {8.679, 14.5}, {8.012, 14.5}, {7.424, 14.5},
20 | {7.277, 13.759}, {7.277, 12.892}, {7.277, 11.814}, {6.586, 11.426}, {6.054,
21 | 10.692}, {5.522, 9.9566}, {5.535, 9.5736}, {5.53, 8.5566}, {5.504, 2.4346},
22 | {5.502, 1.8836}, {5.948, 1.4346}, {6.5, 1.4346}, {12.254, 1.4346}, {12.807,
23 | 1.4346}, {13.256, 1.8906}, {13.259, 2.4526}, {13.261, 3.0136}, {13.047,
24 | 3.4696}, {12.494, 3.4696}, {12.994, 3.4696}, {13.547, 3.4696}, {13.996,
25 | 3.9246}, {13.999, 4.4866}, {14.001, 5.0486}, {13.555, 5.5046}, {13.003,
26 | 5.5046}, {13.668, 5.5046}, {14.22, 5.5046}, {14.67, 5.9596}, {14.672,
27 | 6.5216}}}, CurveClosed -> {1}]}, {color @ "ThumbsUpDownIcon", Thickness[0.062188],
28 | Opacity[1.], CapForm["Butt"], JoinForm[{"Miter", 1.}],
29 | JoinedCurve[{{{0, 2, 0}}}, {{{13.676, 7.539}, {11.676, 7.539}}},
30 | CurveClosed -> {0}]}, {color @ "ThumbsUpDownIcon", Thickness[0.062188], Opacity[1.],
31 | CapForm["Butt"], JoinForm[{"Miter", 1.}], JoinedCurve[{{{0, 2, 0}}},
32 | {{{13.126, 5.5043}, {11.334, 5.5043}}}, CurveClosed -> {0}]},
33 | {color @ "ThumbsUpDownIcon", Thickness[0.062188], Opacity[1.], CapForm["Butt"],
34 | JoinForm[{"Miter", 1.}], JoinedCurve[{{{0, 2, 0}}},
35 | {{{12.763, 3.4695}, {10.971, 3.4695}}}, CurveClosed -> {0}]}},
36 | AspectRatio -> Automatic, ImageSize -> {17., 17.},
37 | PlotRange -> {{-0.5, 16.5}, {-0.5, 16.5}}]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/ThumbsDownActive.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.0625], {color @ "ThumbsUpDownIconHover", Thickness[0.061313], Opacity[1.],
2 | CapForm["Butt"], JoinForm["Round"],
3 | JoinedCurve[{{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
4 | {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}},
5 | {{{11.34, 6.4263}, {13.59, 6.4263}, {14.073, 6.4263}, {14.467, 6.8253},
6 | {14.469, 7.3163}, {14.496, 13.675}, {14.498, 14.166}, {14.108, 14.565},
7 | {13.625, 14.565}, {11.375, 14.565}, {10.892, 14.565}, {10.498, 14.166},
8 | {10.496, 13.675}, {10.469, 7.3163}, {10.467, 6.8253}, {10.857, 6.4263},
9 | {11.34, 6.4263}}}, CurveClosed -> {1}]},
10 | {color @ "ThumbsUpDownIconHover", Thickness[0.061313], Opacity[1.], CapForm["Butt"],
11 | JoinForm[{"Miter", 1.}], JoinedCurve[{{{1, 4, 3}, {0, 1, 0}, {1, 3, 3},
12 | {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3},
13 | {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3},
14 | {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}},
15 | {{{1.328, 9.4784}, {1.326, 8.9164}, {1.771, 8.4614}, {2.324, 8.4614},
16 | {2.215, 8.4614}, {1.663, 8.4614}, {1.137, 8.0054}, {1.134, 7.4434}, {1.132,
17 | 6.8814}, {1.577, 6.4264}, {2.13, 6.4264}, {6.501, 6.4264}, {6.799, 6.4264},
18 | {7.015, 6.1404}, {6.924, 5.8564}, {6.769, 5.3744}, {6.586, 4.6354}, {6.582,
19 | 3.8384}, {6.576, 2.4564}, {7.321, 1.5004}, {7.988, 1.5004}, {8.576,
20 | 1.5004}, {8.723, 2.2414}, {8.723, 3.1094}, {8.723, 4.1864}, {9.414,
21 | 4.5744}, {9.946, 5.3084}, {10.478, 6.0434}, {10.465, 6.4264}, {10.47,
22 | 7.4434}, {10.496, 13.565}, {10.498, 14.116}, {10.052, 14.565}, {9.5,
23 | 14.565}, {3.746, 14.565}, {3.193, 14.565}, {2.744, 14.109}, {2.741,
24 | 13.547}, {2.739, 12.986}, {2.953, 12.53}, {3.506, 12.53}, {3.006, 12.53},
25 | {2.453, 12.53}, {2.004, 12.075}, {2.001, 11.513}, {1.999, 10.951}, {2.445,
26 | 10.495}, {2.997, 10.495}, {2.332, 10.495}, {1.78, 10.495}, {1.33, 10.04},
27 | {1.328, 9.4784}}}, CurveClosed -> {1}]},
28 | {color @ "ThumbsUpDownIconHover", Thickness[0.062188], Opacity[1.], CapForm["Butt"],
29 | JoinForm[{"Miter", 1.}], JoinedCurve[{{{0, 2, 0}}},
30 | {{{2.3237, 8.461}, {4.3237, 8.461}}}, CurveClosed -> {0}]},
31 | {color @ "ThumbsUpDownIconHover", Thickness[0.062188], Opacity[1.], CapForm["Butt"],
32 | JoinForm[{"Miter", 1.}], JoinedCurve[{{{0, 2, 0}}},
33 | {{{2.8741, 10.496}, {4.6661, 10.496}}}, CurveClosed -> {0}]},
34 | {color @ "ThumbsUpDownIconHover", Thickness[0.062188], Opacity[1.], CapForm["Butt"],
35 | JoinForm[{"Miter", 1.}], JoinedCurve[{{{0, 2, 0}}},
36 | {{{3.2369, 12.53}, {5.0289, 12.53}}}, CurveClosed -> {0}]}},
37 | AspectRatio -> Automatic, ImageSize -> {17., 17.},
38 | PlotRange -> {{-0.5, 16.5}, {-0.5, 16.5}}]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/Common/ThumbsUpActive.wl:
--------------------------------------------------------------------------------
1 | Graphics[{Thickness[0.0625], {color @ "ThumbsUpDownIconHover", Thickness[0.061313], Opacity[1.],
2 | CapForm["Butt"], JoinForm["Round"],
3 | JoinedCurve[{{{0, 2, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
4 | {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}}, {{{4.6599, 9.5738}, {2.4099, 9.5738},
5 | {1.9269, 9.5738}, {1.5329, 9.1748}, {1.5309, 8.6838}, {1.5039, 2.3248},
6 | {1.5019, 1.8338}, {1.8919, 1.4348}, {2.3749, 1.4348}, {4.6249, 1.4348},
7 | {5.1079, 1.4348}, {5.5019, 1.8338}, {5.5039, 2.3248}, {5.5309, 8.6838},
8 | {5.5329, 9.1748}, {5.1429, 9.5738}, {4.6599, 9.5738}}},
9 | CurveClosed -> {1}]}, {color @ "ThumbsUpDownIconHover", Thickness[0.061313], Opacity[1.],
10 | CapForm["Butt"], JoinForm[{"Miter", 1.}],
11 | JoinedCurve[{{{1, 4, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0},
12 | {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3}, {1, 3, 3},
13 | {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0},
14 | {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {1, 3, 3}}}, {{{14.672, 6.5216},
15 | {14.674, 7.0836}, {14.229, 7.5386}, {13.676, 7.5386}, {13.785, 7.5386},
16 | {14.337, 7.5386}, {14.863, 7.9946}, {14.866, 8.5566}, {14.868, 9.1186},
17 | {14.423, 9.5736}, {13.87, 9.5736}, {9.499, 9.5736}, {9.201, 9.5736},
18 | {8.985, 9.8596}, {9.076, 10.144}, {9.231, 10.626}, {9.414, 11.365}, {9.418,
19 | 12.162}, {9.424, 13.544}, {8.679, 14.5}, {8.012, 14.5}, {7.424, 14.5},
20 | {7.277, 13.759}, {7.277, 12.892}, {7.277, 11.814}, {6.586, 11.426}, {6.054,
21 | 10.692}, {5.522, 9.9566}, {5.535, 9.5736}, {5.53, 8.5566}, {5.504, 2.4346},
22 | {5.502, 1.8836}, {5.948, 1.4346}, {6.5, 1.4346}, {12.254, 1.4346}, {12.807,
23 | 1.4346}, {13.256, 1.8906}, {13.259, 2.4526}, {13.261, 3.0136}, {13.047,
24 | 3.4696}, {12.494, 3.4696}, {12.994, 3.4696}, {13.547, 3.4696}, {13.996,
25 | 3.9246}, {13.999, 4.4866}, {14.001, 5.0486}, {13.555, 5.5046}, {13.003,
26 | 5.5046}, {13.668, 5.5046}, {14.22, 5.5046}, {14.67, 5.9596}, {14.672,
27 | 6.5216}}}, CurveClosed -> {1}]}, {color @ "ThumbsUpDownIconHover", Thickness[0.062188],
28 | Opacity[1.], CapForm["Butt"], JoinForm[{"Miter", 1.}],
29 | JoinedCurve[{{{0, 2, 0}}}, {{{13.676, 7.539}, {11.676, 7.539}}},
30 | CurveClosed -> {0}]}, {color @ "ThumbsUpDownIconHover", Thickness[0.062188], Opacity[1.],
31 | CapForm["Butt"], JoinForm[{"Miter", 1.}], JoinedCurve[{{{0, 2, 0}}},
32 | {{{13.126, 5.5043}, {11.334, 5.5043}}}, CurveClosed -> {0}]},
33 | {color @ "ThumbsUpDownIconHover", Thickness[0.062188], Opacity[1.], CapForm["Butt"],
34 | JoinForm[{"Miter", 1.}], JoinedCurve[{{{0, 2, 0}}},
35 | {{{12.763, 3.4695}, {10.971, 3.4695}}}, CurveClosed -> {0}]}},
36 | AspectRatio -> Automatic, ImageSize -> {17., 17.},
37 | PlotRange -> {{-0.5, 16.5}, {-0.5, 16.5}}]
--------------------------------------------------------------------------------
/Scripts/BuildPaclet.wls:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env wolframscript
2 |
3 | BeginPackage[ "Wolfram`ChatbookScripts`" ];
4 |
5 | (* ::**************************************************************************************************************:: *)
6 | (* ::Section::Closed:: *)
7 | (*Initialization*)
8 | If[ ! TrueQ @ $loadedDefinitions, Get @ FileNameJoin @ { DirectoryName @ $InputFileName, "Common.wl" } ];
9 | If[ ! StringQ @ Environment[ "GITHUB_ACTIONS" ], System`$PublisherID = "Wolfram" ];
10 |
11 | (* ::**************************************************************************************************************:: *)
12 | (* ::Subsection::Closed:: *)
13 | (*Arguments*)
14 | $check = getBooleanArgument[ { "c", "check" }, True ];
15 | $install = getBooleanArgument[ { "i", "install" }, False ];
16 | $mx = getBooleanArgument[ { "m", "mx" }, True ];
17 | $unformat = getBooleanArgument[ { "u", "unformat" }, True ];
18 |
19 | (* ::**************************************************************************************************************:: *)
20 | (* ::Subsection::Closed:: *)
21 | (*Optional Dependencies*)
22 | If[ $unformat, Get @ cFile @ FileNameJoin @ { $scriptDir, "UnformatFiles.wls" } ];
23 | If[ $mx , Get @ cFile @ FileNameJoin @ { $scriptDir, "BuildMX.wls" } ];
24 | If[ $check , Get @ cFile @ FileNameJoin @ { $scriptDir, "Resources", "CodeInspectorRules.wl" } ];
25 |
26 | (* ::**************************************************************************************************************:: *)
27 | (* ::Subsection::Closed:: *)
28 | (*Other*)
29 | Needs[ "Wolfram`PacletCICD`" -> "cicd`" ];
30 |
31 | (* ::**************************************************************************************************************:: *)
32 | (* ::Section::Closed:: *)
33 | (*Run*)
34 |
35 | (* ::**************************************************************************************************************:: *)
36 | (* ::Subsection::Closed:: *)
37 | (*Build*)
38 | result = checkResult @ cicd`BuildPaclet[
39 | $defNB,
40 | "Check" -> $check,
41 | "ExitOnFail" -> True,
42 | "Target" -> "Submit"
43 | ];
44 |
45 | (* ::**************************************************************************************************************:: *)
46 | (* ::Subsection::Closed:: *)
47 | (*Install*)
48 | If[ $install,
49 | archive = cFile @ result[ "PacletArchive" ];
50 | cicd`ConsoleNotice @ SequenceForm[ "Installing paclet file: ", archive ];
51 | installed = cicd`ScriptConfirmBy[ PacletInstall[ archive, ForceVersionInstall -> True ], PacletObjectQ ];
52 | cicd`ConsoleNotice @ SequenceForm[ "Installed paclet: ", cDir @ installed[ "Location" ] ];
53 | ];
54 |
55 | (* ::**************************************************************************************************************:: *)
56 | (* ::Section::Closed:: *)
57 | (*Package Footer*)
58 | EndPackage[ ];
59 |
60 | Wolfram`ChatbookScripts`result
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/WorkspaceChat/HistoryMenu/WorkspaceHistoryNextPage.wl:
--------------------------------------------------------------------------------
1 | (* Created with the Wolfram Language : www.wolfram.com *)
2 | RawBoxes @ ToBoxes @ Mouseover[Graphics[GeometricTransformation[{Thickness[0.01150848701747978],
3 | color @ "NA_OverlayMenuHistoryPaginationIcon",
4 | FilledCurve[{{{1, 4, 3}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}, {0,
5 | 1, 0}, {0, 1, 0}, {1, 3, 3}, {1, 3, 3}}}, {{{61.80509948730469,
6 | 3.213900089263916}, {60.27009952068329, 3.213900089263916},
7 | {58.73409962654114, 3.7999000549316406}, {57.56309986114502,
8 | 4.971900105476379}, {19.087100982666016, 43.44589853286743},
9 | {57.56309986114502, 81.92190027236938}, {59.905099391937256,
10 | 84.26390314102173}, {63.70509958267212, 84.26390314102173},
11 | {66.04709911346436, 81.92190027236938}, {68.39109945297241,
12 | 79.57789850234985}, {68.39109945297241, 75.77889490127563},
13 | {66.04709911346436, 73.4358925819397}, {36.05809783935547,
14 | 43.44589853286743}, {66.04709911346436, 13.455899715423584},
15 | {68.39109945297241, 11.112900257110596}, {68.39109945297241,
16 | 7.314899921417236}, {66.04709911346436, 4.971900105476379},
17 | {64.87609934806824, 3.7999000549316406}, {63.340099453926086,
18 | 3.213900089263916}, {61.80509948730469, 3.213900089263916}}}]},
19 | {{{-1, 0}, {0, -1}}, Center}], AspectRatio -> Automatic,
20 | ImageSize -> 10,
21 | BaselinePosition -> (Center -> Center),
22 | PlotRange -> {{0., 86.89239501953125}, {0.,
23 | 86.89239501953125}}], Graphics[GeometricTransformation[
24 | {Thickness[0.01150848701747978],
25 | color @ "NA_OverlayMenuIcon_Blue",
26 | FilledCurve[{{{1, 4, 3}, {0, 1, 0}, {0,
27 | 1, 0}, {1, 3, 3}, {1, 3, 3}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {1, 3,
28 | 3}}}, {{{61.80509948730469, 3.213900089263916}, {60.27009952068329,
29 | 3.213900089263916}, {58.73409962654114, 3.7999000549316406},
30 | {57.56309986114502, 4.971900105476379}, {19.087100982666016,
31 | 43.44589853286743}, {57.56309986114502, 81.92190027236938},
32 | {59.905099391937256, 84.26390314102173}, {63.70509958267212,
33 | 84.26390314102173}, {66.04709911346436, 81.92190027236938},
34 | {68.39109945297241, 79.57789850234985}, {68.39109945297241,
35 | 75.77889490127563}, {66.04709911346436, 73.4358925819397},
36 | {36.05809783935547, 43.44589853286743}, {66.04709911346436,
37 | 13.455899715423584}, {68.39109945297241, 11.112900257110596},
38 | {68.39109945297241, 7.314899921417236}, {66.04709911346436,
39 | 4.971900105476379}, {64.87609934806824, 3.7999000549316406},
40 | {63.340099453926086, 3.213900089263916}, {61.80509948730469,
41 | 3.213900089263916}}}]}, {{{-1, 0}, {0, -1}}, Center}],
42 | AspectRatio -> Automatic, ImageSize -> 10,
43 | BaselinePosition -> (Center -> Center),
44 | PlotRange -> {{0., 86.89239501953125}, {0., 86.89239501953125}}],
45 | BaselinePosition -> Baseline]
46 |
--------------------------------------------------------------------------------
/Scripts/IncrementPacletVersion.wls:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env wolframscript
2 |
3 | BeginPackage[ "Wolfram`ChatbookScripts`" ];
4 |
5 | If[ ! TrueQ @ $loadedDefinitions, Get @ FileNameJoin @ { DirectoryName @ $InputFileName, "Common.wl" } ];
6 |
7 | Needs[ "Wolfram`PacletCICD`" -> "cicd`" ];
8 |
9 | (* ::**************************************************************************************************************:: *)
10 | (* ::Section::Closed:: *)
11 | (*Definitions*)
12 |
13 | (* ::**************************************************************************************************************:: *)
14 | (* ::Subsection::Closed:: *)
15 | (*incrementPacletVersion*)
16 | (* :!CodeAnalysis::BeginBlock:: *)
17 | (* :!CodeAnalysis::Disable::SuspiciousSessionSymbol:: *)
18 | (* :!CodeAnalysis::Disable::LeakedVariable:: *)
19 | incrementPacletVersion[ dir_ ] := Enclose[
20 | Catch @ Module[
21 | { cs, file, string, version, newVersion, new },
22 |
23 | cs = ConfirmBy[ #1, StringQ, #2 ] &;
24 | file = cs[ FileNameJoin @ { dir, "PacletInfo.wl" }, "PacletInfo" ];
25 | string = cs[ ReadString @ file, "ReadString" ];
26 | version = cs[ PacletObject[ Flatten @ File @ dir ][ "Version" ], "Version" ];
27 |
28 | If[ StringEndsQ[ version, "." ~~ "0".. ~~ EndOfString ],
29 | Print[ "Skipping paclet version update: ", version ];
30 | Throw @ version
31 | ];
32 |
33 | newVersion = cs[
34 | StringReplace[
35 | version,
36 | "." ~~ v: DigitCharacter.. ~~ EndOfString :> "." <> ToString[ ToExpression @ v + 1 ]
37 | ],
38 | "NewVersion"
39 | ];
40 |
41 | ConfirmAssert[ PacletNewerQ[ newVersion, version ], "PacletNewerQ" ];
42 |
43 | new = cs[
44 | StringReplace[
45 | string,
46 | pre: ("\"Version\"" ~~ $$ws ~~ "->" ~~ $$ws) ~~ "\"" ~~ version ~~ "\"" :>
47 | pre <> "\"" <> newVersion <> "\""
48 | ],
49 | "UpdatedPacletInfo"
50 | ];
51 |
52 | Print[ "Incrementing version: ", version, " -> ", newVersion ];
53 | Confirm[ WithCleanup[ BinaryWrite[ file, new ], Close @ file ], "WritePacletInfo" ];
54 |
55 | ConfirmMatch[
56 | PacletObject[ Flatten @ File @ dir ][ "Version" ],
57 | newVersion,
58 | "PacletObject"
59 | ]
60 | ],
61 | Function[
62 | Print[ "::error::Failed to increment paclet version." ];
63 | Print[ " ", ToString[ #, InputForm ] ];
64 | If[ StringQ @ Environment[ "GITHUB_ACTION" ], Exit[ 1 ] ]
65 | ]
66 | ];
67 | (* :!CodeAnalysis::EndBlock:: *)
68 |
69 | (* ::**************************************************************************************************************:: *)
70 | (* ::Section::Closed:: *)
71 | (*Run*)
72 | result = cicd`ScriptConfirmBy[ incrementPacletVersion @ $pacletDir, StringQ ];
73 |
74 | EndPackage[ ];
75 |
76 | Wolfram`ChatbookScripts`result
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/SideBarChat/SidebarIconHide.wl:
--------------------------------------------------------------------------------
1 | Function[Evaluate @ ToBoxes @
2 | Graphics[
3 | {
4 | Thickness @ 0.125,
5 | FaceForm @ {#, Opacity @ 1.},
6 | FilledCurve[
7 | {
8 | {
9 | {1, 4, 3},
10 | {1, 3, 3},
11 | {1, 3, 3},
12 | {0, 1, 0},
13 | {0, 1, 0},
14 | {1, 3, 3},
15 | {1, 3, 3},
16 | {1, 3, 3},
17 | {0, 1, 0},
18 | {0, 1, 0},
19 | {1, 3, 3},
20 | {1, 3, 3},
21 | {0, 1, 0},
22 | {0, 1, 0},
23 | {1, 3, 3},
24 | {1, 3, 3},
25 | {0, 1, 0},
26 | {0, 1, 0}
27 | }
28 | },
29 | {
30 | {
31 | {7.549299716949463, 1.1576999425888062},
32 | {7.7442997097969055, 0.9626999497413635},
33 | {7.7442997097969055, 0.6456999778747559},
34 | {7.549299716949463, 0.45069992542266846},
35 | {7.451299719512463, 0.3526999354362488},
36 | {7.3232997208833694, 0.30369991064071655},
37 | {7.195299685001373, 0.30369991064071655},
38 | {7.06829971075058, 0.30369991064071655},
39 | {6.940299689769745, 0.3526999354362488},
40 | {6.842299699783325, 0.45069992542266846},
41 | {4.000299692153931, 3.292699933052063},
42 | {1.157299518585205, 0.45069992542266846},
43 | {1.0602998733520508, 0.3526999354362488},
44 | {0.9322996139526367, 0.30369991064071655},
45 | {0.8042998313903809, 0.30369991064071655},
46 | {0.6762995719909668, 0.30369991064071655},
47 | {0.5482997894287109, 0.3526999354362488},
48 | {0.4502997398376465, 0.45069992542266846},
49 | {0.25529956817626953, 0.6456999778747559},
50 | {0.25529956817626953, 0.9626999497413635},
51 | {0.4502997398376465, 1.1576999425888062},
52 | {3.293299674987793, 3.9996999502182007},
53 | {0.4502997398376465, 6.842699885368347},
54 | {0.25529956817626953, 7.037700057029724},
55 | {0.25529956817626953, 7.353700041770935},
56 | {0.4502997398376465, 7.549700140953064},
57 | {0.6462998390197754, 7.744699835777283},
58 | {0.9622998237609863, 7.744699835777283},
59 | {1.157299518585205, 7.549700140953064},
60 | {4.000299692153931, 4.706699967384338},
61 | {6.842299699783325, 7.549700140953064},
62 | {7.037299752235413, 7.744699835777283},
63 | {7.35429972410202, 7.744699835777283},
64 | {7.549299716949463, 7.549700140953064},
65 | {7.7442997097969055, 7.353700041770935},
66 | {7.7442997097969055, 7.037700057029724},
67 | {7.549299716949463, 6.842699885368347},
68 | {4.707299709320068, 3.9996999502182007},
69 | {7.549299716949463, 1.1576999425888062}
70 | }
71 | }
72 | ]
73 | },
74 | AspectRatio -> Automatic,
75 | BaselinePosition -> (Center -> Center),
76 | ImageSize -> {9., 9.},
77 | PlotRange -> {{-0.5, 8.5}, {-0.5, 8.5}}
78 | ]
79 | ]
--------------------------------------------------------------------------------
/PacletInfo.wl:
--------------------------------------------------------------------------------
1 | PacletObject[ <|
2 | "Name" -> "Wolfram/Chatbook",
3 | "PublisherID" -> "Wolfram",
4 | "Version" -> "2.5.25",
5 | "WolframVersion" -> "14.2+",
6 | "Description" -> "Wolfram Notebooks + LLMs",
7 | "License" -> "MIT",
8 | "Creator" -> "Connor Gray, Theodore Gray, Richard Hennigan, Kevin Daily",
9 | "Icon" -> "Assets/Images/PacletIcon.png",
10 | "ReleaseID" -> "$RELEASE_ID$",
11 | "ReleaseDate" -> "$RELEASE_DATE$",
12 | "ReleaseURL" -> "$RELEASE_URL$",
13 | "ActionURL" -> "$ACTION_URL$",
14 | "CommitURL" -> "$COMMIT_URL$",
15 | "Loading" -> "Startup",
16 | "PrimaryContext" -> "Wolfram`Chatbook`",
17 | "Extensions" -> {
18 | (* NOTE: The BeginStartup and EndStartup contexts are special, and need to
19 | be listed first and last, respectively, among all contexts provided by
20 | this paclet. This is a workaround used to prevent the contexts from this
21 | paclet from being present in $ContextPath post Kernel-startup. *)
22 | { "Kernel",
23 | "Root" -> "Source/Startup/Begin",
24 | "Context" -> "Wolfram`Chatbook`BeginStartup`"
25 | },
26 | { "Kernel",
27 | "Root" -> "Source/Chatbook",
28 | "Context" -> "Wolfram`Chatbook`"
29 | },
30 | { "Kernel",
31 | "Root" -> "Source/Startup/End",
32 | "Context" -> "Wolfram`Chatbook`EndStartup`"
33 | },
34 | { "Asset",
35 | "Root" -> "Assets",
36 | "Assets" -> {
37 | { "AIAssistant" , "AIAssistant" },
38 | { "DisplayFunctions" , "DisplayFunctions.wxf" },
39 | { "DisplayFunctionsDark", "DisplayFunctionsDark.wxf" },
40 | { "Snippets" , "Snippets" },
41 | { "Icons" , "Icons.wxf" },
42 | { "SandboxMessages" , "SandboxMessages.wl" },
43 | { "TemplateBoxOptions" , "TemplateBoxOptions.wxf" },
44 | { "Tokenizers" , "Tokenizers" },
45 | { "SyntaxInformation" , "SyntaxArguments.wxf" },
46 | { "SyntaxOptions" , "SyntaxOptions.wxf" }
47 | }
48 | },
49 | { "LLMConfiguration",
50 | "Personas" -> {
51 | "AgentOne",
52 | "AgentOneCoder",
53 | "Birdnardo",
54 | "CodeAssistant",
55 | "CodeWriter",
56 | "NotebookAssistant",
57 | "PlainChat",
58 | "RawModel",
59 | "Wolfie",
60 | "WolframAlpha"
61 | }
62 | },
63 | { "FrontEnd",
64 | "Root" -> "FrontEnd",
65 | Prepend -> True
66 | },
67 | { "FrontEnd",
68 | "Root" -> "DarkModeSupport",
69 | "WolframVersion" -> "14.3+",
70 | Prepend -> True
71 | }
72 | }
73 | |> ]
74 |
--------------------------------------------------------------------------------
/Developer/Resources/Icons/DiscardedMaterial.wl:
--------------------------------------------------------------------------------
1 | Graphics[
2 | {
3 | Thickness[ 0.066667 ],
4 | FaceForm @ { RGBColor[ 0.53725, 0.53725, 0.53725 ], Opacity[ 1.0 ] },
5 | FilledCurve[
6 | {
7 | {
8 | { 1, 4, 3 },
9 | { 0, 1, 0 },
10 | { 1, 3, 3 },
11 | { 0, 1, 0 },
12 | { 1, 3, 3 },
13 | { 0, 1, 0 },
14 | { 1, 3, 3 },
15 | { 0, 1, 0 },
16 | { 0, 1, 0 },
17 | { 1, 3, 3 },
18 | { 0, 1, 0 },
19 | { 1, 3, 3 },
20 | { 0, 1, 0 }
21 | },
22 | {
23 | { 0, 2, 0 },
24 | { 1, 3, 3 },
25 | { 0, 1, 0 },
26 | { 0, 1, 0 },
27 | { 1, 3, 3 },
28 | { 1, 3, 3 },
29 | { 1, 3, 3 },
30 | { 0, 1, 0 },
31 | { 0, 1, 0 },
32 | { 1, 3, 3 },
33 | { 0, 1, 0 },
34 | { 1, 3, 3 },
35 | { 0, 1, 0 },
36 | { 1, 3, 3 }
37 | },
38 | {
39 | { 0, 2, 0 },
40 | { 0, 1, 0 },
41 | { 0, 1, 0 },
42 | { 0, 1, 0 },
43 | { 0, 1, 0 },
44 | { 0, 1, 0 },
45 | { 0, 1, 0 },
46 | { 0, 1, 0 },
47 | { 0, 1, 0 },
48 | { 0, 1, 0 },
49 | { 0, 1, 0 },
50 | { 0, 1, 0 }
51 | }
52 | },
53 | {
54 | {
55 | { 13.0, 12.75 },
56 | { 13.0, 12.888 },
57 | { 12.888, 13.0 },
58 | { 12.75, 13.0 },
59 | { 2.25, 13.0 },
60 | { 2.112, 13.0 },
61 | { 2.0, 12.888 },
62 | { 2.0, 12.75 },
63 | { 2.0, 5.25 },
64 | { 2.0, 5.112 },
65 | { 2.112, 5.0 },
66 | { 2.25, 5.0 },
67 | { 4.468, 5.0 },
68 | { 4.744, 5.0 },
69 | { 4.968, 4.776 },
70 | { 4.968, 4.5 },
71 | { 4.968, 2.698 },
72 | { 7.148, 4.855 },
73 | { 7.242, 4.948 },
74 | { 7.368, 5.0 },
75 | { 7.5, 5.0 },
76 | { 12.75, 5.0 },
77 | { 12.888, 5.0 },
78 | { 13.0, 5.112 },
79 | { 13.0, 5.25 },
80 | { 13.0, 12.75 }
81 | },
82 | {
83 | { 14.0, 12.75 },
84 | { 14.0, 5.25 },
85 | { 14.0, 4.561 },
86 | { 13.439, 4.0 },
87 | { 12.75, 4.0 },
88 | { 7.706, 4.0 },
89 | { 4.819, 1.145 },
90 | { 4.724, 1.05 },
91 | { 4.597, 1.0 },
92 | { 4.468, 1.0 },
93 | { 4.403, 1.0 },
94 | { 4.337, 1.013 },
95 | { 4.275, 1.038 },
96 | { 4.089, 1.116 },
97 | { 3.968, 1.298 },
98 | { 3.968, 1.5 },
99 | { 3.968, 4.0 },
100 | { 2.25, 4.0 },
101 | { 1.561, 4.0 },
102 | { 1.0, 4.561 },
103 | { 1.0, 5.25 },
104 | { 1.0, 12.75 },
105 | { 1.0, 13.439 },
106 | { 1.561, 14.0 },
107 | { 2.25, 14.0 },
108 | { 12.75, 14.0 },
109 | { 13.439, 14.0 },
110 | { 14.0, 13.439 },
111 | { 14.0, 12.75 }
112 | },
113 | {
114 | { 10.316, 11.109 },
115 | { 8.207, 9.0 },
116 | { 10.316, 6.891 },
117 | { 9.609, 6.184 },
118 | { 7.5, 8.293 },
119 | { 5.391, 6.184 },
120 | { 4.684, 6.891 },
121 | { 6.793, 9.0 },
122 | { 4.684, 11.109 },
123 | { 5.391, 11.816 },
124 | { 7.5, 9.707 },
125 | { 9.609, 11.816 },
126 | { 10.316, 11.109 }
127 | }
128 | }
129 | ]
130 | },
131 | AspectRatio -> Automatic,
132 | ImageSize -> { 16.0, 16.0 },
133 | PlotRange -> { { -0.5, 15.5 }, { -0.5, 15.5 } }
134 | ]
--------------------------------------------------------------------------------
/Developer/Resources/FrontEndResources/WorkspaceChat/HistoryMenu/WorkspaceHistoryPopOutIcon.wl:
--------------------------------------------------------------------------------
1 | (* ::Package:: *)
2 |
3 | RawBoxes @ ToBoxes @ Mouseover[
4 | Graphics[
5 | {
6 | Thickness[ 0.11111 ],
7 | FaceForm @ { color @ "NA_OverlayMenuIcon_Blue", Opacity[ 1.0 ] },
8 | FilledCurve[
9 | {
10 | {
11 | { 0, 2, 0 },
12 | { 0, 1, 0 },
13 | { 0, 1, 0 },
14 | { 1, 3, 3 },
15 | { 1, 3, 3 },
16 | { 1, 3, 3 },
17 | { 0, 1, 0 },
18 | { 0, 1, 0 },
19 | { 0, 1, 0 },
20 | { 0, 1, 0 },
21 | { 0, 1, 0 }
22 | },
23 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } }
24 | },
25 | {
26 | {
27 | { 5.0, 9.0 },
28 | { 5.0, 8.0 },
29 | { 7.293, 8.0 },
30 | { 4.145, 4.856 },
31 | { 3.949, 4.66 },
32 | { 3.949, 4.344 },
33 | { 4.145, 4.149 },
34 | { 4.242, 4.051 },
35 | { 4.371, 4.0 },
36 | { 4.5, 4.0 },
37 | { 4.629, 4.0 },
38 | { 4.758, 4.051 },
39 | { 4.855, 4.145 },
40 | { 8.0, 7.293 },
41 | { 8.0, 5.0 },
42 | { 9.0, 5.0 },
43 | { 9.0, 9.0 },
44 | { 5.0, 9.0 }
45 | },
46 | {
47 | { 9.0, 0.0 },
48 | { 0.0, 0.0 },
49 | { 0.0, 9.0 },
50 | { 3.0, 9.0 },
51 | { 3.0, 8.0 },
52 | { 1.0, 8.0 },
53 | { 1.0, 1.0 },
54 | { 8.0, 1.0 },
55 | { 8.0, 3.0 },
56 | { 9.0, 3.0 },
57 | { 9.0, 0.0 }
58 | }
59 | }
60 | ]
61 | },
62 | AspectRatio -> Automatic,
63 | ImageSize -> { 11.765, 11.765 },
64 | PlotRange -> { { -0.5, 9.5 }, { -0.5, 9.5 } }
65 | ],
66 | Graphics[
67 | {
68 | Thickness[ 0.11111 ],
69 | FaceForm @ color @ "NA_OverlayMenuIconHover",
70 | FilledCurve[
71 | {
72 | {
73 | { 0, 2, 0 },
74 | { 0, 1, 0 },
75 | { 0, 1, 0 },
76 | { 1, 3, 3 },
77 | { 1, 3, 3 },
78 | { 1, 3, 3 },
79 | { 0, 1, 0 },
80 | { 0, 1, 0 },
81 | { 0, 1, 0 },
82 | { 0, 1, 0 },
83 | { 0, 1, 0 }
84 | },
85 | { { 0, 2, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 1, 0 } }
86 | },
87 | {
88 | {
89 | { 5.0, 9.0 },
90 | { 5.0, 8.0 },
91 | { 7.293, 8.0 },
92 | { 4.145, 4.856 },
93 | { 3.949, 4.66 },
94 | { 3.949, 4.344 },
95 | { 4.145, 4.149 },
96 | { 4.242, 4.051 },
97 | { 4.371, 4.0 },
98 | { 4.5, 4.0 },
99 | { 4.629, 4.0 },
100 | { 4.758, 4.051 },
101 | { 4.855, 4.145 },
102 | { 8.0, 7.293 },
103 | { 8.0, 5.0 },
104 | { 9.0, 5.0 },
105 | { 9.0, 9.0 },
106 | { 5.0, 9.0 }
107 | },
108 | {
109 | { 9.0, 0.0 },
110 | { 0.0, 0.0 },
111 | { 0.0, 9.0 },
112 | { 3.0, 9.0 },
113 | { 3.0, 8.0 },
114 | { 1.0, 8.0 },
115 | { 1.0, 1.0 },
116 | { 8.0, 1.0 },
117 | { 8.0, 3.0 },
118 | { 9.0, 3.0 },
119 | { 9.0, 0.0 }
120 | }
121 | }
122 | ]
123 | },
124 | AspectRatio -> Automatic,
125 | ImageSize -> { 11.765, 11.765 },
126 | PlotRange -> { { -0.5, 9.5 }, { -0.5, 9.5 } }
127 | ]
128 | ]
--------------------------------------------------------------------------------
/Source/Chatbook/ChatModes/NotebookAssistanceInstructions.wl:
--------------------------------------------------------------------------------
1 | (* ::Section::Closed:: *)
2 | (*Package Header*)
3 | BeginPackage[ "Wolfram`Chatbook`ChatModes`NotebookAssistanceInstructions`" ];
4 | Begin[ "`Private`" ];
5 |
6 | Needs[ "Wolfram`Chatbook`" ];
7 | Needs[ "Wolfram`Chatbook`Common`" ];
8 | Needs[ "Wolfram`Chatbook`ChatModes`Common`" ];
9 |
10 | (* ::**************************************************************************************************************:: *)
11 | (* ::Section::Closed:: *)
12 | (*Configuration*)
13 | $notebookAssistanceInputKeys = { "GettingStarted", "ErrorMessage" };
14 | $$notebookAssistanceInputKey = Alternatives @@ $notebookAssistanceInputKeys;
15 |
16 | (* ::**************************************************************************************************************:: *)
17 | (* ::Section::Closed:: *)
18 | (*$NotebookAssistanceInputs*)
19 | $NotebookAssistanceInputs := loadNotebookAssistanceInputs[ ];
20 |
21 | (* ::**************************************************************************************************************:: *)
22 | (* ::Subsection::Closed:: *)
23 | (*loadNotebookAssistanceInputs*)
24 | loadNotebookAssistanceInputs // beginDefinition;
25 |
26 | loadNotebookAssistanceInputs[ ] := Enclose[
27 | Module[ { as },
28 | as = ConfirmBy[ AssociationMap[ loadNotebookAssistanceInput, $notebookAssistanceInputKeys ], AssociationQ, "Inputs" ];
29 | WithCleanup[
30 | Unprotect @ $NotebookAssistanceInputs,
31 | $NotebookAssistanceInputs = ConfirmBy[ as, AllTrue @ StringQ, "Result" ],
32 | Protect @ $NotebookAssistanceInputs
33 | ]
34 | ],
35 | throwInternalFailure
36 | ];
37 |
38 | loadNotebookAssistanceInputs // endDefinition;
39 |
40 | (* ::**************************************************************************************************************:: *)
41 | (* ::Subsubsection::Closed:: *)
42 | (*loadNotebookAssistanceInput*)
43 | loadNotebookAssistanceInput // beginDefinition;
44 |
45 | loadNotebookAssistanceInput[ name: $$notebookAssistanceInputKey ] := Enclose[
46 | usingFrontEnd @ ConfirmBy[
47 | trRaw[ "NotebookAssistanceInput"<>name ],
48 | StringQ,
49 | "LoadNotebookAssistanceInput"
50 | ],
51 | throwInternalFailure
52 | ];
53 |
54 | loadNotebookAssistanceInput // endDefinition;
55 |
56 | (* ::**************************************************************************************************************:: *)
57 | (* ::Subsection::Closed:: *)
58 | (*getNotebookAssistanceInput*)
59 | getNotebookAssistanceInput // beginDefinition;
60 |
61 | getNotebookAssistanceInput[ name_String ] := Enclose[
62 | Module[ { inputs, result },
63 | inputs = ConfirmBy[ $NotebookAssistanceInputs, AssociationQ, "Inputs" ];
64 | result = ConfirmMatch[ Lookup[ inputs, name ], _Missing | $$string, "Result" ];
65 | If[ StringQ @ result, needsBasePrompt[ "NotebookAssistance"<>name ] ];
66 | result
67 | ],
68 | throwInternalFailure
69 | ];
70 |
71 | getNotebookAssistanceInput // endDefinition;
72 |
73 | (* ::**************************************************************************************************************:: *)
74 | (* ::Section::Closed:: *)
75 | (*Package Footer*)
76 | addToMXInitialization[
77 | Null
78 | ];
79 |
80 | End[ ];
81 | EndPackage[ ];
82 |
--------------------------------------------------------------------------------
/Assets/Snippets/Markdown/EntityValueInstructions.md:
--------------------------------------------------------------------------------
1 | Use the following information to write Wolfram Language code that involves `Entity`, `EntityClass`, `EntityProperty`, etc. objects.
2 |
3 | # Retrieving values for named entities or entity classes
4 |
5 | Retrieve a value for a property of a specific entity, entities, or named entity class(es):
6 |
7 | ```wl
8 | EntityValue[["entity or entity class name(s)", "entity type"], "property canonical name"]
9 | ```
10 |
11 | Include `"Association"` in the third argument of `EntityValue` when requesting more than one entity, entity group and/or property; this returns an association with `Entity` and/or `EntityProperty` objects as keys:
12 |
13 | ```wl
14 | EntityValue[["entity or entity group name(s)", "entity type"], {"property canonical name", ...}, "Association"]
15 | ```
16 |
17 | The full set of valid values for the third argument of `EntityValue` are:
18 |
19 | | Value | Description |
20 | | ----- | --- |
21 | | "EntityAssociation" | an association of entities and entity-property values |
22 | | "PropertyAssociation" | an association of properties and entity-property values |
23 | | "EntityPropertyAssociation" | an association in which the specified entities are keys, and values are a nested association of properties and entity-property values |
24 | | "PropertyEntityAssociation" | an association in which the specified properties are keys, and values are a nested association of entities and entity-property values |
25 | | "Dataset" | a dataset in which the specified entities are keys, and values are an association of property names and entity-property values |
26 | | "Association" | a nested association with entity keys on the first level and property keys on the second level |
27 | | "NonMissingPropertyAssociation" | an association of properties and entity-property values with the missing values dropped |
28 | | "NonMissingEntityAssociation" | an association of entities and entity-property values with the missing values dropped |
29 |
30 | # Filtering entities by property values
31 |
32 | If an `EntityProperty` can be used to perform an `EntityClass` lookup, use this syntax with specified patterns for `selector`:
33 |
34 | ```wl
35 | EntityList[EntityClass["entity type",
36 | {
37 | EntityProperty["entity type", "property canonical name", {"qualifier name" -> "value name"}] -> selector,
38 | EntityProperty["entity type", "property canonical name", {"qualifier name" -> "value name"}] -> selector,
39 | ...
40 | }
41 | ]]
42 | ```
43 |
44 | Note that several selectors may be combined in a single `EntityClass` expression. This is usually the most efficient method of filtering entities.
45 |
46 | # Converting natural language to Wolfram Language expressions
47 |
48 | Unless exceptions are noted in the instructions for a specific `EntityProperty`, NEVER write `Entity[type, name]` expressions yourself; ALWAYS use syntax, as in the examples shown here, to convert natural language names into valid Wolfram expressions.
49 |
50 | i.e. NEVER write `Entity["Building", "EmpireStateBuilding"]` in code; ALWAYS write `["Empire State Building"]`.
51 |
52 | Additional examples:
53 |
54 | ```wl
55 | ["Pennsylvania", Entity]
56 | ["lanthanide elements", EntityClass]
57 | ["30 m", Quantity]
58 | ["January 20, 1987", DateObject]
59 | ```
60 |
61 | In code results, `Missing["UnknownEntity", ...]` indicates that you used an invalid entity standard name. Try again using syntax.
--------------------------------------------------------------------------------
/Developer/Resources/Icons/AssistantCopyClipboard.wl:
--------------------------------------------------------------------------------
1 | (* Created with the Wolfram Language : www.wolfram.com *)
2 | Graphics[{Thickness[0.08333333333333333],
3 | {FaceForm[{RGBColor[0.6392156862745098, 0.788235294117647,
4 | 0.9490196078431372], Opacity[1.]}],
5 | FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}},
6 | {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0},
7 | {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}},
8 | {{{2., 3.5}, {10., 3.5}, {10., 4.5}, {2., 4.5}, {2., 3.5}},
9 | {{10., 6.5}, {2., 6.5}, {2., 5.5}, {10., 5.5}, {10., 6.5}},
10 | {{10., 8.5}, {2., 8.5}, {2., 7.5}, {10., 7.5}, {10., 8.5}},
11 | {{10., 10.5}, {2., 10.5}, {2., 9.5}, {10., 9.5}, {10., 10.5}}}]},
12 | {FaceForm[{RGBColor[0.2901960784313726, 0.5843137254901961, 0.8],
13 | Opacity[1.]}], FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
14 | {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0},
15 | {0, 1, 0}, {0, 1, 0}}}, {{{9.289799690246582, 14.000399589538574},
16 | {9.289799690246582, 12.999399542808533}, {10.999799728393555,
17 | 12.999399542808533}, {10.999799728393555, 0.9993991851806641},
18 | {0.9997997283935547, 0.9993991851806641}, {0.9997997283935547,
19 | 12.999399542808533}, {2.725799560546875, 12.999399542808533},
20 | {2.725799560546875, 14.000399589538574}, {-0.0002002716064453125,
21 | 14.000399589538574}, {-0.0002002716064453125, 0.00039958953857421875},
22 | {11.999799728393555, 0.00039958953857421875}, {11.999799728393555,
23 | 14.000399589538574}, {9.289799690246582, 14.000399589538574}}}]},
24 | {FaceForm[{RGBColor[0.2901960784313726, 0.5843137254901961, 0.8],
25 | Opacity[1.]}], FilledCurve[{{{1, 4, 3}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3},
26 | {0, 1, 0}, {1, 3, 3}, {0, 1, 0}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0},
27 | {1, 3, 3}, {0, 1, 0}, {1, 3, 3}, {0, 1, 0}}},
28 | {{{7.842199802398682, 14.8548002243042}, {7.786199804395437,
29 | 15.009800225496292}, {7.638199806213379, 15.11380022764206},
30 | {7.473199784755707, 15.11380022764206}, {7.081199824810028,
31 | 15.11380022764206}, {7.081199824810028, 15.449800193309784},
32 | {7.081199824810028, 15.666800200939178}, {6.905199766159058,
33 | 15.841800272464752}, {6.689199805259705, 15.841800272464752},
34 | {5.311199903488159, 15.841800272464752}, {5.094199895858765,
35 | 15.841800272464752}, {4.919199705123901, 15.666800200939178},
36 | {4.919199705123901, 15.449800193309784}, {4.919199705123901,
37 | 15.11380022764206}, {4.526199817657471, 15.11380022764206},
38 | {4.361199855804443, 15.11380022764206}, {4.214200019836426,
39 | 15.009800225496292}, {4.158200025558472, 14.8548002243042},
40 | {3.7261996269226074, 13.452800273895264}, {3.6571998596191406,
41 | 13.227800250053406}, {3.825199604034424, 12.999800324440002},
42 | {4.061199903488159, 12.999800324440002}, {7.939199797809124,
43 | 12.999800324440002}, {8.175199806690216, 12.999800324440002},
44 | {8.343199789524078, 13.227800250053406}, {8.274199813604355,
45 | 13.452800273895264}, {7.842199802398682, 14.8548002243042}}}]}},
46 | AspectRatio -> Automatic, ImageSize -> {14., 18.},
47 | PlotRange -> {{-1., 13.}, {-1., 16.842100143432617}}, BaselinePosition -> Center -> Center]
48 |
--------------------------------------------------------------------------------
/Developer/Resources/Icons/ChatIconUser.wl:
--------------------------------------------------------------------------------
1 | Graphics[
2 | {
3 | Thickness[ 0.038462 ],
4 | {
5 | FaceForm @ { RGBColor[ 0.4902, 0.82353, 1.0 ], Opacity[ 1.0 ] },
6 | FilledCurve[
7 | {
8 | {
9 | { 0, 2, 0 },
10 | { 1, 3, 3 },
11 | { 0, 1, 0 },
12 | { 1, 3, 3 },
13 | { 0, 1, 0 },
14 | { 1, 3, 3 },
15 | { 0, 1, 0 },
16 | { 1, 3, 3 },
17 | { 0, 1, 0 },
18 | { 0, 1, 0 },
19 | { 0, 1, 0 }
20 | }
21 | },
22 | {
23 | {
24 | { 8.25, 8.25 },
25 | { 5.0, 8.25 },
26 | { 4.586, 8.25 },
27 | { 4.25, 8.587 },
28 | { 4.25, 9.0 },
29 | { 4.25, 21.0 },
30 | { 4.25, 21.414 },
31 | { 4.586, 21.75 },
32 | { 5.0, 21.75 },
33 | { 21.0, 21.75 },
34 | { 21.414, 21.75 },
35 | { 21.75, 21.414 },
36 | { 21.75, 21.0 },
37 | { 21.75, 8.999 },
38 | { 21.75, 8.586 },
39 | { 21.414, 8.25 },
40 | { 21.0, 8.25 },
41 | { 12.912, 8.25 },
42 | { 8.25, 4.521 },
43 | { 8.25, 8.25 }
44 | }
45 | }
46 | ]
47 | },
48 | {
49 | FaceForm @ { RGBColor[ 0.18824, 0.49412, 0.6549 ], Opacity[ 1.0 ] },
50 | FilledCurve[
51 | {
52 | {
53 | { 0, 2, 0 },
54 | { 1, 3, 3 },
55 | { 0, 1, 0 },
56 | { 1, 3, 3 },
57 | { 0, 1, 0 },
58 | { 0, 1, 0 },
59 | { 0, 1, 0 },
60 | { 0, 1, 0 },
61 | { 1, 3, 3 },
62 | { 0, 1, 0 },
63 | { 1, 3, 3 }
64 | },
65 | {
66 | { 1, 4, 3 },
67 | { 0, 1, 0 },
68 | { 1, 3, 3 },
69 | { 1, 3, 3 },
70 | { 0, 1, 0 },
71 | { 0, 1, 0 },
72 | { 0, 1, 0 },
73 | { 0, 1, 0 },
74 | { 0, 1, 0 },
75 | { 0, 1, 0 },
76 | { 0, 1, 0 },
77 | { 0, 1, 0 },
78 | { 1, 3, 3 },
79 | { 0, 1, 0 },
80 | { 1, 3, 3 },
81 | { 0, 1, 0 }
82 | }
83 | },
84 | {
85 | {
86 | { 21.0, 22.0 },
87 | { 5.0, 22.0 },
88 | { 4.448, 22.0 },
89 | { 4.0, 21.552 },
90 | { 4.0, 21.0 },
91 | { 4.0, 9.0 },
92 | { 4.0, 8.448 },
93 | { 4.448, 8.0 },
94 | { 5.0, 8.0 },
95 | { 8.0, 8.0 },
96 | { 8.0, 4.0 },
97 | { 13.0, 8.0 },
98 | { 21.0, 8.0 },
99 | { 21.552, 8.0 },
100 | { 22.0, 8.447 },
101 | { 22.0, 8.999 },
102 | { 22.0, 21.0 },
103 | { 22.0, 21.552 },
104 | { 21.552, 22.0 },
105 | { 21.0, 22.0 }
106 | },
107 | {
108 | { 21.0, 21.5 },
109 | { 21.276, 21.5 },
110 | { 21.5, 21.276 },
111 | { 21.5, 21.0 },
112 | { 21.5, 8.999 },
113 | { 21.5, 8.866 },
114 | { 21.448, 8.74 },
115 | { 21.354, 8.646 },
116 | { 21.259, 8.552 },
117 | { 21.134, 8.5 },
118 | { 21.0, 8.5 },
119 | { 13.0, 8.5 },
120 | { 12.825, 8.5 },
121 | { 12.688, 8.39 },
122 | { 8.5, 5.04 },
123 | { 8.5, 8.0 },
124 | { 8.5, 8.5 },
125 | { 8.0, 8.5 },
126 | { 5.0, 8.5 },
127 | { 4.724, 8.5 },
128 | { 4.5, 8.724 },
129 | { 4.5, 9.0 },
130 | { 4.5, 21.0 },
131 | { 4.5, 21.276 },
132 | { 4.724, 21.5 },
133 | { 5.0, 21.5 },
134 | { 21.0, 21.5 }
135 | }
136 | }
137 | ]
138 | }
139 | },
140 | ImageSize -> { 21, 21 },
141 | ImagePadding -> 1
142 | ]
--------------------------------------------------------------------------------