Open Davidthecode opened 3 months ago
Hey @Davidthecode, I have the exact same issue. Did you ever find out how to resolve it ? Thanks
Downgrading cmdk package version to 0.2.1 did the trick. It works now.
ok @john-dw, i'll try it out
Downgrading cmdk package version to 0.2.1 did the trick. It works now.
Worked for me, thanks!
From https://github.com/pacocoursey/cmdk/releases:
Rendering the Command.List part (CommandList if using shadcn) is now mandatory. Otherwise, you should expect to see an error like this:
TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
The fix:
// Before
<Command label="Command Menu">
<Command.Input />
<Command.Item />
{/* ... */}
</Command>
// After
<Command label="Command Menu">
<Command.Input />
<Command.List>
<Command.Item />
{/* ... */}
</Command.List>
</Command>
Provide environment information
System: OS: macOS 12.7.4 CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz Memory: 18.83 MB / 8.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 20.12.0 - /usr/local/bin/node npm: 10.5.0 - /usr/local/bin/npm pnpm: 8.15.6 - /usr/local/bin/pnpm
Describe the bug
Whenever i highlight a text and click on the
ask AI
option, i get an error that says -TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator).
I can't exactly pinpoint the error because there isn't enough information about it. i did some debugging and i think the error might be coming from theai-selector-commands
component. I noticed that when i comment the code in the return block inside theai-selector-commands
component, i don't get the error but only the input with theask AI to edit or generate
option is displayed in the ui. however when i start typing in the input i get the error again. I have been trying hard to find the issue but i can't seem to figure it out.here's the "ai-selector" component for reference -
here is the "ai-selector-commands" component for reference -
here is the "ai-completion-command" for reference -
Link to reproduction
https://novel.sh
To reproduce
I get the error when i click on the
Ask AI
optionAdditional information
No response