Skip to content

Commit a37a329

Browse files
authored
Merge pull request #995 from WolframResearch/bugfix/misc-cloud-fixes
Bugfix: Miscellaneous cloud fixes
2 parents 936eafb + cc64caf commit a37a329

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Developer/Resources/WorkspaceStyles.wl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,12 @@ Cell[
230230
],
231231
EventHandlerTag @ {
232232
"MouseEntered" :>
233-
With[ { cell = EvaluationCell[ ] },
234-
Quiet @ Needs[ "Wolfram`Chatbook`" -> None ];
235-
Symbol[ "Wolfram`Chatbook`ChatbookAction" ][ "AttachAssistantMessageButtons", cell ]
233+
If[ TrueQ @ $CloudEvaluation,
234+
Null,
235+
With[ { cell = EvaluationCell[ ] },
236+
Quiet @ Needs[ "Wolfram`Chatbook`" -> None ];
237+
Symbol[ "Wolfram`Chatbook`ChatbookAction" ][ "AttachAssistantMessageButtons", cell ]
238+
]
236239
],
237240
Method -> "Preemptive",
238241
PassEventsDown -> Automatic,

Source/Chatbook/PromptGenerators/VectorDatabases.wl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ $noSemanticSearch := $noSemanticSearch = ! PacletObjectQ @ Quiet @ PacletInstall
103103
getVectorDBDirectory // beginDefinition;
104104

105105
getVectorDBDirectory[ ] := Enclose[
106+
If[ $CloudEvaluation, cleanupLegacyVectorDBFiles @ $localVectorDBDirectory ];
106107
$vectorDBDirectory = SelectFirst[
107108
{
108109
$pacletVectorDBDirectory,
@@ -203,7 +204,7 @@ downloadVectorDatabases // endDefinition;
203204
(*cleanupLegacyVectorDBFiles*)
204205
cleanupLegacyVectorDBFiles // beginDefinition;
205206

206-
cleanupLegacyVectorDBFiles[ dir_String ] := Quiet @ Map[
207+
cleanupLegacyVectorDBFiles[ dir_String ] := cleanupLegacyVectorDBFiles[ dir ] = Quiet @ Map[
207208
DeleteDirectory[ #1, DeleteContents -> True ] &,
208209
Join[
209210
Select[ FileNames[ DigitCharacter.. ~~ "." ~~ DigitCharacter.. ~~ "." ~~ DigitCharacter.., dir ], DirectoryQ ],

0 commit comments

Comments
 (0)