chore: refactoring and tests, splitting up files (#12495)
This commit is contained in:
10
packages/app/src/pages/session/session-command-helpers.ts
Normal file
10
packages/app/src/pages/session/session-command-helpers.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export const canAddSelectionContext = (input: {
|
||||
active?: string
|
||||
pathFromTab: (tab: string) => string | undefined
|
||||
selectedLines: (path: string) => unknown
|
||||
}) => {
|
||||
if (!input.active) return false
|
||||
const path = input.pathFromTab(input.active)
|
||||
if (!path) return false
|
||||
return input.selectedLines(path) != null
|
||||
}
|
||||
Reference in New Issue
Block a user