Error when opening "My PromptLab Commands"
Hi,
I installed your extension earlier today and it's fantastic. It was working fine but now when I go to 'My PromptLab Commands' I get the following error:
TypeError: command.acceptedFileExtensions?.split is
not a function
SearchCommand:search-commands.tsx:27:2
24: import path from "path";
25:
26: export default function SearchCommand(props: { arguments: { commandName: string; queryInput: string } }) {
27: const { commandName, queryInput } = props.arguments;
^
28: const [commands, setCommands] = useState<Command[]>();
29: const [targetCategory, setTargetCategory] = useState<string>("All");
30: const [searchText, setSearchText] = useState<string | undefined>(
SearchCommand:search-commands.tsx:27:2
Nr:index.js:6:2490
at ray-navigation-stack
_o:index.js:6:2088
I installed a few batches of commands from the store. Most worked well. One issue I had, almost certainly unrelated, was when summarising PDF with filename Walter Murch - In the Blink of an Eye Revised 2nd Edition (2001, Silman-James Pr).pdf, it didn't like it and gave me the error:
Error: ENOENT: no such file or directory, Istat '/Users/
Alex/Downloads/Walter Murch - In the Blink of an Eye
Revised 2nd Edition (2001'
Obiect.IstatSync:node:fs:1569:3

Renaming it to test.pdf worked and then everything seemed fine after.
The last command I tried to run was 'summarise spoken audio' which gave me an error that unfortunately I didn't capture.
Thanks,
Alex
I've just pushed fixes for both of these. The first was caused by some commands having "None" in the acceptedFileExtensions field, which is now accounted for. The second issue was caused by splitting the list of selected files using , as a delimiter — I'm using :: now instead.
When you get a chance, please confirm that the issues are fixed on your end 🙂
Thanks for the quick feedback and fixes. The summarisation filename issue is fixed but I still get the same error with My PromptLab Commands. Is there anything I can do to help you diagnose it further?
Hm, strange. I've tried reinstalling all of the commands from the store, and none cause this error for me.
I'd like to analyze the JSON config for the commands you've got installed to see if there's anything strange there. Normally you could get that via the action menu in the command list... For this case, can you look in /Users/exampleUser/Library/Application Support/com.raycast.macos/extensions/promptlab/com.raycast.api.cache/ and share the file with random characters as a name, e.g. kMNvFzpyCwuRjqwY4gTBH? You can DM it to me on the Raycast slack if you'd like.
I'M GETTING the same error. HAPPENS AFTER I install a script from the store, when I RETURN to my promptlab commands I get this error: TypeError: command.acceptedFileExtensions?.split is not a function SearchCommand:search-commands.tsx:27:2
I can only fix the issue by a complete reinstall through terminal again. For now I'm not using the store command
It's a fabulous tool, hope you can fix this bug
@halliwells99 The issue appears to be fixed in the latest version, but you have to clear the extension storage and cache for the fix to apply. You can do that by opening the Actions menu on any PromptLab command in Raycast's root search, then running the Clear Local Storage & Cache action. Note that this will delete any custom commands you have installed. I am still investigating other fixes...
@halliwells99 The issue appears to be fixed in the latest version, but you have to clear the extension storage and cache for the fix to apply. You can do that by opening the Actions menu on any PromptLab command in Raycast's root search, then running the
Clear Local Storage & Cacheaction. Note that this will delete any custom commands you have installed. I am still investigating other fixes...
Thanks for your response but sadly the extension keeps crashing with the same error message. I did delete the storage and cache as outlined above
error message:
22: import { getCommandJSON } from "./utils/command-utils"; 23: 24: export default function SearchCommand(props: { arguments: { commandName: string; queryInput: string } }) { 25: const { commandName, queryInput } = props.arguments; ^ 26: const [commands, setCommands] = useState<Command[]>(); 27: const [searchText, setSearchText] = useState<string | undefined>( 28: commandName == undefined || queryInput ? undefined : commandName.trim()