-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat: adding clickble symbol render in chat panel #3420
base: main
Are you sure you want to change the base?
feat: adding clickble symbol render in chat panel #3420
Conversation
@@ -94,6 +105,7 @@ export function createClient(target: HTMLIFrameElement, api: ClientApi): ServerA | |||
onLoaded: api.onLoaded, | |||
onCopy: api.onCopy, | |||
onKeyboardEvent: api.onKeyboardEvent, | |||
onRenderLsp: api.onRenderLsp, |
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.
onRenderLsp: api.onRenderLsp, | |
onNavigateSymbol: api.onNavigateSymbol, |
@@ -53,7 +53,14 @@ export interface ServerApi { | |||
updateTheme: (style: string, themeClass: string) => void | |||
updateActiveSelection: (context: Context | null) => void | |||
} | |||
|
|||
export interface KeywordInfo { |
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.
export interface KeywordInfo { | |
export interface SymbolInfo { |
export interface KeywordInfo { | ||
sourceFile: string | ||
sourceLine: number | ||
sourceChar: number |
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.
sourceChar: number | |
sourceCol: number |
@@ -69,6 +76,10 @@ export interface ClientApi { | |||
onCopy: (content: string) => void | |||
|
|||
onKeyboardEvent: (type: 'keydown' | 'keyup' | 'keypress', event: KeyboardEventInit) => void | |||
onRenderLsp: (filepaths: string[], keywords: string[]) => Promise<Record< |
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.
onRenderLsp: (filepaths: string[], keywords: string[]) => Promise<Record< | |
onNavigateSymbol: (filepath: String, symbol: String) => void |
Instead of return SymbolInfo
, why not just navigate to the symbol directly?
Need handle cases that certain backend doesn't support such feature (e.g IntelliJ) |
still working
demo
Screen.Recording.2024-11-16.at.14.16.36.mov