-
Notifications
You must be signed in to change notification settings - Fork 2
refactor: sessions #248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: sessions #248
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
f7606c2 to
a6e1855
Compare
joshsny
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - left some nits, none of them blocking
| .filter(({ event }) => | ||
| JSON.stringify(event).toLowerCase().includes(query), | ||
| ); | ||
| }, [events, searchQuery]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's annoying we do this stuff for all events on every new event, would be nicer to do this stuff in a store somewhere, but not a big deal so lets just leave it
| ); | ||
| }, [events, searchQuery]); | ||
|
|
||
| const copyToClipboard = useCallback((text: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: does this need a useCallback
| events, | ||
| isPromptPending, | ||
| }: ConversationViewProps) { | ||
| const turns = useMemo(() => buildTurns(events), [events]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this too, I think all this logic should be in zustand but its not a big issue
| taskId ? state.getSessionForTask(taskId) : undefined, | ||
| ); | ||
| const { setSessionModel } = useSessionActions(); | ||
| const session = useSessionForTask(taskId ?? ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if we pass "" here?
|
|
||
| export function useKeyboardShortcut( | ||
| key: string, | ||
| callback: () => void, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will always need to be a useCallback to avoid the effect from registering and unregistering the event listener on every render
b2c1284 to
69fbd7a
Compare
Merge activity
|

Session store and all related types were an absolute mess. I refactored it so we now only use ACP types directly, so I can actually work on improving session rendering. Also updated our knip config.