mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-09 10:18:57 +00:00
11 lines
320 B
TypeScript
11 lines
320 B
TypeScript
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
|
|
}
|