chore: generate

This commit is contained in:
opencode-agent[bot]
2026-05-26 07:51:29 +00:00
parent 13c9d097a0
commit ca354f8e8a
6 changed files with 135 additions and 134 deletions
+121 -119
View File
@@ -1341,8 +1341,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
if (!directory) return if (!directory) return
const key = pathKey(directory) const key = pathKey(directory)
return projects().find( return projects().find(
(project) => (project) => pathKey(project.worktree) === key || project.sandboxes?.some((sandbox) => pathKey(sandbox) === key),
pathKey(project.worktree) === key || project.sandboxes?.some((sandbox) => pathKey(sandbox) === key),
) )
} }
const selectedProject = createMemo(() => projectForDirectory(sdk.directory)) const selectedProject = createMemo(() => projectForDirectory(sdk.directory))
@@ -1376,7 +1375,10 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
return return
} }
void import("@/components/dialog-select-directory").then((x) => { void import("@/components/dialog-select-directory").then((x) => {
dialog.show(() => <x.DialogSelectDirectory onSelect={select} />, () => select(null)) dialog.show(
() => <x.DialogSelectDirectory onSelect={select} />,
() => select(null),
)
}) })
} }
@@ -1465,128 +1467,128 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
[props.class ?? ""]: !!props.class, [props.class ?? ""]: !!props.class,
}} }}
> >
<PromptDragOverlay <PromptDragOverlay
type={store.draggingType} type={store.draggingType}
label={language.t( label={language.t(
store.draggingType === "@mention" ? "prompt.dropzone.file.label" : "prompt.dropzone.label", store.draggingType === "@mention" ? "prompt.dropzone.file.label" : "prompt.dropzone.label",
)} )}
/> />
<PromptContextItems <PromptContextItems
items={contextItems()} items={contextItems()}
active={(item) => { active={(item) => {
const active = comments.active() const active = comments.active()
return !!item.commentID && item.commentID === active?.id && item.path === active?.file return !!item.commentID && item.commentID === active?.id && item.path === active?.file
}} }}
openComment={openComment} openComment={openComment}
remove={(item) => { remove={(item) => {
if (item.commentID) comments.remove(item.path, item.commentID) if (item.commentID) comments.remove(item.path, item.commentID)
prompt.context.remove(item.key) prompt.context.remove(item.key)
}} }}
t={(key) => language.t(key as Parameters<typeof language.t>[0])} t={(key) => language.t(key as Parameters<typeof language.t>[0])}
/> />
<PromptImageAttachments <PromptImageAttachments
attachments={imageAttachments()} attachments={imageAttachments()}
onOpen={(attachment) => onOpen={(attachment) =>
dialog.show(() => <ImagePreview src={attachment.dataUrl} alt={attachment.filename} />) dialog.show(() => <ImagePreview src={attachment.dataUrl} alt={attachment.filename} />)
} }
onRemove={removeAttachment} onRemove={removeAttachment}
removeLabel={language.t("prompt.attachment.remove")} removeLabel={language.t("prompt.attachment.remove")}
/> />
<div <div
class="relative min-h-[52px]" class="relative min-h-[52px]"
onMouseDown={(e) => { onMouseDown={(e) => {
const target = e.target const target = e.target
if (!(target instanceof HTMLElement)) return if (!(target instanceof HTMLElement)) return
if (target.closest('[data-action^="prompt-"]')) return if (target.closest('[data-action^="prompt-"]')) return
editorRef?.focus() editorRef?.focus()
}} }}
> >
<div class="relative max-h-[180px] overflow-y-auto no-scrollbar" ref={(el) => (scrollRef = el)}> <div class="relative max-h-[180px] overflow-y-auto no-scrollbar" ref={(el) => (scrollRef = el)}>
<div <div
data-component="prompt-input" data-component="prompt-input"
ref={(el) => { ref={(el) => {
editorRef = el editorRef = el
props.ref?.(el) props.ref?.(el)
}} }}
role="textbox" role="textbox"
aria-multiline="true" aria-multiline="true"
aria-label={designPlaceholder()} aria-label={designPlaceholder()}
contenteditable="true" contenteditable="true"
autocapitalize={store.mode === "normal" ? "sentences" : "off"} autocapitalize={store.mode === "normal" ? "sentences" : "off"}
autocorrect={store.mode === "normal" ? "on" : "off"} autocorrect={store.mode === "normal" ? "on" : "off"}
spellcheck={store.mode === "normal"} spellcheck={store.mode === "normal"}
inputMode="text" inputMode="text"
// @ts-expect-error // @ts-expect-error
autocomplete="off" autocomplete="off"
onInput={handleInput} onInput={handleInput}
onPaste={handlePaste} onPaste={handlePaste}
onCompositionStart={handleCompositionStart} onCompositionStart={handleCompositionStart}
onCompositionEnd={handleCompositionEnd} onCompositionEnd={handleCompositionEnd}
onBlur={handleBlur} onBlur={handleBlur}
onKeyDown={handleKeyDown} onKeyDown={handleKeyDown}
classList={{ classList={{
"select-text": true, "select-text": true,
"min-h-[52px] w-full px-4 pt-4 pb-2 focus:outline-none whitespace-pre-wrap leading-5 text-[13px] font-[440] text-v2-text-text-faint [font-family:Inter,var(--font-family-sans)]": true, "min-h-[52px] w-full px-4 pt-4 pb-2 focus:outline-none whitespace-pre-wrap leading-5 text-[13px] font-[440] text-v2-text-text-faint [font-family:Inter,var(--font-family-sans)]": true,
"[&_[data-type=file]]:text-syntax-property": true, "[&_[data-type=file]]:text-syntax-property": true,
"[&_[data-type=agent]]:text-syntax-type": true, "[&_[data-type=agent]]:text-syntax-type": true,
"font-mono!": store.mode === "shell", "font-mono!": store.mode === "shell",
}} }}
/> />
<div <div
data-component={newSession() ? "session-new-design-text" : "session-composer-text"} data-component={newSession() ? "session-new-design-text" : "session-composer-text"}
class="absolute top-0 inset-x-0 px-4 pt-4 pointer-events-none whitespace-nowrap truncate leading-5 text-[13px] font-[440] text-v2-text-text-faint [font-family:Inter,var(--font-family-sans)]" class="absolute top-0 inset-x-0 px-4 pt-4 pointer-events-none whitespace-nowrap truncate leading-5 text-[13px] font-[440] text-v2-text-text-faint [font-family:Inter,var(--font-family-sans)]"
classList={{ "font-mono!": store.mode === "shell", hidden: prompt.dirty() }} classList={{ "font-mono!": store.mode === "shell", hidden: prompt.dirty() }}
> >
{designPlaceholder()} {designPlaceholder()}
</div>
</div> </div>
</div> </div>
</div> <div class="flex h-11 items-center px-2">
<div class="flex h-11 items-center px-2"> <div class="flex min-w-0 flex-1 items-center gap-0">
<div class="flex min-w-0 flex-1 items-center gap-0"> {fileAttachmentInput()}
{fileAttachmentInput()} <TooltipKeybind
<TooltipKeybind placement="top"
placement="top" title={language.t("prompt.action.attachFile")}
title={language.t("prompt.action.attachFile")} keybind={command.keybind("file.attach")}
keybind={command.keybind("file.attach")} >
> <IconButton
data-action="prompt-attach"
type="button"
icon="plus"
variant="ghost"
class="size-7 rounded-md p-[6px] text-v2-icon-icon-muted"
style={buttons()}
onClick={pick}
disabled={store.mode !== "normal"}
tabIndex={store.mode === "normal" ? undefined : -1}
aria-label={language.t("prompt.action.attachFile")}
/>
</TooltipKeybind>
<Show when={showAgentControl()}>
<ComposerAgentControl state={agentControlState()} />
</Show>
<Show when={newSession() && !selectedProject()}>
<ComposerPickerTrigger state={newProjectTriggerState()} />
</Show>
<ComposerModelControl state={modelControlState()} />
</div>
<Tooltip placement="top" inactive={!working() && blank()} value={tip()}>
<IconButton <IconButton
data-action="prompt-attach" data-action="prompt-submit"
type="button" type="submit"
icon="plus" disabled={!working() && blank()}
variant="ghost"
class="size-7 rounded-md p-[6px] text-v2-icon-icon-muted"
style={buttons()}
onClick={pick}
disabled={store.mode !== "normal"}
tabIndex={store.mode === "normal" ? undefined : -1} tabIndex={store.mode === "normal" ? undefined : -1}
aria-label={language.t("prompt.action.attachFile")} icon={stopping() ? "stop" : store.mode === "shell" ? "arrow-undo-down" : "arrow-up"}
variant="primary"
class="size-7 rounded-md p-[6px] text-v2-icon-icon-muted shadow-[var(--v2-elevation-button-contrast)] disabled:opacity-50"
style={{
"background-image":
"linear-gradient(180deg,var(--v2-alpha-light-20) 0%,var(--v2-alpha-light-0) 100%),linear-gradient(90deg,var(--v2-background-bg-contrast) 0%,var(--v2-background-bg-contrast) 100%)",
}}
aria-label={stopping() ? language.t("prompt.action.stop") : language.t("prompt.action.send")}
/> />
</TooltipKeybind> </Tooltip>
<Show when={showAgentControl()}>
<ComposerAgentControl state={agentControlState()} />
</Show>
<Show when={newSession() && !selectedProject()}>
<ComposerPickerTrigger state={newProjectTriggerState()} />
</Show>
<ComposerModelControl state={modelControlState()} />
</div> </div>
<Tooltip placement="top" inactive={!working() && blank()} value={tip()}>
<IconButton
data-action="prompt-submit"
type="submit"
disabled={!working() && blank()}
tabIndex={store.mode === "normal" ? undefined : -1}
icon={stopping() ? "stop" : store.mode === "shell" ? "arrow-undo-down" : "arrow-up"}
variant="primary"
class="size-7 rounded-md p-[6px] text-v2-icon-icon-muted shadow-[var(--v2-elevation-button-contrast)] disabled:opacity-50"
style={{
"background-image":
"linear-gradient(180deg,var(--v2-alpha-light-20) 0%,var(--v2-alpha-light-0) 100%),linear-gradient(90deg,var(--v2-background-bg-contrast) 0%,var(--v2-background-bg-contrast) 100%)",
}}
aria-label={stopping() ? language.t("prompt.action.stop") : language.t("prompt.action.send")}
/>
</Tooltip>
</div>
</DockShellForm> </DockShellForm>
<Show when={newSession() && selectedProject()}> <Show when={newSession() && selectedProject()}>
<div class="flex h-7 min-w-0 items-center gap-0 px-2"> <div class="flex h-7 min-w-0 items-center gap-0 px-2">
@@ -7,9 +7,7 @@ export function NewSessionDesignView(props: { children: JSX.Element }) {
<div class="absolute inset-x-0 top-[25.375%] flex justify-center px-6"> <div class="absolute inset-x-0 top-[25.375%] flex justify-center px-6">
<div class="w-full max-w-[720px]"> <div class="w-full max-w-[720px]">
<WordmarkV2 class="h-auto w-full text-v2-icon-icon-base" /> <WordmarkV2 class="h-auto w-full text-v2-icon-icon-base" />
<div class="mt-8"> <div class="mt-8">{props.children}</div>
{props.children}
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -171,7 +171,8 @@ function StatusPopoverView(props: { state: StatusPopoverState }) {
}) })
const popoverProps = { const popoverProps = {
class: "[&_[data-slot=popover-body]]:p-0 w-[360px] max-w-[calc(100vw-40px)] bg-transparent border-0 shadow-none rounded-xl", class:
"[&_[data-slot=popover-body]]:p-0 w-[360px] max-w-[calc(100vw-40px)] bg-transparent border-0 shadow-none rounded-xl",
gutter: 4, gutter: 4,
placement: "bottom-end" as const, placement: "bottom-end" as const,
shift: -168, shift: -168,
@@ -192,7 +193,10 @@ function StatusPopoverView(props: { state: StatusPopoverState }) {
trigger={ trigger={
<div class="relative size-4"> <div class="relative size-4">
<IconV2 name={props.state.shown ? "status-active" : "status"} /> <IconV2 name={props.state.shown ? "status-active" : "status"} />
<div classList={statusDotClass()} class="-top-1 -right-1 size-2 border border-[var(--v2-background-bg-deep)]" /> <div
classList={statusDotClass()}
class="-top-1 -right-1 size-2 border border-[var(--v2-background-bg-deep)]"
/>
</div> </div>
} }
{...popoverProps} {...popoverProps}
+1 -2
View File
@@ -759,8 +759,7 @@ export const dict = {
"settings.general.row.followup.option.queue": "Черга", "settings.general.row.followup.option.queue": "Черга",
"settings.general.row.followup.option.steer": "Керування", "settings.general.row.followup.option.steer": "Керування",
"settings.general.row.showFileTree.title": "Дерево файлів", "settings.general.row.showFileTree.title": "Дерево файлів",
"settings.general.row.showFileTree.description": "settings.general.row.showFileTree.description": "Показувати панель дерева файлів у сесіях на робочому столі",
"Показувати панель дерева файлів у сесіях на робочому столі",
"settings.general.row.showNavigation.title": "Елементи навігації", "settings.general.row.showNavigation.title": "Елементи навігації",
"settings.general.row.showNavigation.description": "Показувати кнопки назад і вперед у заголовку робочого столу", "settings.general.row.showNavigation.description": "Показувати кнопки назад і вперед у заголовку робочого столу",
"settings.general.row.showSearch.title": "Палітра команд", "settings.general.row.showSearch.title": "Палітра команд",
+5 -5
View File
@@ -240,7 +240,10 @@ function HomeDesign() {
/> />
<div class="mt-3 overflow-auto flex-1"> <div class="mt-3 overflow-auto flex-1">
<div class="pt-3 flex flex-col gap-6"> <div class="pt-3 flex flex-col gap-6">
<Show when={!sessionLoad.isLoading} fallback={<HomeSessionSkeleton label={language.t("common.loading")} />}> <Show
when={!sessionLoad.isLoading}
fallback={<HomeSessionSkeleton label={language.t("common.loading")} />}
>
<Show <Show
when={groups().length > 0} when={groups().length > 0}
fallback={ fallback={
@@ -458,10 +461,7 @@ function HomeProjectRow(props: {
<Icon name="edit" size="small" /> <Icon name="edit" size="small" />
{props.language.t("common.edit")} {props.language.t("common.edit")}
</MenuV2.Item> </MenuV2.Item>
<MenuV2.Item <MenuV2.Item disabled={props.unseenCount === 0} onSelect={() => props.clearNotifications(props.project)}>
disabled={props.unseenCount === 0}
onSelect={() => props.clearNotifications(props.project)}
>
<Icon name="circle-check" size="small" /> <Icon name="circle-check" size="small" />
{props.language.t("sidebar.project.clearNotifications")} {props.language.t("sidebar.project.clearNotifications")}
</MenuV2.Item> </MenuV2.Item>
+1 -3
View File
@@ -1799,9 +1799,7 @@ export default function Page() {
</Match> </Match>
<Match when={true}> <Match when={true}>
<Show when={USE_NEW_SESSION_DESIGN} fallback={<NewSessionView worktree={newSessionWorktree()} />}> <Show when={USE_NEW_SESSION_DESIGN} fallback={<NewSessionView worktree={newSessionWorktree()} />}>
<NewSessionDesignView> <NewSessionDesignView>{composerRegion("inline")}</NewSessionDesignView>
{composerRegion("inline")}
</NewSessionDesignView>
</Show> </Show>
</Match> </Match>
</Switch> </Switch>