Commit aadef29
committed
fix: use promptRef.current in setPromptFromTraits to keep stable callback identity
Read from promptRef.current instead of closing over the prompt state
variable so the useCallback dependency array no longer includes prompt.
This restores the previous ref-based pattern that kept the callback
identity stable across keystrokes, preventing unnecessary re-renders of
the provider traits menu.1 parent e89f114 commit aadef29
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
868 | 868 | | |
869 | 869 | | |
870 | 870 | | |
871 | | - | |
| 871 | + | |
| 872 | + | |
872 | 873 | | |
873 | 874 | | |
874 | 875 | | |
| |||
879 | 880 | | |
880 | 881 | | |
881 | 882 | | |
882 | | - | |
| 883 | + | |
883 | 884 | | |
884 | 885 | | |
885 | 886 | | |
| |||
0 commit comments