Merge port/pr-642:AI 生成提交信息(Ctrl+G / 多行提交框 / 可固定生成模型)

无冲突。本分支是「建议提交信息」的唯一实现来源(纯逻辑 src/commit-message.ts +
三条宿主路由 ctx.llm / agentDefaultModel / 设置缝 + CommitModelSettings.tsx +
多行 textarea / Ctrl+G / ✨ 按钮);随后合入的 port/pr-434 只取其 Push/Pull 部分,
434 的重复 suggest 接线/图标/CSS/词典键在那一批里删除。

Co-authored-by: rainmanhhh <13862623+rainmanhhh@users.noreply.github.com>
This commit is contained in:
Menghuan1918andrainmanhhh committed 2026-10-05 02:38:21 +08:00
commit 4c61cc59cd
34 files changed
+2177 -43

No files matched your search

+51
View File
@@ -80,6 +80,42 @@ export interface GitWorktree {
changes: number
}
/** One model a provider advertises (the pinned commit-message dropdown). */
export interface GitModelInfo {
/** Provider-side model id (dispatched verbatim). */
id: string
/** Display name; equals `id` when the adapter reports none. */
name: string
}
/** One provider route with the models its adapter advertises. */
export interface GitModelProvider {
provider: string
name: string
models: GitModelInfo[]
}
/** The model catalog `git.models` answers with. It merges three sources so
* the picker is usable even before a conversation has run:
* - `providers`: the adapters' own catalog (`llm.listModels`),
* - `recent`: routes THIS session already used (newest first),
* - `default`: the harness default selection (`agent-default-model`), which
* exists without any session at all.
* `llm` says whether the harness exposes an LLM surface: an empty catalog is
* then "no adapters registered", not "the route failed". */
export interface GitModelCatalog {
llm: boolean
providers: GitModelProvider[]
recent: GitModelRoute[]
default?: GitModelRoute
}
/** One pinned-model value: the route the host dispatches on. */
export interface GitModelRoute {
provider: string
model: string
}
/** One git log row. */
export interface GitLogEntry {
/** Short hash (7+ chars, display). */
@@ -349,6 +385,21 @@ export const api = {
call<{ ok: true }>('git.unstage', gitPayload(scope, worktree, { ...(path !== undefined ? { path } : {}) })),
gitCommit: (scope: SessionScope, message: string, worktree?: string) =>
call<{ ok: true }>('git.commit', gitPayload(scope, worktree, { message })),
/** Ask the host to generate a commit message from the pending changes: it
* streams the diff through the harness LLM on the pinned route (or the
* conversation's own) and answers with the route actually used.
* `language` follows the sidebar's active locale ('zh' | 'en'). */
gitSuggestMessage: (scope: SessionScope, language: 'zh' | 'en', worktree?: string) =>
call<{ message: string; provider: string; model: string }>('git.suggest-message', gitPayload(scope, worktree, { language })),
/** The discoverable provider/model catalog for the Git card's pinned-route
* setting (advisory; empty when the harness exposes no LLM service). */
gitModels: (scope: SessionScope, signal?: AbortSignal) =>
call<GitModelCatalog>('git.models', scopePayload(scope, {}), signal),
/** The route the NEXT commit-message suggestion would use (pinned → the
* conversation's own → the harness default); absent when none resolves.
* Cheaper than `gitModels`: no catalog discovery. */
gitCommitModel: (scope: SessionScope, signal?: AbortSignal) =>
call<{ route?: GitModelRoute; pinned: boolean }>('git.commit-model', scopePayload(scope, {}), signal),
gitBranch: (scope: SessionScope, worktree?: string, signal?: AbortSignal) =>
call<{ current: string; names: string[] }>('git.branch', gitPayload(scope, worktree, {}), signal),
gitCheckout: (scope: SessionScope, branch: string, worktree?: string) =>
+7
View File
@@ -20,6 +20,7 @@ import { t } from '../locales.ts'
import { openSidebarFile } from '../sidebar-file.ts'
import { EditorHost } from '../EditorHost.tsx'
import { OpenWithSettings } from '../open-with-settings.tsx'
import { CommitModelSettings } from '../changes/CommitModelSettings.tsx'
import { ChangesTab, opCountOf } from '../changes/ChangesTab.tsx'
import { DiffTab } from '../DiffTab.tsx'
import { SubagentView } from '../SubagentView.tsx'
@@ -114,6 +115,12 @@ export function builtinTabs(): readonly TabDescriptor[] {
icon: changesTabIcon,
order: 20,
single: true,
// Custom settings panel (not a declarative toggle row): the pinned
// commit-message model is picked from the DISCOVERED catalog, so the
// option list only exists at render time.
settings: {
render: CommitModelSettings,
},
badge: (_ctx, scope) => {
const count = opCountOf(scope.sessionId)
return count === undefined || count === 0 ? null : count
+257
View File
@@ -0,0 +1,257 @@
/**
* The Git card's pinned-model setting: which provider/model drafts commit
* messages. It renders through the descriptor's `settings.render` seam because
* the option list is DISCOVERED at runtime (`git.models` asks the harness what
* it can serve) — a declarative toggle can only declare a static option set.
*
* Shape: a "follow the conversation" SWITCH plus a searchable `provider/model`
* box. Following is the default (an empty stored value), and it disables the
* box: while the panel tracks the conversation there is nothing to pin. The
* box is a filter over the discovered catalog AND accepts a hand-typed
* `provider/model` route, so a model the harness never advertises stays
* selectable.
*
* The value lives in the descriptor's own plugin-settings blob
* (`pluginSettings.git.commitModel`); empty/absent means "follow".
*/
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'
import { Menu } from '@deepseek-ai/dsh-client-ui-primitives'
import { api, type GitModelCatalog } from '../api.ts'
import { t } from '../locales.ts'
import type { SidebarSettingsRenderProps } from '../service.ts'
import { Notice } from '../ui/index.ts'
import css from './changes.module.css'
/** The plugin-owned setting key (mirrored host-side in src/index.ts). */
export const COMMIT_MODEL_SETTING_KEY = 'commitModel'
/** Cap of the filtered candidate list (a huge catalog stays scrollable). */
const OPTION_LIMIT = 40
/**
* One selectable route. The displayed text IS the route (`provider/model`) —
* the same string the search box filters on and the host dispatches on — so a
* catalog entry and the harness default read identically instead of one being
* a decorated "<provider> · <model>" rendering.
*/
interface ModelOption {
/** The stored and displayed `provider/model` route. */
value: string
/** Source badge text ('' for a plain catalog entry). */
note: string
}
/** The stored `provider/model` route of one option ('' = follow). */
function routeValue(provider: string, model: string): string {
return `${provider}/${model}`
}
/** Build the candidate list: harness default and used routes first, then the
* adapter catalog. De-duplicated by route, newest/most-relevant first. */
function optionsOf(catalog: GitModelCatalog | null): ModelOption[] {
if (catalog === null) return []
const options: ModelOption[] = []
const seen = new Set<string>()
const push = (provider: string, model: string, note: string): void => {
const value = routeValue(provider, model)
if (seen.has(value)) return
seen.add(value)
options.push({ value, note })
}
if (catalog.default !== undefined) {
push(catalog.default.provider, catalog.default.model, t('commitModelDefaultNote'))
}
for (const route of catalog.recent) {
push(route.provider, route.model, t('commitModelRecentNote'))
}
for (const provider of catalog.providers) {
for (const model of provider.models) {
push(provider.provider, model.id, '')
}
}
return options
}
export function CommitModelSettings(props: SidebarSettingsRenderProps) {
const { store, pluginSettings, updatePluginSetting } = props
const sessionId = store.getSnapshot().sessionId
const stored = pluginSettings[COMMIT_MODEL_SETTING_KEY]
const value = typeof stored === 'string' ? stored : ''
const [catalog, setCatalog] = useState<GitModelCatalog | null>(null)
const [error, setError] = useState<string | null>(null)
// Following is the DEFAULT (an empty stored value). The switch keeps its own
// draft so it can be turned off before any model is picked — the stored value
// then stays empty and generation still follows the conversation.
const [follow, setFollow] = useState(value === '')
// The search box is a FILTER, never a projection of the stored value: after
// picking a route it clears, so reopening the menu lists every candidate
// instead of filtering down to the one already selected. The selection
// itself is shown on its own line (below).
const [query, setQuery] = useState('')
const [invalid, setInvalid] = useState(false)
const [open, setOpen] = useState(false)
useEffect(() => {
if (sessionId === undefined) return
let cancelled = false
setError(null)
api.gitModels({ sessionId })
.then(view => { if (!cancelled) setCatalog(view) })
.catch((reason: unknown) => {
if (cancelled) return
setError(reason instanceof Error ? reason.message : String(reason))
})
return () => { cancelled = true }
}, [sessionId])
const inputRef = useRef<HTMLInputElement | null>(null)
const options = useMemo(() => optionsOf(catalog), [catalog])
const needle = query.trim().toLowerCase()
const matches = useMemo(
() => (needle === ''
? options.slice(0, OPTION_LIMIT)
: options.filter(option => option.value.toLowerCase().includes(needle)).slice(0, OPTION_LIMIT)),
[options, needle],
)
const listOpen = open && !follow && matches.length > 0
/**
* The primitives Menu lays its portalled list out from the anchor rect but
* sizes it from CSS (`min-width: 218px`, `max-width: 360px`) — it has no
* "match the anchor width" mode, and its `className` only reaches the root
* wrapper. The list is a direct child of <body> (portal), so it is reachable
* here: while open, pin its width to the input's own width so the dropdown
* is never narrower than the box it drops out of.
*/
useLayoutEffect(() => {
if (!listOpen) return
const sync = (): void => {
const input = inputRef.current
if (input === null) return
const width = Math.round(input.getBoundingClientRect().width)
if (width <= 0) return
const children: Element[] = Array.from(document.body.children)
for (let index = children.length - 1; index >= 0; index--) {
const element = children[index]
if (!(element instanceof HTMLElement) || element.getAttribute('role') !== 'menu') continue
// A floor, never a ceiling: the card may grow past the input to fit a
// long route plus its source badge (the Menu's own max-width caps it).
element.style.minWidth = `${width}px`
element.style.removeProperty('max-width')
return
}
}
sync()
window.addEventListener('resize', sync)
return () => { window.removeEventListener('resize', sync) }
}, [listOpen, matches.length])
/** Commit one typed/clicked route (both halves must be non-empty). */
const commitRoute = (raw: string): boolean => {
const trimmed = raw.trim()
const slash = trimmed.indexOf('/')
const provider = slash <= 0 ? '' : trimmed.slice(0, slash).trim()
const model = slash < 0 ? '' : trimmed.slice(slash + 1).trim()
if (provider === '' || model === '') {
setInvalid(true)
return false
}
setInvalid(false)
setQuery('')
updatePluginSetting(COMMIT_MODEL_SETTING_KEY, routeValue(provider, model))
return true
}
const pick = (option: ModelOption): void => {
// Clear the filter (see the `query` note above) and close.
setQuery('')
setInvalid(false)
setOpen(false)
updatePluginSetting(COMMIT_MODEL_SETTING_KEY, option.value)
}
return (
<div className={css.commitModel}>
<div className={css.commitModelRow}>
<span className={css.commitModelTitle}>{t('commitModelTitle')}</span>
<label className={css.commitModelSwitch}>
<input
type="checkbox"
checked={follow}
onChange={(event) => {
const next = event.currentTarget.checked
setFollow(next)
if (next) {
setQuery('')
setInvalid(false)
updatePluginSetting(COMMIT_MODEL_SETTING_KEY, '')
}
}}
/>
<span>{t('commitModelFollow')}</span>
</label>
</div>
<div className={css.commitModelDesc}>{t('commitModelDesc')}</div>
{/* The candidate menu is PORTALLED (the primitives Menu), like every
other dropdown in the side card: this panel renders inside the
settings modal, whose body clips overflow, so an in-flow or absolute
list would be cut off at the dialog edge. The input itself is the
menu's anchor, so typing filters the open menu in place. */}
<div className={css.commitModelBox}>
{!follow && value !== '' && (
<div className={css.commitModelCurrent}>{t('commitModelCurrent', { route: value })}</div>
)}
<Menu
open={open && !follow && matches.length > 0}
className={css.commitModelMenuRoot}
anchor={(
<input
ref={inputRef}
className={css.commitModelInput}
type="text"
value={query}
disabled={follow}
placeholder={t('commitModelSearchPlaceholder')}
aria-label={t('commitModelSearchPlaceholder')}
onChange={(event) => {
setQuery(event.currentTarget.value)
setInvalid(false)
setOpen(true)
}}
onFocus={() => { setOpen(true) }}
onKeyDown={(event) => {
if (event.key === 'Enter') {
if (commitRoute(event.currentTarget.value)) setOpen(false)
}
if (event.key === 'Escape') setOpen(false)
}}
/>
)}
items={matches.map(option => ({
id: option.value,
label: (
<span className={css.commitModelOption}>
<span className={css.commitModelOptionText}>{option.value}</span>
{option.note !== '' && <span className={css.commitModelOptionNote}>{option.note}</span>}
</span>
),
}))}
selectedId={value === '' ? undefined : value}
onSelect={(id) => {
const option = matches.find(candidate => candidate.value === id)
if (option !== undefined) pick(option)
}}
onClose={() => { setOpen(false) }}
portal
/>
</div>
{invalid && <Notice kind="error" tone="inline">{t('commitModelInvalid')}</Notice>}
{catalog !== null && !catalog.llm && <Notice kind="hint" tone="inline">{t('commitModelUnavailable')}</Notice>}
{catalog !== null && catalog.llm && options.length === 0 && (
<Notice kind="hint" tone="inline">{t('commitModelEmpty')}</Notice>
)}
{error !== null && <Notice kind="error" tone="inline">{error}</Notice>}
</div>
)
}
+127 -17
View File
@@ -26,19 +26,19 @@
* failures used to land under the commit box, which read as "your commit
* failed" for an action the user never ran.
*/
import { memo, useCallback, useEffect, useMemo, useRef, useState, type MouseEvent, type ReactNode } from 'react'
import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type MouseEvent, type ReactNode } from 'react'
import {
Button, IconChevronRightOutlineRegular, IconCodeOutlineRegular, IconCopyOutlineRegular, IconPlusOutlineRegular,
IconTrashOutlineRegular, Input, Menu, writeClipboard,
IconSparkleRegular, IconTrashOutlineRegular, Menu, writeClipboard,
} from '@deepseek-ai/dsh-client-ui-primitives'
import type { Context } from '../../context-types.ts'
import type { GitLogEntry, GitStatusEntry, GitStatusResult, GitWorktree, SessionScope } from '../api.ts'
import { api } from '../api.ts'
import { api, SidebarApiError } from '../api.ts'
import { builtinFileIcon, builtinFolderIcon } from '../file-icons.tsx'
import { usePolling } from '../use-polling.ts'
import { baseName, relativeTo } from '../paths.ts'
import { resolveSidebarPath } from '../paths.ts'
import { relativeTime, t } from '../locales.ts'
import { isZh, relativeTime, t } from '../locales.ts'
import type { SidebarDiffRef, SidebarStore } from '../state.ts'
import {
ConfirmDialog, IconButton, Notice, SectionHeader, StatusBadge, invalidateGitStatus, statusOfXY,
@@ -121,6 +121,12 @@ const LOG_BATCH = 20
* within ~30s, without a second git process per status tick. */
const WORKTREE_POLL_MS = 30_000
/** Commit-box growth contract: one line is 18px with 6px of padding above and
* below (mirrored by `changes.module.css`), and it scrolls past six lines. */
const COMMIT_BOX_LINE_HEIGHT = 18
const COMMIT_BOX_PADDING_Y = 6
const COMMIT_BOX_MAX_ROWS = 6
/** A stable empty entry list: the tree memo must not rebuild on every render
* just because `snapshot?.entries ?? []` minted a new array. */
const NO_ENTRIES: readonly GitStatusEntry[] = []
@@ -296,6 +302,28 @@ export function GitLens(props: GitLensProps) {
const [logFailed, setLogFailed] = useState(false)
const [commitMsg, setCommitMsg] = useState('')
const [busy, setBusy] = useState(false)
/** Whether a commit-message suggestion is being generated host-side (the
* host streams the diff through the harness LLM — no agent is spawned). */
const [suggesting, setSuggesting] = useState(false)
/** The route the next suggestion would use, for the button's tooltip. */
const [commitModel, setCommitModel] = useState<string | undefined>(undefined)
/** Whether a COMMIT is in flight (a subset of `busy`, which also covers
* staging/checkout): the input reports it with its own busy label. */
const [committing, setCommitting] = useState(false)
/** The commit box grows with its text, up to the scroll cap below. */
const commitBoxRef = useRef<HTMLTextAreaElement | null>(null)
useLayoutEffect(() => {
const box = commitBoxRef.current
// A layout-less environment (tests) reports 0: leave the CSS height alone.
if (box === null || box.scrollHeight === 0) return
const max = COMMIT_BOX_LINE_HEIGHT * COMMIT_BOX_MAX_ROWS + COMMIT_BOX_PADDING_Y * 2
// Reset first: a scrollHeight measured against the current height can only
// ever grow, so a deleted line would leave the box too tall.
box.style.height = 'auto'
const next = Math.min(box.scrollHeight, max)
box.style.height = `${next}px`
box.style.overflowY = box.scrollHeight > max ? 'auto' : 'hidden'
}, [commitMsg])
/** The commit bar's ONE status line (commit / stage / discard / revert). */
const [actionError, setActionError] = useState<string | null>(null)
/** The lens-level error banner (refresh / branch switch / history paging). */
@@ -338,6 +366,23 @@ export function GitLens(props: GitLensProps) {
return repoRootRef.current === undefined ? { ...base } : { ...base, repoRoot: repoRootRef.current }
}, [])
/** Label the generate button with the model the next suggestion would use.
* Re-read whenever the panel becomes visible: the pinned route lives in the
* side card settings, so a change made there lands on the next visit. */
const scopeSessionId = scope.sessionId
const scopeCwd = scope.cwd
useEffect(() => {
if (!visible) return
let cancelled = false
api.gitCommitModel({ sessionId: scopeSessionId, ...(scopeCwd === undefined ? {} : { cwd: scopeCwd }) })
.then(view => {
if (cancelled) return
setCommitModel(view.route === undefined ? undefined : `${view.route.provider}/${view.route.model}`)
})
.catch(() => { if (!cancelled) setCommitModel(undefined) })
return () => { cancelled = true }
}, [visible, scopeSessionId, scopeCwd])
// Keep the session cwd and pass the child selection explicitly: an attached
// session overrides client cwd, so changing cwd alone still reads the first
// repository. The status store includes repoRoot in its cache key.
@@ -549,8 +594,39 @@ export function GitLens(props: GitLensProps) {
const commit = (): void => {
const message = commitMsg.trim()
if (message === '' || busy) return
void runAction(() => api.gitCommit(gitScopeNow(), message, selectedWorktree), errorMessage, () => { setCommitMsg('') })
if (message === '' || busy || suggesting) return
setCommitting(true)
void runAction(
() => api.gitCommit(gitScopeNow(), message, selectedWorktree),
errorMessage,
() => { setCommitMsg('') },
).finally(() => { setCommitting(false) })
}
/** The generate button's label/tooltip: names the model when one resolves,
* so the user knows which provider the draft will run on. */
const generateLabel = commitModel === undefined
? t('generateCommitMessage')
: t('generateCommitMessageWith', { model: commitModel })
/** Ask the host to draft a commit message from the pending changes, then
* fill the message box (still editable; regenerating is allowed). */
const suggestMessage = async (): Promise<void> => {
if (busy || suggesting) return
setSuggesting(true)
setActionError(null)
try {
const { message } = await api.gitSuggestMessage(gitScopeNow(), isZh() ? 'zh' : 'en', selectedWorktree)
setCommitMsg(message)
} catch (reason) {
if (reason instanceof SidebarApiError && reason.code === 'git-suggest-empty') {
setActionError(t('suggestCommitEmpty'))
} else {
setActionError(`${t('suggestCommitError')}: ${errorMessage(reason)}`)
}
} finally {
setSuggesting(false)
}
}
/** Switching the selected checkout changes which rows are legitimate to act
@@ -875,20 +951,54 @@ export function GitLens(props: GitLensProps) {
{isRepo && (
<div className={css.commitBar}>
<div className={css.commitRow}>
<Input
className={css.commitInput}
placeholder={t('commitPlaceholder')}
value={commitMsg}
disabled={busy}
onChange={(event) => { setCommitMsg(event.target.value); setActionError(null) }}
onKeyDown={(event) => {
if ((event.ctrlKey || event.metaKey) && event.key === 'Enter') commit()
}}
/>
<span className={css.commitInputWrap}>
{/* A native textarea (the primitives ship no multiline input):
commit messages carry a subject AND a body, and Enter must
insert a newline — submitting stays on Ctrl/Cmd+Enter. */}
<textarea
ref={commitBoxRef}
className={css.commitInput}
// While busy the placeholder steps aside for the sweep label.
placeholder={busy || suggesting ? '' : t('commitPlaceholder')}
value={commitMsg}
disabled={busy || suggesting}
aria-busy={busy || suggesting}
aria-label={t('commitPlaceholder')}
rows={1}
onChange={(event) => { setCommitMsg(event.currentTarget.value); setActionError(null) }}
onKeyDown={(event) => {
if ((event.ctrlKey || event.metaKey) && event.key === 'Enter') commit()
// Ctrl/Cmd+G drafts the message, mirroring the button (the
// placeholder advertises it).
if ((event.ctrlKey || event.metaKey) && (event.key === 'g' || event.key === 'G')) {
event.preventDefault()
void suggestMessage()
}
}}
/>
{/* Only the two per-input operations get a label: other `busy`
work (staging, checkout) disables the box silently. */}
{(suggesting || committing) && (
<span className={css.commitBusyText} role="status" aria-live="polite">
{suggesting ? t('generatingCommitMessage') : t('committingMessage')}
</span>
)}
</span>
<button
type="button"
className={suggesting ? `${css.suggestButton} ${css.suggestBusy}` : css.suggestButton}
aria-label={generateLabel}
aria-busy={suggesting}
title={generateLabel}
disabled={busy || suggesting || (stagedEntries.length === 0 && unstagedEntries.length === 0)}
onClick={() => { void suggestMessage() }}
>
<IconSparkleRegular size={14} />
</button>
<Button
variant="primary"
size="sm"
disabled={busy || commitMsg.trim() === '' || stagedEntries.length === 0}
disabled={busy || suggesting || commitMsg.trim() === '' || stagedEntries.length === 0}
onClick={commit}
>
{t('commit')}
+253 -1
View File
@@ -208,7 +208,259 @@
background: var(--dsw-alias-bg-base);
}
.commitRow { display: flex; align-items: center; gap: 6px; }
.commitInput { flex: 1; min-width: 0; }
/* The commit-message box and its busy overlay: the input keeps its own
flex sizing through a wrapper so the overlay can sit exactly on top of it
while the host generates or commits. */
.commitInputWrap {
position: relative;
display: flex;
flex: 1;
min-width: 0;
}
/* The multiline commit box: a native textarea styled to match the primitives
Input (layer fill, hairline border, brand focus ring). Flex sizing keeps it
inside the row — `width: 100%` would overflow its own padding/border. */
.commitInput {
flex: 1;
min-width: 0;
box-sizing: border-box;
/* One line by default; GitLens grows it with the text (18px per line,
6px vertical padding, six lines before it scrolls). The bounds here are
the stylesheet's half of that contract. */
min-height: 30px;
max-height: 120px;
padding: 6px 8px;
border: 0.5px solid var(--dsw-alias-border-l4);
border-radius: 8px;
background: var(--dsw-alias-bg-layer-1);
color: var(--dsw-alias-label-primary);
font: var(--dsw-font-s-13);
line-height: 18px;
resize: none;
overflow-y: hidden;
}
.commitInput:focus {
outline: none;
border-color: var(--dsw-alias-brand-primary);
}
.commitInput::placeholder {
color: var(--dsw-alias-label-dimmed);
}
.commitInput:disabled {
opacity: 0.5;
}
/* Busy text in the input's place: the running-status sweep used by the side
chat (gradient text scrolled by background-position). The real placeholder
is cleared while busy, so the two never overlap. */
.commitBusyText {
position: absolute;
inset: 0;
display: flex;
align-items: center;
/* Matches the textarea's own padding so the label sits where the text would. */
padding: 6px 8px;
pointer-events: none;
font: var(--dsw-font-xxs-12);
background-image: linear-gradient(
90deg,
var(--dsw-alias-label-tertiary) 0%,
var(--dsw-alias-label-primary) 50%,
var(--dsw-alias-label-tertiary) 100%
);
background-size: 200% 100%;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: commitSweep 2.6s linear infinite;
}
@keyframes commitSweep {
from { background-position: 200% 0; }
to { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
.commitBusyText { animation: none; }
}
/* The AI commit-message button: a quiet square secondary button beside the
input. While the host streams a suggestion it pulses. */
.suggestButton {
flex: none;
display: inline-flex;
align-items: center;
justify-content: center;
width: 26px;
height: 26px;
padding: 0;
border: 1px solid var(--dsw-alias-border-l1);
border-radius: 6px;
background: transparent;
color: var(--dsw-alias-label-secondary);
cursor: pointer;
}
.suggestButton:hover:not(:disabled) {
background: var(--dsw-alias-interactive-bg-hover);
color: var(--dsw-alias-label-primary);
}
.suggestButton:disabled {
opacity: 0.45;
cursor: default;
}
.suggestBusy {
color: var(--dsw-alias-interactive-bg-hover-accent);
animation: commitSuggestPulse 1.2s ease-in-out infinite;
}
@keyframes commitSuggestPulse {
50% { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
.suggestBusy { animation: none; }
}
/* The Git card's pinned-model setting (rendered through settings.render). */
.commitModel {
display: flex;
flex-direction: column;
gap: 4px;
padding: 8px 12px;
}
.commitModelTitle {
font: var(--dsw-font-xxs-strong-12);
color: var(--dsw-alias-label-primary);
}
.commitModelDesc {
font: var(--dsw-font-xxs-12);
color: var(--dsw-alias-label-tertiary);
}
/* Follow-the-conversation switch: a native checkbox (real semantics and
focus) beside its label, matching the side card's switch rows. */
.commitModelRow {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.commitModelSwitch {
display: inline-flex;
align-items: center;
gap: 6px;
font: var(--dsw-font-xxs-12);
color: var(--dsw-alias-label-primary);
cursor: pointer;
}
.commitModelSwitch input {
accent-color: var(--dsw-alias-interactive-bg-hover-accent);
}
/* The searchable route box: the wrapper span the Menu renders around the
input. Its default `.root` is `display: inline-flex`, which shrinks to the
input's intrinsic width — overridden here so the box fills the panel. The
candidate list itself is portalled to <body> (see the component), so its
width is pinned to the input at runtime. */
.commitModelMenuRoot {
display: block;
width: 100%;
}
.commitModelBox {
display: block;
}
/* The stored route, shown on its own line: the search box below stays an empty
filter, so reopening the picker lists every candidate instead of filtering
down to the model that is already selected. */
.commitModelCurrent {
margin-bottom: 4px;
font: var(--dsw-font-xxs-strong-12);
color: var(--dsw-alias-label-primary);
overflow-wrap: anywhere;
}
.commitModelInput {
width: 100%;
box-sizing: border-box;
height: 26px;
padding: 0 6px;
border: 1px solid var(--dsw-alias-border-l2);
border-radius: 6px;
background: var(--dsw-alias-bg-layer-2);
color: var(--dsw-alias-label-primary);
font: var(--dsw-font-xxs-12);
}
.commitModelInput:disabled {
opacity: 0.45;
cursor: default;
}
/* One candidate row inside the portalled Menu: the route text plus its source
badge. The menu shell (background, hover, radius) is the primitive's. */
.commitModelOption {
display: flex;
align-items: center;
gap: 8px;
/* border-box, or `width: 100%` plus the horizontal padding overflows its
label box by 12px — which the Menu's `.itemLabel{overflow:hidden}` then
slices off the trailing badge. */
box-sizing: border-box;
width: 100%;
padding: 4px 6px;
border: none;
border-radius: 4px;
background: transparent;
color: var(--dsw-alias-label-primary);
font: var(--dsw-font-xxs-12);
text-align: left;
cursor: pointer;
}
.commitModelOption:hover {
background: var(--dsw-alias-interactive-bg-hover);
}
/* `flex-basis: auto` (NOT `1`, which is basis 0) matters here: the menu card
is sized shrink-to-fit, and a zero basis makes that intrinsic width ignore
the route text — the card then converges on the input's width alone and the
trailing badge is clipped by the Menu's own `.itemLabel{overflow:hidden}`.
With auto the text contributes its real width, and `min-width: 0` still lets
it ellipsize when the card hits the Menu's max-width. */
.commitModelOptionText {
flex: 1 1 auto;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* The badge keeps its full width under any shrink pressure. */
.commitModelOptionNote {
flex: 0 0 auto;
min-width: max-content;
white-space: nowrap;
color: var(--dsw-alias-label-tertiary);
}
.commitModelHint {
font: var(--dsw-font-xxs-12);
color: var(--dsw-alias-label-tertiary);
}
/* ── History ───────────────────────────────────────────────────────────── */
+17 -1
View File
@@ -179,8 +179,24 @@ export const ar: Record<string, string> = {
unstage: 'إلغاء الإدراج',
stageAll: 'إدراج الكل',
unstageAll: 'إلغاء إدراج الكل',
commitPlaceholder: 'رسالة التثبيت (Ctrl+Enter)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: 'تثبيت',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: 'الفرع',
worktree: 'شجرة العمل',
checkoutError: 'فشل تبديل الفرع',
+17 -1
View File
@@ -164,8 +164,24 @@ export const de: Record<string, string> = {
unstage: 'Unstagen',
stageAll: 'Alle stagen',
unstageAll: 'Alle unstagen',
commitPlaceholder: 'Commit-Nachricht (Ctrl+Enter)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: 'Committen',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: 'Branch',
worktree: 'Worktree',
checkoutError: 'Branchenwechsel fehlgeschlagen',
+17 -1
View File
@@ -171,8 +171,24 @@ export const fr: Record<string, string> = {
unstage: 'Annuler la mise en scène',
stageAll: 'Tout mettre en scène',
unstageAll: 'Tout retirer de la scène',
commitPlaceholder: 'Message de commit (Ctrl+Entrée)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: 'Valider',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: 'Branche',
worktree: 'Arborescence de travail',
checkoutError: 'Échec du changement de branche',
+17 -1
View File
@@ -178,8 +178,24 @@ export const hi: Record<string, string> = {
unstage: 'अनस्टेज',
stageAll: 'सभी स्टेज करें',
unstageAll: 'सभी अनस्टेज करें',
commitPlaceholder: 'कमिट संदेश (Ctrl+Enter)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: 'कमिट',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: 'ब्रांच',
worktree: 'वर्कट्री',
checkoutError: 'ब्रांच स्विच विफल',
+17 -1
View File
@@ -176,8 +176,24 @@ export const id: Record<string, string> = {
unstage: 'Unstage',
stageAll: 'Stage semua',
unstageAll: 'Unstage semua',
commitPlaceholder: 'Pesan commit (Ctrl+Enter)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: 'Commit',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: 'Branch',
worktree: 'Worktree',
checkoutError: 'Beralih branch gagal',
+17 -1
View File
@@ -169,8 +169,24 @@ export const it: Record<string, string> = {
unstage: 'Rimuovi dalla preparazione',
stageAll: 'Prepara tutto',
unstageAll: 'Rimuovi tutto dalla preparazione',
commitPlaceholder: 'Messaggio di commit (Ctrl+Enter)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: 'Commit',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: 'Ramo',
worktree: 'Albero di lavoro',
checkoutError: 'Cambio di ramo non riuscito',
+17 -1
View File
@@ -178,8 +178,24 @@ export const ja: Record<string, string> = {
unstage: 'ステージ解除',
stageAll: 'すべてステージ',
unstageAll: 'すべてステージ解除',
commitPlaceholder: 'コミットメッセージ (Ctrl+Enter)',
commitPlaceholder: 'コミットメッセージ (Ctrl+G で生成、Ctrl+Enter でコミット)',
commit: 'コミット',
generateCommitMessage: 'コミットメッセージを生成',
generateCommitMessageWith: 'コミットメッセージを生成({model} を使用)',
generatingCommitMessage: 'コミットメッセージを生成中…',
committingMessage: 'コミット中…',
suggestCommitError: 'コミットメッセージの生成に失敗',
suggestCommitEmpty: '要約できる変更はありません',
commitModelTitle: 'コミットメッセージ生成モデル',
commitModelDesc: 'コミットメッセージの生成に使うモデルを選択します。既定では現在の会話のモデルに従います。',
commitModelFollow: '会話のモデルに従う',
commitModelSearchPlaceholder: '検索:provider/model を入力',
commitModelCurrent: '現在:{route}',
commitModelInvalid: 'provider/model の形式で入力してください',
commitModelUnavailable: 'この環境にはモデルサービスがありません(現在の会話に従うのみ)',
commitModelEmpty: 'モデルが見つかりません(上の欄に provider/model を直接入力できます)',
commitModelDefaultNote: '既定',
commitModelRecentNote: 'この会話で使用',
branch: 'ブランチ',
worktree: 'ワークツリー',
checkoutError: 'ブランチ切り替えに失敗',
+17 -1
View File
@@ -170,8 +170,24 @@ export const ko: Record<string, string> = {
unstage: '스테이징 해제',
stageAll: '모두 스테이징',
unstageAll: '모두 스테이징 해제',
commitPlaceholder: '커밋 메시지 (Ctrl+Enter)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: '커밋',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: '브랜치',
worktree: '워크트리',
checkoutError: '브랜치 전환 실패',
+17 -1
View File
@@ -176,8 +176,24 @@ export const nl: Record<string, string> = {
unstage: 'Unstagen',
stageAll: 'Alles stagen',
unstageAll: 'Alles unstagen',
commitPlaceholder: 'Commitbericht (Ctrl+Enter)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: 'Commit',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: 'Branch',
worktree: 'Worktree',
checkoutError: 'Wisselen van branch mislukt',
+17 -1
View File
@@ -180,8 +180,24 @@ export const pl: Record<string, string> = {
unstage: 'Usuń z indeksu',
stageAll: 'Dodaj wszystko do indeksu',
unstageAll: 'Usuń wszystko z indeksu',
commitPlaceholder: 'Komunikat commitu (Ctrl+Enter)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: 'Commit',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: 'Gałąź',
worktree: 'Drzewo robocze',
checkoutError: 'Przełączenie gałęzi nie powiodło się',
+17 -1
View File
@@ -161,8 +161,24 @@ export const pt: Record<string, string> = {
unstage: 'Desfazer stage',
stageAll: 'Preparar tudo',
unstageAll: 'Desfazer stage de tudo',
commitPlaceholder: 'Mensagem de commit (Ctrl+Enter)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: 'Commit',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: 'Branch',
worktree: 'Worktree',
checkoutError: 'Falha ao alternar de branch',
+17 -1
View File
@@ -174,8 +174,24 @@ export const ru: Record<string, string> = {
unstage: 'Убрать из индекса',
stageAll: 'Индексировать всё',
unstageAll: 'Убрать всё из индекса',
commitPlaceholder: 'Сообщение коммита (Ctrl+Enter)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: 'Закоммитить',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: 'Ветка',
worktree: 'Рабочее дерево',
checkoutError: 'Сбой переключения ветки',
+17 -1
View File
@@ -161,8 +161,24 @@ export const sv: Record<string, string> = {
unstage: 'Avköa',
stageAll: 'Köa alla',
unstageAll: 'Avköa alla',
commitPlaceholder: 'Commit-meddelande (Ctrl+Enter)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: 'Commit',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: 'Gren',
worktree: 'Arbetsträd',
checkoutError: 'Grenbyte misslyckades',
+17 -1
View File
@@ -178,8 +178,24 @@ export const th: Record<string, string> = {
unstage: 'Unstage',
stageAll: 'Stage ทั้งหมด',
unstageAll: 'Unstage ทั้งหมด',
commitPlaceholder: 'ข้อความ commit (Ctrl+Enter)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: 'Commit',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: 'Branch',
worktree: 'เวิร์กทรี',
checkoutError: 'สลับ branch ล้มเหลว',
+17 -1
View File
@@ -178,8 +178,24 @@ export const tr: Record<string, string> = {
unstage: 'Sahnelemeden kaldır',
stageAll: 'Tümünü sahnele',
unstageAll: 'Tümünü sahnelemeden kaldır',
commitPlaceholder: 'İşleme iletisi (Ctrl+Enter)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: 'İşle',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: 'Dal',
worktree: 'Çalışma ağacı',
checkoutError: 'Dal değiştirme başarısız',
+17 -1
View File
@@ -178,8 +178,24 @@ export const vi: Record<string, string> = {
unstage: 'Unstage',
stageAll: 'Stage tất cả',
unstageAll: 'Unstage tất cả',
commitPlaceholder: 'Thông điệp commit (Ctrl+Enter)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: 'Commit',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: 'Branch',
worktree: 'Worktree',
checkoutError: 'Chuyển branch thất bại',
+17 -1
View File
@@ -193,8 +193,24 @@ export const zhHK: Record<string, string> = {
unstage: '取消暫存',
stageAll: '全部暫存',
unstageAll: '全部取消暫存',
commitPlaceholder: '提交訊息 (Ctrl+Enter)',
commitPlaceholder: '提交訊息 (Ctrl+G 產生,Ctrl+Enter 提交)',
commit: '提交',
generateCommitMessage: '產生提交訊息',
generateCommitMessageWith: '產生提交訊息(使用 {model})',
generatingCommitMessage: '正在產生提交訊息…',
committingMessage: '正在提交…',
suggestCommitError: '產生提交訊息失敗',
suggestCommitEmpty: '目前沒有可提交的變更',
commitModelTitle: '提交訊息產生模型',
commitModelDesc: '選擇產生提交訊息時使用的模型;預設跟隨目前對話使用的模型。',
commitModelFollow: '跟隨目前對話',
commitModelSearchPlaceholder: '搜尋:輸入 provider/model',
commitModelCurrent: '目前:{route}',
commitModelInvalid: '請填寫 provider/model 格式',
commitModelUnavailable: '目前部署未提供模型服務,只能跟隨目前對話',
commitModelEmpty: '未發現可用模型(可於上方直接輸入 provider/model)',
commitModelDefaultNote: '預設',
commitModelRecentNote: '本對話用過',
branch: '分支',
worktree: '工作樹',
checkoutError: '切換分支失敗',
+17 -1
View File
@@ -193,8 +193,24 @@ export const zhMO: Record<string, string> = {
unstage: '取消暫存',
stageAll: '全部暫存',
unstageAll: '全部取消暫存',
commitPlaceholder: '提交訊息 (Ctrl+Enter)',
commitPlaceholder: '提交訊息 (Ctrl+G 產生,Ctrl+Enter 提交)',
commit: '提交',
generateCommitMessage: '產生提交訊息',
generateCommitMessageWith: '產生提交訊息(使用 {model})',
generatingCommitMessage: '正在產生提交訊息…',
committingMessage: '正在提交…',
suggestCommitError: '產生提交訊息失敗',
suggestCommitEmpty: '目前沒有可提交的變更',
commitModelTitle: '提交訊息產生模型',
commitModelDesc: '選擇產生提交訊息時使用的模型;預設跟隨目前對話使用的模型。',
commitModelFollow: '跟隨目前對話',
commitModelSearchPlaceholder: '搜尋:輸入 provider/model',
commitModelCurrent: '目前:{route}',
commitModelInvalid: '請填寫 provider/model 格式',
commitModelUnavailable: '目前部署未提供模型服務,只能跟隨目前對話',
commitModelEmpty: '未發現可用模型(可於上方直接輸入 provider/model)',
commitModelDefaultNote: '預設',
commitModelRecentNote: '本對話用過',
branch: '分支',
worktree: '工作樹',
checkoutError: '切換分支失敗',
+17 -1
View File
@@ -193,8 +193,24 @@ export const zhTW: Record<string, string> = {
unstage: '取消暫存',
stageAll: '全部暫存',
unstageAll: '全部取消暫存',
commitPlaceholder: '提交訊息 (Ctrl+Enter)',
commitPlaceholder: '提交訊息 (Ctrl+G 產生,Ctrl+Enter 提交)',
commit: '提交',
generateCommitMessage: '產生提交訊息',
generateCommitMessageWith: '產生提交訊息(使用 {model})',
generatingCommitMessage: '正在產生提交訊息…',
committingMessage: '正在提交…',
suggestCommitError: '產生提交訊息失敗',
suggestCommitEmpty: '目前沒有可提交的變更',
commitModelTitle: '提交訊息產生模型',
commitModelDesc: '選擇產生提交訊息時使用的模型;預設跟隨目前對話使用的模型。',
commitModelFollow: '跟隨目前對話',
commitModelSearchPlaceholder: '搜尋:輸入 provider/model',
commitModelCurrent: '目前:{route}',
commitModelInvalid: '請填寫 provider/model 格式',
commitModelUnavailable: '目前部署未提供模型服務,只能跟隨目前對話',
commitModelEmpty: '未發現可用模型(可於上方直接輸入 provider/model)',
commitModelDefaultNote: '預設',
commitModelRecentNote: '本對話用過',
branch: '分支',
worktree: '工作樹',
checkoutError: '切換分支失敗',
+34 -2
View File
@@ -189,8 +189,24 @@ export const zh = {
unstage: '取消暂存',
stageAll: '全部暂存',
unstageAll: '全部取消暂存',
commitPlaceholder: '提交信息 (Ctrl+Enter)',
commitPlaceholder: '提交信息 (Ctrl+G 生成,Ctrl+Enter 提交)',
commit: '提交',
generateCommitMessage: '生成提交信息',
generateCommitMessageWith: '生成提交信息(使用 {model})',
generatingCommitMessage: '正在生成提交信息…',
committingMessage: '正在提交…',
suggestCommitError: '生成提交信息失败',
suggestCommitEmpty: '当前没有可提交的改动',
commitModelTitle: '提交信息生成模型',
commitModelDesc: '选择生成提交信息时使用的模型;默认跟随当前对话所用的模型。',
commitModelFollow: '跟随当前对话',
commitModelSearchPlaceholder: '搜索:输入 provider/model',
commitModelCurrent: '当前:{route}',
commitModelInvalid: '请按 provider/model 格式填写',
commitModelUnavailable: '当前部署未暴露模型服务,只能跟随当前对话',
commitModelEmpty: '未发现可用模型(可在上方直接输入 provider/model)',
commitModelDefaultNote: '默认',
commitModelRecentNote: '本会话用过',
branch: '分支',
worktree: '工作树',
checkoutError: '切换分支失败',
@@ -735,8 +751,24 @@ export const en: Record<keyof typeof zh, string> = {
unstage: 'Unstage',
stageAll: 'Stage all',
unstageAll: 'Unstage all',
commitPlaceholder: 'Commit message (Ctrl+Enter)',
commitPlaceholder: 'Commit message (Ctrl+G generate, Ctrl+Enter commit)',
commit: 'Commit',
generateCommitMessage: 'Generate commit message',
generateCommitMessageWith: 'Generate commit message (using {model})',
generatingCommitMessage: 'Generating commit message…',
committingMessage: 'Committing…',
suggestCommitError: 'Failed to generate commit message',
suggestCommitEmpty: 'No pending changes to summarize',
commitModelTitle: 'Commit message model',
commitModelDesc: 'Pick the model that drafts commit messages; by default it follows the model of the current conversation.',
commitModelFollow: 'Follow the conversation',
commitModelSearchPlaceholder: 'Search: type provider/model',
commitModelCurrent: 'Current: {route}',
commitModelInvalid: 'use the provider/model form',
commitModelUnavailable: 'this deployment exposes no model service; only following is possible',
commitModelEmpty: 'No models discovered (type provider/model above instead)',
commitModelDefaultNote: 'default',
commitModelRecentNote: 'used here',
branch: 'Branch',
worktree: 'Worktree',
checkoutError: 'Branch switch failed',