Skip to content

Commit

Permalink
Merge pull request #995 from WolframResearch/bugfix/misc-cloud-fixes
Browse files Browse the repository at this point in the history
Bugfix: Miscellaneous cloud fixes
  • Loading branch information
rhennigan authored Dec 19, 2024
2 parents 936eafb + cc64caf commit a37a329
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Developer/Resources/WorkspaceStyles.wl
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,12 @@ Cell[
],
EventHandlerTag @ {
"MouseEntered" :>
With[ { cell = EvaluationCell[ ] },
Quiet @ Needs[ "Wolfram`Chatbook`" -> None ];
Symbol[ "Wolfram`Chatbook`ChatbookAction" ][ "AttachAssistantMessageButtons", cell ]
If[ TrueQ @ $CloudEvaluation,
Null,
With[ { cell = EvaluationCell[ ] },
Quiet @ Needs[ "Wolfram`Chatbook`" -> None ];
Symbol[ "Wolfram`Chatbook`ChatbookAction" ][ "AttachAssistantMessageButtons", cell ]
]
],
Method -> "Preemptive",
PassEventsDown -> Automatic,
Expand Down
3 changes: 2 additions & 1 deletion Source/Chatbook/PromptGenerators/VectorDatabases.wl
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ $noSemanticSearch := $noSemanticSearch = ! PacletObjectQ @ Quiet @ PacletInstall
getVectorDBDirectory // beginDefinition;

getVectorDBDirectory[ ] := Enclose[
If[ $CloudEvaluation, cleanupLegacyVectorDBFiles @ $localVectorDBDirectory ];
$vectorDBDirectory = SelectFirst[
{
$pacletVectorDBDirectory,
Expand Down Expand Up @@ -203,7 +204,7 @@ downloadVectorDatabases // endDefinition;
(*cleanupLegacyVectorDBFiles*)
cleanupLegacyVectorDBFiles // beginDefinition;

cleanupLegacyVectorDBFiles[ dir_String ] := Quiet @ Map[
cleanupLegacyVectorDBFiles[ dir_String ] := cleanupLegacyVectorDBFiles[ dir ] = Quiet @ Map[
DeleteDirectory[ #1, DeleteContents -> True ] &,
Join[
Select[ FileNames[ DigitCharacter.. ~~ "." ~~ DigitCharacter.. ~~ "." ~~ DigitCharacter.., dir ], DirectoryQ ],
Expand Down

0 comments on commit a37a329

Please sign in to comment.