{#snippet menuItems()}
selectDirectory('')} >
{$i18n.t('No folder')}
{#if !directory}
{/if}
{#if options.length > 0}
{$i18n.t('Recently Used')}
{#if historyError}
{historyError}
{/if}
{#each options as path} {@const selected = !!directory && normalize(directory) === path}
selectDirectory(path)} >
{folderName(path)}
{#if selected}
{/if}
{ closeMenu(); showFileNav.set({ terminalId: target.selector, directory: path, chatId }); }}>
{/each}
{/if}
{ closeMenu(); showPicker = true; }} >
{$i18n.t('Open folder')}
{/snippet} {#if inMenu} {#if tab === ''}
{ tab = 'directory'; search = ''; void refreshRecentFolders(); }} >
{directory ? folderName(directory) : $i18n.t('Working Directory')}
{:else if tab === 'directory'}
{ tab = ''; }} >
{$i18n.t('Working Directory')}
{@render menuItems()}
{/if} {:else}
{ search = ''; if (open) void refreshRecentFolders(); }} >
{#if directory}
{directory ? folderName(directory) : $i18n.t('Working Directory')}
{/if}
{@render menuItems()}
{/if} {#if showPicker}
{$i18n.t('Choose working directory')}
(showPicker = false)} >
{/if}