Merge branch 'dev' of github.com:anomalyco/opencode into dev
This commit is contained in:
@@ -93,24 +93,36 @@ export function PromptWorkspaceSelector(props: {
|
|||||||
</MenuV2.Content>
|
</MenuV2.Content>
|
||||||
</MenuV2.Portal>
|
</MenuV2.Portal>
|
||||||
</MenuV2>
|
</MenuV2>
|
||||||
<Show when={props.branch}>
|
<PromptGitStatus branch={props.branch} />
|
||||||
{(branch) => (
|
|
||||||
<>
|
|
||||||
<span class="hidden select-none opacity-50 sm:inline mx-1">/</span>
|
|
||||||
<TooltipV2
|
|
||||||
placement="top"
|
|
||||||
value={branch()}
|
|
||||||
class="min-w-0 max-w-[220px]"
|
|
||||||
contentClass="max-w-[calc(100vw-32px)] break-all"
|
|
||||||
>
|
|
||||||
<div class="flex h-7 min-w-0 max-w-[220px] items-center gap-1.5 px-2 text-[13px] font-[440] leading-5 tracking-[-0.04px]">
|
|
||||||
<Icon name="branch" size="small" class="shrink-0 text-v2-icon-icon-muted" />
|
|
||||||
<span class="min-w-0 truncate">{branch()}</span>
|
|
||||||
</div>
|
|
||||||
</TooltipV2>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Show>
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function PromptGitStatus(props: { branch?: string; noGit?: boolean }) {
|
||||||
|
const language = useLanguage()
|
||||||
|
const label = () => {
|
||||||
|
if (props.noGit) return language.t("session.new.git.none")
|
||||||
|
return props.branch
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Show when={label()}>
|
||||||
|
{(value) => (
|
||||||
|
<>
|
||||||
|
<span class="hidden select-none opacity-50 sm:inline mx-1">/</span>
|
||||||
|
<TooltipV2
|
||||||
|
placement="top"
|
||||||
|
value={value()}
|
||||||
|
class="min-w-0 max-w-[220px]"
|
||||||
|
contentClass="max-w-[calc(100vw-32px)] break-all"
|
||||||
|
>
|
||||||
|
<div class="flex h-7 min-w-0 max-w-[220px] items-center gap-1.5 px-2 text-[13px] font-[440] leading-5 tracking-[-0.04px]">
|
||||||
|
<Icon name="branch" size="small" class="shrink-0 text-v2-icon-icon-muted" />
|
||||||
|
<span class="min-w-0 truncate">{value()}</span>
|
||||||
|
</div>
|
||||||
|
</TooltipV2>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Show>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|||||||
@@ -613,6 +613,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "محلي",
|
"session.new.workspace.triggerLocal": "محلي",
|
||||||
"session.new.workspace.local": "المستودع المحلي",
|
"session.new.workspace.local": "المستودع المحلي",
|
||||||
"session.new.workspace.existing": "مساحة عمل…",
|
"session.new.workspace.existing": "مساحة عمل…",
|
||||||
|
"session.new.git.none": "لا يوجد Git",
|
||||||
"session.new.lastModified": "آخر تعديل",
|
"session.new.lastModified": "آخر تعديل",
|
||||||
"session.header.search.placeholder": "بحث {{project}}",
|
"session.header.search.placeholder": "بحث {{project}}",
|
||||||
"session.header.searchFiles": "بحث عن الملفات",
|
"session.header.searchFiles": "بحث عن الملفات",
|
||||||
|
|||||||
@@ -619,6 +619,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "Local",
|
"session.new.workspace.triggerLocal": "Local",
|
||||||
"session.new.workspace.local": "Repositório local",
|
"session.new.workspace.local": "Repositório local",
|
||||||
"session.new.workspace.existing": "Espaço de trabalho…",
|
"session.new.workspace.existing": "Espaço de trabalho…",
|
||||||
|
"session.new.git.none": "Sem Git",
|
||||||
"session.new.lastModified": "Última modificação",
|
"session.new.lastModified": "Última modificação",
|
||||||
"session.header.search.placeholder": "Buscar {{project}}",
|
"session.header.search.placeholder": "Buscar {{project}}",
|
||||||
"session.header.searchFiles": "Buscar arquivos",
|
"session.header.searchFiles": "Buscar arquivos",
|
||||||
|
|||||||
@@ -675,6 +675,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "Lokalno",
|
"session.new.workspace.triggerLocal": "Lokalno",
|
||||||
"session.new.workspace.local": "Lokalni repozitorij",
|
"session.new.workspace.local": "Lokalni repozitorij",
|
||||||
"session.new.workspace.existing": "Radni prostor…",
|
"session.new.workspace.existing": "Radni prostor…",
|
||||||
|
"session.new.git.none": "Nema Gita",
|
||||||
"session.new.lastModified": "Posljednja izmjena",
|
"session.new.lastModified": "Posljednja izmjena",
|
||||||
|
|
||||||
"session.header.search.placeholder": "Pretraži {{project}}",
|
"session.header.search.placeholder": "Pretraži {{project}}",
|
||||||
|
|||||||
@@ -670,6 +670,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "Lokal",
|
"session.new.workspace.triggerLocal": "Lokal",
|
||||||
"session.new.workspace.local": "Lokalt repository",
|
"session.new.workspace.local": "Lokalt repository",
|
||||||
"session.new.workspace.existing": "Arbejdsområde…",
|
"session.new.workspace.existing": "Arbejdsområde…",
|
||||||
|
"session.new.git.none": "Ingen Git",
|
||||||
"session.new.lastModified": "Sidst ændret",
|
"session.new.lastModified": "Sidst ændret",
|
||||||
|
|
||||||
"session.header.search.placeholder": "Søg {{project}}",
|
"session.header.search.placeholder": "Søg {{project}}",
|
||||||
|
|||||||
@@ -628,6 +628,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "Lokal",
|
"session.new.workspace.triggerLocal": "Lokal",
|
||||||
"session.new.workspace.local": "Lokales Repository",
|
"session.new.workspace.local": "Lokales Repository",
|
||||||
"session.new.workspace.existing": "Arbeitsbereich…",
|
"session.new.workspace.existing": "Arbeitsbereich…",
|
||||||
|
"session.new.git.none": "Kein Git",
|
||||||
"session.new.lastModified": "Zuletzt geändert",
|
"session.new.lastModified": "Zuletzt geändert",
|
||||||
"session.header.search.placeholder": "{{project}} durchsuchen",
|
"session.header.search.placeholder": "{{project}} durchsuchen",
|
||||||
"session.header.searchFiles": "Dateien suchen",
|
"session.header.searchFiles": "Dateien suchen",
|
||||||
|
|||||||
@@ -700,6 +700,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "Local",
|
"session.new.workspace.triggerLocal": "Local",
|
||||||
"session.new.workspace.local": "Local repository",
|
"session.new.workspace.local": "Local repository",
|
||||||
"session.new.workspace.existing": "Workspace…",
|
"session.new.workspace.existing": "Workspace…",
|
||||||
|
"session.new.git.none": "No Git",
|
||||||
"session.new.lastModified": "Last modified",
|
"session.new.lastModified": "Last modified",
|
||||||
|
|
||||||
"session.header.search.placeholder": "Search {{project}}",
|
"session.header.search.placeholder": "Search {{project}}",
|
||||||
|
|||||||
@@ -676,6 +676,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "Local",
|
"session.new.workspace.triggerLocal": "Local",
|
||||||
"session.new.workspace.local": "Repositorio local",
|
"session.new.workspace.local": "Repositorio local",
|
||||||
"session.new.workspace.existing": "Espacio de trabajo…",
|
"session.new.workspace.existing": "Espacio de trabajo…",
|
||||||
|
"session.new.git.none": "Sin Git",
|
||||||
"session.new.lastModified": "Última modificación",
|
"session.new.lastModified": "Última modificación",
|
||||||
|
|
||||||
"session.header.search.placeholder": "Buscar {{project}}",
|
"session.header.search.placeholder": "Buscar {{project}}",
|
||||||
|
|||||||
@@ -624,6 +624,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "Local",
|
"session.new.workspace.triggerLocal": "Local",
|
||||||
"session.new.workspace.local": "Dépôt local",
|
"session.new.workspace.local": "Dépôt local",
|
||||||
"session.new.workspace.existing": "Espace de travail…",
|
"session.new.workspace.existing": "Espace de travail…",
|
||||||
|
"session.new.git.none": "Pas de Git",
|
||||||
"session.new.lastModified": "Dernière modification",
|
"session.new.lastModified": "Dernière modification",
|
||||||
"session.header.search.placeholder": "Rechercher {{project}}",
|
"session.header.search.placeholder": "Rechercher {{project}}",
|
||||||
"session.header.searchFiles": "Rechercher des fichiers",
|
"session.header.searchFiles": "Rechercher des fichiers",
|
||||||
|
|||||||
@@ -615,6 +615,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "ローカル",
|
"session.new.workspace.triggerLocal": "ローカル",
|
||||||
"session.new.workspace.local": "ローカルリポジトリ",
|
"session.new.workspace.local": "ローカルリポジトリ",
|
||||||
"session.new.workspace.existing": "ワークスペース…",
|
"session.new.workspace.existing": "ワークスペース…",
|
||||||
|
"session.new.git.none": "Git なし",
|
||||||
"session.new.lastModified": "最終更新",
|
"session.new.lastModified": "最終更新",
|
||||||
"session.header.search.placeholder": "{{project}}を検索",
|
"session.header.search.placeholder": "{{project}}を検索",
|
||||||
"session.header.searchFiles": "ファイルを検索",
|
"session.header.searchFiles": "ファイルを検索",
|
||||||
|
|||||||
@@ -976,6 +976,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "로컬",
|
"session.new.workspace.triggerLocal": "로컬",
|
||||||
"session.new.workspace.local": "로컬 저장소",
|
"session.new.workspace.local": "로컬 저장소",
|
||||||
"session.new.workspace.existing": "작업 공간…",
|
"session.new.workspace.existing": "작업 공간…",
|
||||||
|
"session.new.git.none": "Git 없음",
|
||||||
|
|
||||||
"sidebar.empty.title": "열린 프로젝트 없음",
|
"sidebar.empty.title": "열린 프로젝트 없음",
|
||||||
"sidebar.empty.description": "프로젝트를 열어 시작하세요",
|
"sidebar.empty.description": "프로젝트를 열어 시작하세요",
|
||||||
|
|||||||
@@ -1070,6 +1070,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "Lokalt",
|
"session.new.workspace.triggerLocal": "Lokalt",
|
||||||
"session.new.workspace.local": "Lokalt depot",
|
"session.new.workspace.local": "Lokalt depot",
|
||||||
"session.new.workspace.existing": "Arbeidsområde…",
|
"session.new.workspace.existing": "Arbeidsområde…",
|
||||||
|
"session.new.git.none": "Ingen Git",
|
||||||
|
|
||||||
"sidebar.empty.title": "Ingen åpne prosjekter",
|
"sidebar.empty.title": "Ingen åpne prosjekter",
|
||||||
"sidebar.empty.description": "Åpne et prosjekt for å komme i gang",
|
"sidebar.empty.description": "Åpne et prosjekt for å komme i gang",
|
||||||
|
|||||||
@@ -619,6 +619,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "Lokalnie",
|
"session.new.workspace.triggerLocal": "Lokalnie",
|
||||||
"session.new.workspace.local": "Lokalne repozytorium",
|
"session.new.workspace.local": "Lokalne repozytorium",
|
||||||
"session.new.workspace.existing": "Przestrzeń robocza…",
|
"session.new.workspace.existing": "Przestrzeń robocza…",
|
||||||
|
"session.new.git.none": "Brak Git",
|
||||||
"session.new.lastModified": "Ostatnio zmodyfikowano",
|
"session.new.lastModified": "Ostatnio zmodyfikowano",
|
||||||
"session.header.search.placeholder": "Szukaj {{project}}",
|
"session.header.search.placeholder": "Szukaj {{project}}",
|
||||||
"session.header.searchFiles": "Szukaj plików",
|
"session.header.searchFiles": "Szukaj plików",
|
||||||
|
|||||||
@@ -673,6 +673,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "Локально",
|
"session.new.workspace.triggerLocal": "Локально",
|
||||||
"session.new.workspace.local": "Локальный репозиторий",
|
"session.new.workspace.local": "Локальный репозиторий",
|
||||||
"session.new.workspace.existing": "Рабочее пространство…",
|
"session.new.workspace.existing": "Рабочее пространство…",
|
||||||
|
"session.new.git.none": "Нет Git",
|
||||||
"session.new.lastModified": "Последнее изменение",
|
"session.new.lastModified": "Последнее изменение",
|
||||||
|
|
||||||
"session.header.search.placeholder": "Поиск {{project}}",
|
"session.header.search.placeholder": "Поиск {{project}}",
|
||||||
|
|||||||
@@ -669,6 +669,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "ในเครื่อง",
|
"session.new.workspace.triggerLocal": "ในเครื่อง",
|
||||||
"session.new.workspace.local": "รีโพซิทอรีในเครื่อง",
|
"session.new.workspace.local": "รีโพซิทอรีในเครื่อง",
|
||||||
"session.new.workspace.existing": "พื้นที่ทำงาน…",
|
"session.new.workspace.existing": "พื้นที่ทำงาน…",
|
||||||
|
"session.new.git.none": "ไม่มี Git",
|
||||||
"session.new.lastModified": "แก้ไขล่าสุด",
|
"session.new.lastModified": "แก้ไขล่าสุด",
|
||||||
|
|
||||||
"session.header.search.placeholder": "ค้นหา {{project}}",
|
"session.header.search.placeholder": "ค้นหา {{project}}",
|
||||||
|
|||||||
@@ -679,6 +679,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "Yerel",
|
"session.new.workspace.triggerLocal": "Yerel",
|
||||||
"session.new.workspace.local": "Yerel depo",
|
"session.new.workspace.local": "Yerel depo",
|
||||||
"session.new.workspace.existing": "Çalışma alanı…",
|
"session.new.workspace.existing": "Çalışma alanı…",
|
||||||
|
"session.new.git.none": "Git yok",
|
||||||
"session.new.lastModified": "Son değişiklik",
|
"session.new.lastModified": "Son değişiklik",
|
||||||
|
|
||||||
"session.header.search.placeholder": "{{project}} ara",
|
"session.header.search.placeholder": "{{project}} ara",
|
||||||
|
|||||||
@@ -703,6 +703,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "Локально",
|
"session.new.workspace.triggerLocal": "Локально",
|
||||||
"session.new.workspace.local": "Локальний репозиторій",
|
"session.new.workspace.local": "Локальний репозиторій",
|
||||||
"session.new.workspace.existing": "Робоча область…",
|
"session.new.workspace.existing": "Робоча область…",
|
||||||
|
"session.new.git.none": "Немає Git",
|
||||||
"session.new.lastModified": "Востаннє змінено",
|
"session.new.lastModified": "Востаннє змінено",
|
||||||
|
|
||||||
"session.header.search.placeholder": "Пошук {{project}}",
|
"session.header.search.placeholder": "Пошук {{project}}",
|
||||||
|
|||||||
@@ -666,6 +666,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "本地",
|
"session.new.workspace.triggerLocal": "本地",
|
||||||
"session.new.workspace.local": "本地仓库",
|
"session.new.workspace.local": "本地仓库",
|
||||||
"session.new.workspace.existing": "工作区…",
|
"session.new.workspace.existing": "工作区…",
|
||||||
|
"session.new.git.none": "无 Git",
|
||||||
"session.new.lastModified": "最后修改",
|
"session.new.lastModified": "最后修改",
|
||||||
"session.header.search.placeholder": "搜索 {{project}}",
|
"session.header.search.placeholder": "搜索 {{project}}",
|
||||||
"session.header.searchFiles": "搜索文件",
|
"session.header.searchFiles": "搜索文件",
|
||||||
|
|||||||
@@ -663,6 +663,7 @@ export const dict = {
|
|||||||
"session.new.workspace.triggerLocal": "本機",
|
"session.new.workspace.triggerLocal": "本機",
|
||||||
"session.new.workspace.local": "本機儲存庫",
|
"session.new.workspace.local": "本機儲存庫",
|
||||||
"session.new.workspace.existing": "工作區…",
|
"session.new.workspace.existing": "工作區…",
|
||||||
|
"session.new.git.none": "無 Git",
|
||||||
"session.new.lastModified": "最後修改",
|
"session.new.lastModified": "最後修改",
|
||||||
|
|
||||||
"session.header.search.placeholder": "搜尋 {{project}}",
|
"session.header.search.placeholder": "搜尋 {{project}}",
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import { createPromptInputController, createPromptProjectControls } from "@/page
|
|||||||
import { useSessionKey } from "@/pages/session/session-layout"
|
import { useSessionKey } from "@/pages/session/session-layout"
|
||||||
import { useComposerCommands } from "@/pages/session/use-composer-commands"
|
import { useComposerCommands } from "@/pages/session/use-composer-commands"
|
||||||
import { NEW_SESSION_CONTENT_WIDTH } from "@/pages/session/new-session-layout"
|
import { NEW_SESSION_CONTENT_WIDTH } from "@/pages/session/new-session-layout"
|
||||||
import { PromptWorkspaceSelector } from "@/components/prompt-workspace-selector"
|
import { PromptGitStatus, PromptWorkspaceSelector } from "@/components/prompt-workspace-selector"
|
||||||
import { useTitlebarRightMount } from "@/components/titlebar"
|
import { useTitlebarRightMount } from "@/components/titlebar"
|
||||||
import { useCommand } from "@/context/command"
|
import { useCommand } from "@/context/command"
|
||||||
import { useProviders } from "@/hooks/use-providers"
|
import { useProviders } from "@/hooks/use-providers"
|
||||||
@@ -168,24 +168,18 @@ export default function NewSessionPage() {
|
|||||||
<div class="flex-1 min-h-0 overflow-hidden rounded-[10px]">
|
<div class="flex-1 min-h-0 overflow-hidden rounded-[10px]">
|
||||||
<NewSessionDesignView>
|
<NewSessionDesignView>
|
||||||
<div class={NEW_SESSION_CONTENT_WIDTH}>
|
<div class={NEW_SESSION_CONTENT_WIDTH}>
|
||||||
<div class="flex flex-col" classList={{ "gap-8": showWorkspaceBar(), "gap-3": !showWorkspaceBar() }}>
|
<div class="flex flex-col gap-8">
|
||||||
<PromptInputV2Composer controller={promptInputV2Controller} />
|
<PromptInputV2Composer controller={promptInputV2Controller} />
|
||||||
<Show when={projectController.empty()}>
|
<Show when={projectController.empty()}>
|
||||||
<PromptProjectAddButton controller={projectController} />
|
<PromptProjectAddButton controller={projectController} />
|
||||||
</Show>
|
</Show>
|
||||||
<Show when={projectController.selected()}>
|
<Show when={projectController.selected()}>
|
||||||
<div
|
<div class="flex min-h-7 min-w-0 flex-col items-center justify-center gap-0 text-v2-text-text-faint sm:flex-row">
|
||||||
class="flex min-h-7 min-w-0 items-center gap-0 text-v2-text-text-faint"
|
<PromptProjectSelector controller={projectController} placement="bottom" />
|
||||||
classList={{
|
<Show
|
||||||
"flex-col justify-center sm:flex-row": showWorkspaceBar(),
|
when={showWorkspaceBar()}
|
||||||
"justify-start": !showWorkspaceBar(),
|
fallback={<PromptGitStatus branch={selectedBranch()} noGit={sync().project?.vcs !== "git"} />}
|
||||||
}}
|
>
|
||||||
>
|
|
||||||
<PromptProjectSelector
|
|
||||||
controller={projectController}
|
|
||||||
placement={showWorkspaceBar() ? "bottom" : "bottom-start"}
|
|
||||||
/>
|
|
||||||
<Show when={showWorkspaceBar()}>
|
|
||||||
<PromptWorkspaceSelector
|
<PromptWorkspaceSelector
|
||||||
value={newSessionWorktree()}
|
value={newSessionWorktree()}
|
||||||
projectRoot={projectRoot()}
|
projectRoot={projectRoot()}
|
||||||
|
|||||||
Reference in New Issue
Block a user