identify more shells

This commit is contained in:
Andrew Pareles 2025-05-12 12:09:55 -07:00
parent e8b7c9c470
commit 3fa680e8ba

View file

@ -239,6 +239,21 @@ export const StatusIndicatorForApplyButton = ({ applyBoxId, uri }: { applyBoxId:
}
const terminalLanguages = new Set([
'bash',
'shellscript',
'shell',
'powershell',
'bat',
'zsh',
'sh',
'fish',
'nushell',
'ksh',
'xonsh',
'elvish',
])
export const ApplyButtonsHTML = ({
codeStr,
applyBoxId,
@ -261,7 +276,7 @@ export const ApplyButtonsHTML = ({
const { currStreamStateRef, setApplying } = useApplyStreamState({ applyBoxId })
const isShellLanguage = language === 'bash' || language === 'shellscript'
const isShellLanguage = !!language && terminalLanguages.has(language)
const [isShellRunning, setIsShellRunning] = useState<boolean>(false)
const interruptToolRef = useRef<(() => void) | null>(null)