-
Notifications
You must be signed in to change notification settings - Fork 23
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
fix: keep in history list after history deleted #26
fix: keep in history list after history deleted #26
Conversation
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
…tConversationModalClose Signed-off-by: Lin Wang <[email protected]>
import { BehaviorSubject } from 'rxjs'; | ||
import { I18nProvider } from '@osd/i18n/react'; | ||
|
||
import * as useChatStateExports from '../../../hooks/use_chat_state'; |
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: we should barrel this stuff in like
public/tabs/history/index.ts
and then export those files in there so that we can just import with a single line.
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.
Is that means we create a public/tabs/history/index.ts
file and exports all references in it like these
export * from './../hooks/use_chat_state';
export * from '../../../contexts/chat_context';
then we can import them in single line like this
import * as historyExports from "../";
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.
yeah and i think if you need to import you can be like
import { useChatState } from '../history'
depending on where you are importing it. I would export * like how you are doing and then be specific.
Our build system is like a custom implementation of babel and webpack so importing everything with *
could potentially not support tree-shaking. So just in general probably better to import what you need to ensure a smaller bundle size.
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
Description
Same as #19
Fix jump to new chat page after current session deleted in dock right mode like below video:
Screen.Recording.2023-11-29.at.14.41.57.mov
It should stay the same page
Issues Resolved
List any issues this PR will resolve, e.g. Closes [...].
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.