feat(ui): manage a shared AGENTS.md from one panel

The shared AGENTS.md tab split its controls between a list and a
separate detail page, so connecting a target, editing the file and
fixing drift meant moving between pages and repeating the same
target list twice.

Everything now lives in one panel next to the file list: a short
preview, one switch per target, connect-all and restore-all, and
multi-select with a bulk toolbar. Editing opens a large dialog with
the readers and length warnings beside it. Every change goes through
a confirm dialog, and old detail-page links redirect to the panel.

The delete confirmation no longer says the file is deleted, because
the server only removes it from the list and keeps it on disk.
This commit is contained in:
Willie
2026-09-27 10:45:25 +08:00
parent 86fb63fd4b
commit 5eb1838886
18 changed files with 1263 additions and 928 deletions
+7 -2
View File
@@ -20,7 +20,6 @@ const ResourcesPage = lazy(() => import('./pages/ResourcesPage'));
const ResourceDetailPage = lazy(() => import('./pages/ResourceDetailPage'));
const TargetsPage = lazy(() => import('./pages/TargetsPage'));
const ExtrasPage = lazy(() => import('./pages/ExtrasPage'));
const SharedInstructionPage = lazy(() => import('./pages/SharedInstructionPage'));
const PluginsPage = lazy(() => import('./pages/PluginsPage'));
const MCPPage = lazy(() => import('./pages/MCPPage'));
const SyncPage = lazy(() => import('./pages/SyncPage'));
@@ -49,6 +48,12 @@ function LegacyResourceRedirect() {
return <Navigate to={name ? `${base}/${encodeURIComponent(name)}` : base} replace />;
}
/** A shared AGENTS.md had its own page; it is now selected on the Extras tab. */
function LegacySharedInstructionRedirect() {
const { name = '' } = useParams();
return <Navigate to={`/extras?tab=instructions&file=${encodeURIComponent(name)}`} replace />;
}
/** Filter Studio and the Collect page became tabs and a dialog on the target page. */
function LegacyTargetRedirect() {
const { name } = useParams();
@@ -83,7 +88,7 @@ function AppRoutes() {
<Route path="targets/:name" element={<Lazy><TargetDetailPage /></Lazy>} />
<Route path="targets/:name/filters" element={<LegacyTargetRedirect />} />
<Route path="extras" element={<Lazy><ExtrasPage /></Lazy>} />
<Route path="extras/instructions/:name" element={<Lazy><SharedInstructionPage /></Lazy>} />
<Route path="extras/instructions/:name" element={<LegacySharedInstructionRedirect />} />
<Route path="plugins" element={<Lazy><PluginsPage /></Lazy>} />
<Route path="projects" element={<Lazy><ProjectsPage /></Lazy>} />
<Route path="projects/:root" element={<Lazy><ProjectDetailPage /></Lazy>} />
@@ -1,56 +1,110 @@
import { useState } from 'react';
import { X } from 'lucide-react';
import { useEffect, useRef, useState } from 'react';
import { TriangleAlert, X } from 'lucide-react';
import AgentIcon from '../AgentIcon';
import Button from '../Button';
import CodeEditor from '../CodeEditor';
import ConfirmDialog from '../ConfirmDialog';
import DialogShell from '../DialogShell';
import { useToast } from '../Toast';
import { useT } from '../../i18n';
import { shortenHome } from '../../lib/paths';
import { isImportLine } from './instructionsView';
import { formatSize, isImportLine, lineCount } from './instructionsView';
/** Edits one instruction file in place: a shared file or the project AGENTS.md. */
export default function InstructionsEditorDialog({ title, path, content, note, onSave, onClose }: {
export default function InstructionsEditorDialog({ title, path, content, note, readers, warnings, onSave, onClose }: {
title: string;
path: string;
content: string;
/** Shown under the editor, e.g. who else reads the file. */
/** Shown in the side panel, e.g. who else reads the file. */
note?: string;
/** Targets that read the saved file directly. */
readers?: string[];
/** Problems the side panel should point out, e.g. targets that read only part of the file. */
warnings?: string[];
onSave: (content: string) => Promise<void>;
onClose: () => void;
}) {
const t = useT();
const { toast } = useToast();
const [base, setBase] = useState(content);
const [draft, setDraft] = useState(content);
const [saving, setSaving] = useState(false);
const [reverting, setReverting] = useState(false);
const dirty = draft !== base;
const save = async () => {
if (!dirty || saving) return;
setSaving(true);
try {
await onSave(draft);
setBase(draft);
toast(t('instructions.saved', { path: shortenHome(path) }), 'success');
onClose();
} catch (err) {
toast((err as Error).message, 'error');
} finally {
setSaving(false);
}
};
const saveRef = useRef(save);
saveRef.current = save;
useEffect(() => {
const onKey = (e: KeyboardEvent) => {
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === 's') {
e.preventDefault();
void saveRef.current();
}
};
window.addEventListener('keydown', onKey);
return () => window.removeEventListener('keydown', onKey);
}, []);
return (
<DialogShell open onClose={onClose} padding="none" preventClose={saving} ariaLabel={title} className="!max-w-[860px]">
<DialogShell open onClose={onClose} maxWidth="full" padding="none" preventClose={saving || dirty || reverting} ariaLabel={title}>
<div className="dh">
<div className="flex min-w-0 flex-col gap-1">
<h2 className="ss-h2">{title}</h2>
<h2 className="ss-h2 font-mono">{title}</h2>
<span className="truncate font-mono text-[12.5px] text-ink-3">{shortenHome(path)}</span>
</div>
<button type="button" className="ss-ib" aria-label={t('common.close')} onClick={onClose} disabled={saving}><X size={16} /></button>
</div>
<div className="db">
<CodeEditor value={draft} onChange={setDraft} ariaLabel={title} minHeight="360px" maxHeight="60vh" markLine={isImportLine} disabled={saving} />
{note && <p className="text-[12.5px] text-ink-3">{note}</p>}
<div className="grid grid-cols-[minmax(0,1fr)_300px] items-start gap-6">
<CodeEditor value={draft} onChange={setDraft} ariaLabel={title} minHeight="calc(100vh - 16rem)" maxHeight="calc(100vh - 16rem)" markLine={isImportLine} disabled={saving} />
<aside className="flex flex-col gap-4">
<div className="flex flex-col gap-1.5">
<span className={`ss-st ${dirty ? 'warn' : 'off'}`}>{t(dirty ? 'instructions.editor.modified' : 'instructions.editor.unchanged')}</span>
<span className="text-[13px] text-ink-3">{t('instructions.preview.stats', { lines: lineCount(draft), size: formatSize(new TextEncoder().encode(draft).length) })}</span>
</div>
{readers && readers.length > 0 && (
<div className="flex flex-col gap-2">
<span className="text-[13px] text-ink-2">{t('instructions.editor.readers')}</span>
{readers.map((name) => (
<span key={name} className="flex items-center gap-2.5">
<span className="ss-at !h-6 !w-6"><AgentIcon target={name} size={14} /></span>
<span className="font-mono text-[13px] font-semibold">{name}</span>
</span>
))}
</div>
)}
{warnings?.map((w) => <div key={w} className="ss-note warn"><TriangleAlert size={16} /><span className="flex-1">{w}</span></div>)}
{note && <p className="text-[12.5px] text-ink-3">{note}</p>}
</aside>
</div>
</div>
<div className="df">
<span className="flex-1" />
<Button variant="ghost" onClick={onClose} disabled={saving}>{t('common.cancel')}</Button>
<Button variant="primary" onClick={save} loading={saving} disabled={draft === content}>{t('common.save')}</Button>
<span className="flex-1 text-[12.5px] text-ink-3">{t('instructions.editor.saveHint')}</span>
<Button variant="ghost" onClick={() => setReverting(true)} disabled={!dirty || saving}>{t('config.revert')}</Button>
<Button variant="primary" onClick={() => void save()} loading={saving} disabled={!dirty}>{t('common.save')}</Button>
</div>
<ConfirmDialog
open={reverting}
title={t('config.revert.title')}
message={t('config.revert.message')}
confirmText={t('config.revert.confirmText')}
variant="danger"
onCancel={() => setReverting(false)}
onConfirm={() => { setDraft(base); setReverting(false); }}
/>
</DialogShell>
);
}
@@ -1,134 +1,53 @@
import { useMemo, useState } from 'react';
import { Link } from 'react-router-dom';
import { useState } from 'react';
import type { ReactNode } from 'react';
import { Link, useSearchParams } from 'react-router-dom';
import { useQuery, useQueryClient } from '@tanstack/react-query';
import { ChevronRight, Ellipsis, FilePlus, Link2, Plus, RotateCcw, Search, Upload, X } from 'lucide-react';
import { ChevronDown, ChevronUp, Copy, Ellipsis, FilePlus, Plus, Trash2, TriangleAlert, X } from 'lucide-react';
import { api } from '../../api/client';
import type { SharedInstructionsTarget } from '../../api/client';
import type { SharedInstructionsFile, SharedInstructionsTarget } from '../../api/client';
import AgentIcon from '../AgentIcon';
import Button from '../Button';
import { Checkbox } from '../Checkbox';
import ConfirmDialog from '../ConfirmDialog';
import EmptyState from '../EmptyState';
import { Select } from '../Select';
import { PageSkeleton } from '../Skeleton';
import { SkillContextMenu, type ContextMenuItem } from '../TargetMenu';
import { SkillContextMenu } from '../TargetMenu';
import { useToast } from '../Toast';
import { useT } from '../../i18n';
import { queryKeys } from '../../lib/queryKeys';
import { shortenHome } from '../../lib/paths';
import InstructionsEditorDialog from './InstructionsEditorDialog';
import NewSharedDialog from './NewSharedDialog';
import { overLimit, refreshInstructions, statusTone, worstStatus } from './instructionsView';
import {
connectExtras, connectPlan, connectedTo, formatSize, lineCount, needsSync, refreshInstructions, restorePlan, rowHint, statusTone, usesOf,
} from './instructionsView';
import type { ConnectStep, RestoreStep, RowHint } from './instructionsView';
const OWN = '';
type Menu = { x: number; y: number; items: ContextMenuItem[] };
type Pending = { title: string; message: string; confirm?: string; run: () => Promise<void> };
type Editing = { name: string; file: string; path: string; content: string; count: number };
const PREVIEW_LINES = 8;
type Pending = { title: string; message: ReactNode; confirm: string; danger?: boolean; run: () => Promise<void> };
/** ④ Extras › Instructions (global): shared files on the left as a filter, targets on the right. */
/** ④ Extras › AGENTS.md (global): shared files on the left, the selected file and its targets on the right. */
export default function SharedInstructions({ creating, setCreating }: { creating: boolean; setCreating: (open: boolean) => void }) {
const t = useT();
const { toast } = useToast();
const queryClient = useQueryClient();
const [params, setParams] = useSearchParams();
const { data, error, isPending } = useQuery({ queryKey: queryKeys.instructions.shared, queryFn: () => api.listSharedInstructions() });
const [filter, setFilter] = useState<string | null>(null); // null = all, OWN = own file, else a file name
const [search, setSearch] = useState('');
const [selected, setSelected] = useState<Set<string>>(new Set());
const [menu, setMenu] = useState<Menu | null>(null);
const [pending, setPending] = useState<Pending | null>(null);
const [busy, setBusy] = useState(false);
const [editing, setEditing] = useState<Editing | null>(null);
const files = useMemo(() => data?.files ?? [], [data]);
const targets = useMemo(() => data?.targets ?? [], [data]);
const uses = (tg: SharedInstructionsTarget) => tg.assigned.map((a) => a.name);
const countOf = (f: string) => targets.filter((tg) => (f === OWN ? tg.assigned.length === 0 : uses(tg).includes(f))).length;
const visible = targets.filter((tg) =>
(filter === null || (filter === OWN ? tg.assigned.length === 0 : uses(tg).includes(filter))) &&
(!search.trim() || tg.name.toLowerCase().includes(search.trim().toLowerCase())));
const selectable = visible.filter((tg) => !tg.same_as);
const chosen = targets.filter((tg) => selected.has(tg.name) && !tg.same_as);
const allOn = selectable.length > 0 && selectable.every((tg) => selected.has(tg.name));
const assign = async (names: string[], extras: string[]) => {
setBusy(true);
try {
const res = await api.assignSharedInstructions(names, extras);
if (res.success) toast(t(extras.length ? 'instructions.shared.assigned' : 'instructions.shared.restored', { targets: names.join(', '), files: extras.join(', ') }), 'success');
else res.errors.forEach((e) => toast(e, 'error'));
} catch (err) {
toast((err as Error).message, 'error');
} finally {
refreshInstructions(queryClient);
setBusy(false);
}
};
// Going back to the own file puts the pre-attach backup in place, so ask first.
const restore = (names: string[]) => setPending({
title: t('instructions.restore.title'),
message: t('instructions.restore.message', { targets: names.join(', ') }),
confirm: t('instructions.detail.restore'),
run: () => assign(names, []),
});
const resolve = (name: string, target: string, action: 'collect' | 'reapply') => setPending({
title: t(`instructions.resolve.${action}.title`),
message: t(`instructions.resolve.${action}.message`, { name, target }),
run: async () => {
await api.resolveSharedInstructions(name, target, action);
toast(t(`instructions.resolve.${action}.done`, { name, target }), 'success');
},
});
const rowMenu = (tg: SharedInstructionsTarget): ContextMenuItem[] => [
...tg.assigned.filter((a) => a.status === 'modified').flatMap((a) => [
{ key: `collect-${a.name}`, label: t('instructions.resolve.collect.item', { name: a.name }), icon: <Upload size={14} />, onSelect: () => resolve(a.name, tg.name, 'collect') },
{ key: `reapply-${a.name}`, label: t('instructions.resolve.reapply.item', { name: a.name }), icon: <Link2 size={14} />, onSelect: () => resolve(a.name, tg.name, 'reapply') },
]),
{ key: 'restore', label: t('instructions.shared.restoreOwn'), icon: <RotateCcw size={14} />, onSelect: () => restore([tg.name]) },
];
const openEditor = async (f: { name: string; file: string; path: string }) => {
try {
const res = await api.getSharedInstructionsContent(f.name);
setEditing({ ...f, content: res.content, count: countOf(f.name) });
} catch (err) {
toast((err as Error).message, 'error');
}
};
const openMenu = (e: React.MouseEvent<HTMLButtonElement>, items: ContextMenuItem[]) => {
const r = e.currentTarget.getBoundingClientRect();
setMenu({ x: r.left, y: r.bottom + 4, items });
};
const pick = (name: string | null) => setParams((prev) => {
const next = new URLSearchParams(prev);
if (name) next.set('file', name);
else next.delete('file');
return next;
}, { replace: true });
if (isPending) return <PageSkeleton />;
if (error) return <div className="ss-note bad"><span className="flex-1">{error.message}</span></div>;
const ownLabel = t('instructions.shared.own');
const options = files.map((f) => ({ value: f.name, label: f.name }));
const current = files.find((f) => f.name === filter);
// Same rule as the file's own page: import targets can take one more file,
// link targets only when they are not on another shared file yet.
const addable = current ? targets.filter((tg) => !tg.same_as && !uses(tg).includes(current.name) && (tg.import || tg.assigned.length === 0)) : [];
const filterRow = (key: string | null, label: string, count: number, mono: boolean) => (
<div key={key ?? '__all'} className={`ss-r link !min-h-10 !gap-2 ${filter === key ? 'sel' : ''}`}>
<button type="button" className={`min-w-0 flex-1 truncate text-left text-[13px] ${mono ? 'font-mono' : ''}`} onClick={() => setFilter(key)} aria-pressed={filter === key}>
{label}
</button>
<span className="ss-cnt">{count}</span>
{mono && key && (
<Link to={`/extras/instructions/${encodeURIComponent(key)}`} className="ss-ib !h-6 !w-6" aria-label={t('instructions.shared.open', { name: key })}>
<ChevronRight size={14} />
</Link>
)}
</div>
);
const { files, targets } = data;
const current = files.find((f) => f.name === params.get('file')) ?? files[0];
return (
<>
{files.length === 0 ? (
{!current ? (
<EmptyState
icon={FilePlus}
title={t('instructions.shared.empty.title')}
@@ -136,107 +55,29 @@ export default function SharedInstructions({ creating, setCreating }: { creating
action={<Button variant="primary" onClick={() => setCreating(true)}><Plus size={15} />{t('instructions.shared.new')}</Button>}
/>
) : (
<div className="grid grid-cols-[240px_minmax(0,1fr)] items-start gap-6">
<aside className="flex flex-col gap-2.5">
<div className="ss-sec">
<h2>{t('instructions.shared.files')}</h2>
<span className="ss-cnt">{files.length}</span>
</div>
<div className="ss-list">
{filterRow(null, t('instructions.shared.allTargets'), targets.length, false)}
{files.map((f) => filterRow(f.name, f.name, countOf(f.name), true))}
{filterRow(OWN, ownLabel, countOf(OWN), false)}
</div>
<p className="text-[12.5px] text-ink-3">{t('instructions.shared.filterHint')}</p>
</aside>
<section className="flex min-w-0 flex-col gap-2.5">
<div className="flex items-center gap-3">
<span className="ss-inp w-[240px]">
<Search size={14} className="shrink-0 text-ink-3" />
<input value={search} onChange={(e) => setSearch(e.target.value)} placeholder={t('instructions.shared.search')} aria-label={t('instructions.shared.search')} />
</span>
<span className="text-[13px] text-ink-3">{t(visible.length === 1 ? 'instructions.shared.count.one' : 'instructions.shared.count.other', { count: visible.length })}</span>
<span className="flex-1" />
<span className="ss-tag">global</span>
</div>
{current && (
<div className="ss-box flex items-center gap-3 px-4 py-3">
<span className="flex min-w-0 flex-1 flex-col gap-0.5">
<span className="font-mono text-[14px] font-semibold">{current.name}</span>
<span className="truncate font-mono text-[12px] text-ink-3" title={current.path}>{shortenHome(current.path)}</span>
</span>
{addable.length > 0 && (
<Select className="w-[180px] shrink-0" size="sm" ariaLabel={t('instructions.detail.addTarget')} value="" placeholder={t('instructions.detail.addTarget')}
options={[{ value: '', label: t('instructions.detail.addTarget') }, ...addable.map((tg) => ({ value: tg.name, label: tg.name, icon: <AgentIcon target={tg.name} size={14} /> }))]}
onChange={(v) => { const tg = addable.find((x) => x.name === v); if (tg) void assign([tg.name], [...uses(tg), current.name]); }} disabled={busy} />
)}
<Button variant="secondary" size="sm" onClick={() => void openEditor(current)}>{t('instructions.detail.edit', { file: current.file })}</Button>
<Link to={`/extras/instructions/${encodeURIComponent(current.name)}`} className="ss-btn ghost sm">{t('instructions.shared.open', { name: current.name })}</Link>
</div>
)}
<div className="ss-list">
<div className="ss-lh">
<Checkbox label={t('instructions.shared.selectAll')} hideLabel checked={allOn} indeterminate={!allOn && selectable.some((tg) => selected.has(tg.name))}
onChange={() => setSelected(allOn ? new Set() : new Set(selectable.map((tg) => tg.name)))} disabled={selectable.length === 0} />
<span className="w-[30px]" />
<span className="w-[110px]">{t('instructions.shared.colTarget')}</span>
<span className="flex-1">{t('instructions.shared.colFile')}</span>
<span className="w-[210px]">{t('instructions.shared.colUses')}</span>
<span className="w-[90px]" />
<span className="w-[30px]" />
</div>
{visible.length === 0 && <div className="ss-r text-[13px] text-ink-3">{t(current && !search.trim() ? 'instructions.detail.unused' : 'instructions.shared.noTargets')}</div>}
{visible.map((tg) => {
const status = worstStatus(tg.assigned);
const long = overLimit(tg, files);
const values = uses(tg);
return (
<div key={tg.name} className={`ss-r !min-h-[56px] ${selected.has(tg.name) ? 'sel' : ''}`}>
<Checkbox label={t('instructions.shared.select', { name: tg.name })} hideLabel checked={selected.has(tg.name)} disabled={Boolean(tg.same_as)}
onChange={(on) => { const next = new Set(selected); if (on) next.add(tg.name); else next.delete(tg.name); setSelected(next); }} />
<span className="ss-at"><AgentIcon target={tg.name} size={17} /></span>
<Link to={`/targets/${encodeURIComponent(tg.name)}?tab=instructions`} className="w-[110px] shrink-0 truncate font-mono text-[13px] font-semibold hover:underline">{tg.name}</Link>
<span className="flex min-w-0 flex-1 flex-col gap-0.5">
<span className="truncate font-mono text-[12.5px] text-ink-2" title={tg.path}>{shortenHome(tg.path)}</span>
{tg.same_as && <span className="text-[12px] text-ink-3">{t('instructions.shared.sameAs', { name: tg.same_as })}</span>}
{long.map((f) => <span key={f.name} className="text-[12px] text-warn">{t('instructions.shared.tooLong', { name: f.name, chars: f.chars.toLocaleString(), max: tg.max_chars?.toLocaleString() ?? '' })}</span>)}
</span>
{tg.import ? (
<Select className="w-[210px] shrink-0" size="sm" ariaLabel={t('instructions.shared.uses', { name: tg.name })} values={values} placeholder={ownLabel}
onChangeValues={(next) => (next.length ? void assign([tg.name], next) : restore([tg.name]))} options={options} disabled={busy || Boolean(tg.same_as)} />
) : (
<Select className="w-[210px] shrink-0" size="sm" ariaLabel={t('instructions.shared.uses', { name: tg.name })} value={values[0] ?? OWN}
onChange={(v) => (v === OWN ? restore([tg.name]) : void assign([tg.name], [v]))} options={[{ value: OWN, label: ownLabel }, ...options]} disabled={busy || Boolean(tg.same_as)} />
<div className="grid grid-cols-[220px_minmax(0,1fr)] items-start gap-6">
<nav className="ss-list" aria-label={t('instructions.shared.files')}>
{files.map((f) => {
const using = connectedTo(targets, f.name);
const on = f.name === current.name;
return (
<button key={f.name} type="button" aria-pressed={on} onClick={() => pick(f.name)}
className={`ss-r link w-full !flex-col !items-start !gap-2 !py-3 text-left ${on ? 'sel' : ''}`}>
<span className="max-w-full truncate font-mono text-[13.5px] font-semibold">{f.name}</span>
<span className="flex items-center gap-2">
{using.length > 0 && (
<span className="ss-stack" aria-hidden="true">
{using.slice(0, 5).map((tg) => <span key={tg.name} className="ss-at !h-5 !w-5"><AgentIcon target={tg.name} size={11} /></span>)}
</span>
)}
<span className="w-[90px] shrink-0">{status && <span className={`ss-st ${statusTone(status)}`}>{status}</span>}</span>
{tg.assigned.length > 0 && !tg.same_as ? (
<button type="button" className="ss-ib shrink-0" aria-label={t('instructions.shared.actions', { name: tg.name })} onClick={(e) => openMenu(e, rowMenu(tg))}>
<Ellipsis size={16} />
</button>
) : <span className="w-[30px] shrink-0" />}
</div>
);
})}
<div className="ss-r !min-h-0 !py-2.5 text-[12.5px] text-ink-3">{t('instructions.shared.cursorNote')}</div>
</div>
<p className="text-[12.5px] text-ink-3">{t('instructions.shared.multiHint')}</p>
</section>
</div>
)}
{chosen.length > 0 && (
<div className="ss-bulk" role="toolbar" aria-label={t('instructions.shared.selected', { count: chosen.length })}>
<b>{t('instructions.shared.selected', { count: chosen.length })}</b>
<span className="dv" />
<Button variant="secondary" size="sm" disabled={busy} onClick={(e) => openMenu(e, [
...files.map((f) => ({ key: f.name, label: f.name, onSelect: () => { void assign(chosen.map((tg) => tg.name), [f.name]); setSelected(new Set()); } })),
{ key: '__own', label: ownLabel, onSelect: () => { restore(chosen.map((tg) => tg.name)); setSelected(new Set()); } },
])}>
{t('instructions.shared.changeTo')}
</Button>
<span className="dv" />
<button type="button" className="ss-ib" aria-label={t('instructions.shared.clear')} onClick={() => setSelected(new Set())}><X size={16} /></button>
<span className="text-[12px] text-ink-3">{t(using.length === 1 ? 'instructions.shared.count.one' : 'instructions.shared.count.other', { count: using.length })}</span>
</span>
</button>
);
})}
</nav>
<FilePanel key={current.name} file={current} targets={targets}
onDeleted={() => pick(files.find((f) => f.name !== current.name)?.name ?? null)} />
</div>
)}
@@ -244,44 +85,335 @@ export default function SharedInstructions({ creating, setCreating }: { creating
<NewSharedDialog
targets={targets}
onClose={() => setCreating(false)}
onCreated={(name) => { setCreating(false); setFilter(name); refreshInstructions(queryClient); }}
onCreated={(name) => { setCreating(false); pick(name); refreshInstructions(queryClient); }}
/>
)}
{editing && (
</>
);
}
function FilePanel({ file, targets, onDeleted }: {
file: SharedInstructionsFile;
targets: SharedInstructionsTarget[];
onDeleted: () => void;
}) {
const t = useT();
const { toast } = useToast();
const queryClient = useQueryClient();
const name = file.name;
// Off once deletion starts, so the refresh afterwards does not ask for a file that is gone.
const [deleting, setDeleting] = useState(false);
const content = useQuery({ queryKey: queryKeys.instructions.sharedContent(name), queryFn: () => api.getSharedInstructionsContent(name), enabled: !deleting });
const [expanded, setExpanded] = useState(false);
const [selected, setSelected] = useState<Set<string>>(new Set());
const [menu, setMenu] = useState<{ x: number; y: number } | null>(null);
const [pending, setPending] = useState<Pending | null>(null);
const [busy, setBusy] = useState(false);
const [editing, setEditing] = useState(false);
const connected = connectedTo(targets, name);
const isOn = (tg: SharedInstructionsTarget) => !tg.same_as && usesOf(tg).includes(name);
const selectable = targets.filter((tg) => !tg.same_as);
const chosen = selectable.filter((tg) => selected.has(tg.name));
const allOn = selectable.length > 0 && selectable.every((tg) => selected.has(tg.name));
const connectAll = connectPlan(targets, file);
const restoreAll = restorePlan(targets, name);
const stale = needsSync(targets, name);
const list = (names: string[]) => names.join(t('instructions.shared.listSep'));
// Runs one change with the page busy, reporting failures and refetching afterwards.
const act = async (fn: () => Promise<void>) => {
setBusy(true);
try {
await fn();
} catch (err) {
toast((err as Error).message, 'error');
} finally {
setBusy(false);
refreshInstructions(queryClient);
}
};
const ask = (p: Pending) => setPending(p);
const connect = async (steps: { target: string; extras: string[] }[]) => {
const errors: string[] = [];
const done: string[] = [];
for (const s of steps) {
const res = await api.assignSharedInstructions([s.target], s.extras);
if (res.success) done.push(s.target);
else errors.push(...res.errors);
}
if (done.length) toast(t('instructions.shared.assigned', { targets: list(done), files: name }), 'success');
if (errors.length) throw new Error(errors.join('; '));
};
// Restore takes only this file off each target; an import target keeps its other files.
const detach = async (names: string[]) => {
const errors: string[] = [];
const done: string[] = [];
for (const n of names) {
const res = await api.restoreSharedInstructions(name, n);
if (res.success) done.push(n);
else errors.push(...res.errors);
}
if (done.length) toast(t('instructions.shared.detached', { targets: list(done), name }), 'success');
if (errors.length) throw new Error(errors.join('; '));
};
const toggle = (tg: SharedInstructionsTarget) => {
if (isOn(tg)) {
ask({
title: t('instructions.turnOff.title', { target: tg.name }),
message: t('instructions.turnOff.message', { path: shortenHome(tg.path), name, target: tg.name }),
confirm: t('instructions.detail.restore'),
run: () => detach([tg.name]),
});
} else if (!tg.import && tg.assigned.length > 0) {
const other = tg.assigned[0].name;
ask({
title: t('instructions.switchFrom.title', { target: tg.name, name }),
message: t('instructions.switchFrom.message', { target: tg.name, other }),
confirm: t('instructions.switchFrom.confirm', { name }),
run: () => connect([{ target: tg.name, extras: [name] }]),
});
} else {
void act(() => connect([{ target: tg.name, extras: connectExtras(tg, name) }]));
}
};
const connectNote = (s: ConnectStep) => (s.note === 'switch' ? t('instructions.plan.switch', { other: s.other ?? '', name })
: s.note === 'tooLong' ? t('instructions.plan.tooLong', { max: (s.max ?? 0).toLocaleString() })
: t(`instructions.plan.${s.note}`));
const restoreNote = (s: RestoreStep) => (s.note === 'importKeep' ? t('instructions.plan.importKeep', { name, others: list(s.others ?? []) })
: s.note === 'import' ? t('instructions.plan.dropImport', { name })
: s.note === 'modified' ? t('instructions.plan.modified') : t('instructions.plan.restoreLink'));
const planList = (rows: { target: string; note: string; warn: boolean }[], footer: string) => (
<div className="flex flex-col gap-3">
<div className="ss-list">
{rows.map((r) => (
<div key={r.target} className="ss-r !min-h-11 !gap-2.5 !py-1.5">
<span className="ss-at !h-6 !w-6"><AgentIcon target={r.target} size={14} /></span>
<span className="min-w-0 flex-1 truncate font-mono text-[13px] font-semibold text-ink">{r.target}</span>
<span className={`text-right text-[12.5px] ${r.warn ? 'text-warn' : 'text-ink-3'}`}>{r.note}</span>
</div>
))}
</div>
<p className="text-[13px]">{footer}</p>
</div>
);
const askConnect = (steps: ConnectStep[], confirm: string) => ask({
title: t(steps.length === 1 ? 'instructions.connectAll.title.one' : 'instructions.connectAll.title.other', { count: steps.length, name }),
message: planList(steps.map((s) => ({ target: s.target, note: connectNote(s), warn: s.note === 'switch' || s.note === 'tooLong' })), t('instructions.connectAll.message')),
confirm,
run: () => connect(steps),
});
const askRestore = (steps: RestoreStep[], confirm: string) => ask({
title: t(steps.length === 1 ? 'instructions.restoreAll.title.one' : 'instructions.restoreAll.title.other', { count: steps.length, name }),
message: planList(steps.map((s) => ({ target: s.target, note: restoreNote(s), warn: s.note === 'modified' })), t('instructions.restoreAll.message', { name })),
confirm,
run: () => detach(steps.map((s) => s.target)),
});
const resolve = (tg: SharedInstructionsTarget, action: 'collect' | 'reapply') => ask({
title: t(`instructions.resolve.${action}.title`, { name, target: tg.name }),
message: t(`instructions.resolve.${action}.message`, { name, target: tg.name, count: connected.length }),
confirm: t(`instructions.resolve.${action}.item`, { name }),
run: async () => {
await api.resolveSharedInstructions(name, tg.name, action);
toast(t(`instructions.resolve.${action}.done`, { name, target: tg.name }), 'success');
},
});
const sync = () => act(async () => {
const res = await api.syncExtras({ name });
const failed = res.extras.flatMap((e) => e.targets).find((r) => r.error);
if (failed) throw new Error(failed.error);
toast(t('instructions.shared.synced', { name, targets: list(stale.map((tg) => tg.name)) }), 'success');
});
const remove = () => ask({
title: t('instructions.delete.title', { name }),
message: connected.length
? t('instructions.delete.message', { count: connected.length, targets: list(connected.map((tg) => tg.name)), name })
: t('instructions.delete.unused', { name }),
confirm: t('instructions.detail.delete.confirm'),
danger: true,
run: async () => {
setDeleting(true);
try {
await api.deleteExtra(name);
} catch (err) {
setDeleting(false);
throw err;
}
toast(t('instructions.detail.delete.done', { name }), 'success');
onDeleted();
},
});
const copyPath = async () => {
try {
await navigator.clipboard.writeText(file.path);
toast(t('instructions.shared.pathCopied', { path: shortenHome(file.path) }), 'success');
} catch (err) {
toast((err as Error).message, 'error');
}
};
const hintText = (h: RowHint) => {
switch (h.kind) {
case 'sameAs': return t('instructions.hint.sameAs', { name: h.name });
case 'notSynced': return t(h.mode === 'symlink' ? 'instructions.hint.missingLink' : 'instructions.hint.missingFile');
case 'drift': return h.mode === 'import' ? t('instructions.hint.driftImport') : t('instructions.hint.drift', { name });
case 'noSource': return t('instructions.hint.noSource', { name });
case 'tooLong': return t('instructions.shared.tooLong', { name, chars: file.chars.toLocaleString(), max: h.max.toLocaleString() });
case 'usesOther': return t('instructions.hint.usesOther', { name: h.name });
case 'alsoUses': return t('instructions.hint.alsoUses', { names: list(h.names) });
}
};
const text = content.data?.content ?? '';
const lines = text ? text.replace(/\n$/, '').split('\n') : [];
const bulkOff = chosen.filter((tg) => !isOn(tg));
const bulkOn = chosen.filter(isOn);
return (
<section className="flex min-w-0 flex-col gap-4" aria-label={name}>
<div className="flex items-start gap-3">
<div className="flex min-w-0 flex-1 flex-col gap-1">
<h2 className="truncate font-mono text-[20px] font-bold">{name}</h2>
<span className="truncate font-mono text-[12px] text-ink-3" title={file.path}>{shortenHome(file.path)}</span>
</div>
<Button variant="secondary" size="sm" onClick={() => setEditing(true)} disabled={!content.data}>{t('instructions.shared.edit')}</Button>
<button type="button" className="ss-ib" aria-label={t('instructions.shared.more')} aria-haspopup="menu" aria-expanded={menu !== null}
onClick={(e) => { const r = e.currentTarget.getBoundingClientRect(); setMenu({ x: r.right - 200, y: r.bottom + 4 }); }}>
<Ellipsis size={16} />
</button>
</div>
<div className="ss-list">
<div className="flex h-[38px] items-center gap-2 border-b border-line bg-sunken pr-2 pl-4">
<span className="flex-1 text-[12.5px] text-ink-2">
{content.data ? t('instructions.preview.stats', { lines: lineCount(text), size: formatSize(file.size) }) : '…'}
</span>
{lines.length > PREVIEW_LINES && (
<Button variant="ghost" size="sm" aria-expanded={expanded} onClick={() => setExpanded(!expanded)}>
{t(expanded ? 'instructions.preview.collapse' : 'instructions.preview.expand')}
{expanded ? <ChevronUp size={14} /> : <ChevronDown size={14} />}
</Button>
)}
</div>
{content.error ? (
<div className="px-[18px] py-3 text-[13px] text-bad">{content.error.message}</div>
) : (
<pre className="overflow-x-auto px-[18px] pt-3 pb-3.5 font-mono text-[12.5px] leading-[1.7] whitespace-pre text-ink">
{(expanded ? lines : lines.slice(0, PREVIEW_LINES)).join('\n') || ' '}
{!expanded && lines.length > PREVIEW_LINES && <span className="text-ink-3">{'\n…'}</span>}
</pre>
)}
</div>
<div className="flex items-center gap-2 pt-1.5 pl-4">
<Checkbox label={t('instructions.shared.selectAll')} hideLabel checked={allOn} indeterminate={!allOn && chosen.length > 0}
onChange={() => setSelected(allOn ? new Set() : new Set(selectable.map((tg) => tg.name)))} disabled={selectable.length === 0} />
<h3 className="ml-2 text-[15px] font-bold">{t('instructions.detail.targets')}</h3>
<span className="text-[12.5px] text-ink-3">{t('instructions.shared.connectedCount', { count: connected.length })}</span>
<span className="flex-1" />
{stale.length > 0 && (
<>
<span className="text-[12.5px] text-warn">{t(stale.length === 1 ? 'instructions.shared.needSync.one' : 'instructions.shared.needSync.other', { count: stale.length })}</span>
<Button variant="primary" size="sm" onClick={() => void sync()} loading={busy}>{t('extras.sync')}</Button>
</>
)}
{connectAll.length > 0 && <Button variant="ghost" size="sm" disabled={busy} onClick={() => askConnect(connectAll, t('instructions.shared.connectAll'))}>{t('instructions.shared.connectAll')}</Button>}
{restoreAll.length > 0 && <Button variant="ghost" size="sm" disabled={busy} onClick={() => askRestore(restoreAll, t('instructions.shared.restoreAll'))}>{t('instructions.shared.restoreAll')}</Button>}
</div>
<div className="ss-list">
{targets.map((tg) => {
const on = isOn(tg);
const a = tg.assigned.find((x) => x.name === name);
const hint = rowHint(tg, file);
const label = t('instructions.shared.switch', { target: tg.name, name });
return (
<div key={tg.name} className={`ss-r !block !p-0 ${selected.has(tg.name) ? 'sel' : ''}`}>
<div className="flex min-h-[56px] items-center gap-3 px-4 py-2">
<Checkbox label={t('instructions.shared.select', { name: tg.name })} hideLabel checked={selected.has(tg.name)} disabled={Boolean(tg.same_as)}
onChange={(v) => { const next = new Set(selected); if (v) next.add(tg.name); else next.delete(tg.name); setSelected(next); }} />
<span className="ss-at"><AgentIcon target={tg.name} size={17} /></span>
<Link to={`/targets/${encodeURIComponent(tg.name)}?tab=instructions`} className="w-[110px] shrink-0 truncate font-mono text-[13px] font-semibold hover:underline">{tg.name}</Link>
<span className="flex min-w-0 flex-1 flex-col gap-0.5">
<span className="truncate font-mono text-[12.5px] text-ink-2" title={tg.path}>{shortenHome(tg.path)}</span>
{hint && <span className={`text-[12px] ${hint.kind === 'tooLong' || hint.kind === 'noSource' ? 'text-warn' : 'text-ink-3'}`}>{hintText(hint)}</span>}
</span>
{on && a && <span className="ss-tag shrink-0">{a.mode}</span>}
<span className="w-[90px] shrink-0">{on && a && <span className={`ss-st ${statusTone(a.status)}`}>{a.status}</span>}</span>
<button type="button" role="switch" aria-checked={on} aria-label={label} title={label}
className={`ss-sw ${on ? 'on' : ''} disabled:opacity-50`} disabled={busy || Boolean(tg.same_as)} onClick={() => toggle(tg)}><i /></button>
</div>
{on && a?.status === 'modified' && (
<div className="ss-note warn mr-4 mb-3 ml-[82px] !items-center">
<TriangleAlert size={16} className="!mt-0" />
<span className="flex-1">{t('instructions.row.modified')}</span>
<Button variant="secondary" size="sm" disabled={busy} onClick={() => resolve(tg, 'collect')}>{t('instructions.resolve.collect.item', { name })}</Button>
<Button variant="secondary" size="sm" disabled={busy} onClick={() => resolve(tg, 'reapply')}>{t('instructions.resolve.reapply.item', { name })}</Button>
</div>
)}
</div>
);
})}
</div>
{chosen.length > 0 && (
<div className="ss-bulk" role="toolbar" aria-label={t('instructions.shared.selected', { count: chosen.length })}>
<b>{t('instructions.shared.selectedShort', { count: chosen.length })}</b>
<span className="dv" />
<Button variant="secondary" size="sm" disabled={busy || bulkOff.length === 0} title={bulkOff.length === 0 ? t('instructions.shared.noneOff', { name }) : undefined}
onClick={() => askConnect(connectPlan(bulkOff, file), t('instructions.shared.connect', { name }))}>
{t('instructions.shared.connect', { name })}
</Button>
<Button variant="secondary" size="sm" disabled={busy || bulkOn.length === 0} title={bulkOn.length === 0 ? t('instructions.shared.noneOn', { name }) : undefined}
onClick={() => askRestore(restorePlan(bulkOn, name), t('instructions.detail.restore'))}>
{t('instructions.detail.restore')}
</Button>
<span className="dv" />
<button type="button" className="ss-ib" aria-label={t('instructions.shared.clear')} onClick={() => setSelected(new Set())}><X size={16} /></button>
</div>
)}
{editing && content.data && (
<InstructionsEditorDialog
title={`${editing.name} · ${editing.file}`}
path={editing.path}
content={editing.content}
note={t('instructions.detail.editNote', { count: editing.count })}
title={`${name} · ${file.file}`}
path={file.path}
content={content.data.content}
readers={connected.map((tg) => tg.name)}
warnings={connected.filter((tg) => tg.max_chars && file.chars > tg.max_chars).map((tg) =>
t('instructions.editor.tooLong', { target: tg.name, chars: file.chars.toLocaleString(), max: tg.max_chars!.toLocaleString() }))}
onSave={async (next) => {
await api.putSharedInstructionsContent(editing.name, next);
await api.putSharedInstructionsContent(name, next);
refreshInstructions(queryClient);
}}
onClose={() => setEditing(null)}
onClose={() => setEditing(false)}
/>
)}
<SkillContextMenu open={!!menu} anchorPoint={menu ?? undefined} items={menu?.items ?? []} onClose={() => setMenu(null)} />
<SkillContextMenu open={menu !== null} anchorPoint={menu ?? undefined} onClose={() => setMenu(null)} items={[
{ key: 'copy', label: t('instructions.shared.copyPath'), icon: <Copy size={14} />, onSelect: () => void copyPath() },
{ key: 'delete', label: t('instructions.shared.delete', { name }), icon: <Trash2 size={14} />, danger: true, onSelect: remove },
]} />
<ConfirmDialog
open={pending !== null}
title={pending?.title ?? ''}
message={pending?.message ?? ''}
confirmText={pending?.confirm}
variant={pending?.danger ? 'danger' : 'default'}
loading={busy}
onCancel={() => setPending(null)}
onConfirm={async () => {
const p = pending!;
setBusy(true);
try {
await p.run();
} catch (err) {
toast((err as Error).message, 'error');
} finally {
setBusy(false);
setPending(null);
refreshInstructions(queryClient);
}
await act(p.run);
setPending(null);
if (!p.danger) setSelected(new Set());
}}
/>
</>
</section>
);
}
@@ -171,7 +171,7 @@ function Editor({ data, onChangeSetup }: { data: Data; onChangeSetup: () => void
{shared.map((s, i) => (
<span key={s.name}>
{i > 0 && ', '}
<Link to={`/extras/instructions/${encodeURIComponent(s.name)}`} className="font-mono font-semibold text-ink hover:underline">{s.name}</Link>
<Link to={`/extras?tab=instructions&file=${encodeURIComponent(s.name)}`} className="font-mono font-semibold text-ink hover:underline">{s.name}</Link>
</span>
))}
</span>
@@ -200,7 +200,7 @@ function Editor({ data, onChangeSetup }: { data: Data; onChangeSetup: () => void
<div className="ss-r !min-h-0 !py-2.5 text-[13px] text-ink-2">
<span className="flex-1">
{t('instructions.target.linkedHint')}{' '}
<Link to={`/extras/instructions/${encodeURIComponent(data.link_shared ?? '')}`} className="font-mono font-semibold text-ink hover:underline">{data.link_shared}</Link>
<Link to={`/extras?tab=instructions&file=${encodeURIComponent(data.link_shared ?? '')}`} className="font-mono font-semibold text-ink hover:underline">{data.link_shared}</Link>
</span>
</div>
)}
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest';
import type { SharedInstructionsFile, SharedInstructionsTarget } from '../../api/client';
import { importLines, lineDiff, lineRanges, overLimit, setupPathProblem, sharedNameProblem, worstStatus } from './instructionsView';
import { connectPlan, importLines, lineCount, lineDiff, lineRanges, needsSync, overLimit, restorePlan, rowHint, setupPathProblem, sharedNameProblem, worstStatus } from './instructionsView';
describe('importLines', () => {
it('finds @path lines outside code fences', () => {
@@ -85,3 +85,58 @@ describe('setupPathProblem', () => {
expect(setupPathProblem('.myagent/', true)).toBe('directory');
});
});
describe('connect and restore plans', () => {
const general: SharedInstructionsFile = { name: 'general', file: 'AGENTS.md', path: '/x/general/AGENTS.md', exists: true, size: 7000, chars: 7000, targets: 0 };
const tg = (name: string, rest: Partial<SharedInstructionsTarget> = {}): SharedInstructionsTarget => ({ name, path: `/h/${name}/AGENTS.md`, import: false, exists: true, assigned: [], ...rest });
const claude = tg('claude', { import: true, assigned: [{ name: 'team', mode: 'import', status: 'synced' }] });
const opencode = tg('opencode', { assigned: [{ name: 'team', mode: 'symlink', status: 'synced' }] });
const windsurf = tg('windsurf', { max_chars: 6000 });
const antigravity = tg('antigravity', { same_as: 'gemini' });
it('adds an import line and keeps the other files of an import target', () => {
expect(connectPlan([claude], general)).toEqual([{ target: 'claude', extras: ['team', 'general'], note: 'import' }]);
});
it('replaces a link target on another file and says which', () => {
expect(connectPlan([opencode], general)).toEqual([{ target: 'opencode', extras: ['general'], note: 'switch', other: 'team' }]);
});
it('warns when a target reads less than the file holds', () => {
expect(connectPlan([windsurf], general)[0]).toMatchObject({ note: 'tooLong', max: 6000 });
});
it('never includes targets that read another target\'s file', () => {
expect(connectPlan([antigravity], general)).toEqual([]);
});
it('keeps the other import lines when restoring an import target', () => {
const both = tg('claude', { import: true, assigned: [{ name: 'team', mode: 'import', status: 'synced' }, { name: 'general', mode: 'import', status: 'synced' }] });
expect(restorePlan([both], 'general')).toEqual([{ target: 'claude', note: 'importKeep', others: ['team'] }]);
});
it('warns that outside edits are backed up before restoring', () => {
const edited = tg('gemini', { assigned: [{ name: 'general', mode: 'symlink', status: 'modified' }] });
expect(restorePlan([edited], 'general')).toEqual([{ target: 'gemini', note: 'modified' }]);
});
it('counts only connected targets whose file or link is missing or off as needing sync', () => {
const lost = tg('codex', { assigned: [{ name: 'general', mode: 'symlink', status: 'not synced' }] });
const fine = tg('amp', { assigned: [{ name: 'general', mode: 'symlink', status: 'synced' }] });
expect(needsSync([lost, fine, opencode], 'general').map((t) => t.name)).toEqual(['codex']);
});
it('tells a link target on another file which one it uses now', () => {
expect(rowHint(opencode, general)).toEqual({ kind: 'usesOther', name: 'team' });
});
it('tells an import target which other files it also uses', () => {
expect(rowHint(claude, general)).toEqual({ kind: 'alsoUses', names: ['team'] });
});
});
describe('lineCount', () => {
it('does not count the trailing newline as a line', () => {
expect(lineCount('# A\n\nb\n')).toBe(3);
});
});
@@ -114,3 +114,66 @@ export function overLimit(target: SharedInstructionsTarget, files: SharedInstruc
if (!target.max_chars) return [];
return files.filter((f) => f.chars > target.max_chars! && target.assigned.some((a) => a.name === f.name));
}
/** Names of the shared files a target uses. */
export const usesOf = (target: SharedInstructionsTarget) => target.assigned.map((a) => a.name);
/** Targets connected to a shared file, leaving out ones that only read another target's file. */
export const connectedTo = (targets: SharedInstructionsTarget[], name: string) =>
targets.filter((tg) => !tg.same_as && usesOf(tg).includes(name));
/** What a target should use after connecting it: import targets add one more file, link targets hold one. */
export const connectExtras = (target: SharedInstructionsTarget, name: string) =>
(target.import ? [...usesOf(target).filter((n) => n !== name), name] : [name]);
/** Connected targets a sync would fix: the file or its link is gone, or points elsewhere. */
export const needsSync = (targets: SharedInstructionsTarget[], name: string) =>
connectedTo(targets, name).filter((tg) => ['not synced', 'drift'].includes(tg.assigned.find((a) => a.name === name)!.status));
export type ConnectStep = { target: string; extras: string[]; note: 'import' | 'link' | 'switch' | 'tooLong'; other?: string; max?: number };
/** One step per target that would be connected to file, with what changes for it. */
export function connectPlan(targets: SharedInstructionsTarget[], file: SharedInstructionsFile): ConnectStep[] {
return targets.filter((tg) => !tg.same_as && !usesOf(tg).includes(file.name)).map((tg) => {
const step = { target: tg.name, extras: connectExtras(tg, file.name) };
if (!tg.import && tg.assigned.length > 0) return { ...step, note: 'switch', other: tg.assigned[0].name };
if (tg.max_chars && file.chars > tg.max_chars) return { ...step, note: 'tooLong', max: tg.max_chars };
return { ...step, note: tg.import ? 'import' : 'link' };
});
}
export type RestoreStep = { target: string; note: 'import' | 'importKeep' | 'link' | 'modified'; others?: string[] };
/** One step per target that would stop using name, with what happens to its file. */
export function restorePlan(targets: SharedInstructionsTarget[], name: string): RestoreStep[] {
return connectedTo(targets, name).map((tg) => {
const a = tg.assigned.find((x) => x.name === name)!;
const others = usesOf(tg).filter((n) => n !== name);
if (a.status === 'modified') return { target: tg.name, note: 'modified' };
if (a.mode === 'import') return others.length ? { target: tg.name, note: 'importKeep', others } : { target: tg.name, note: 'import' };
return { target: tg.name, note: 'link' };
});
}
export type RowHint =
| { kind: 'sameAs'; name: string }
| { kind: 'notSynced' | 'drift'; mode: string }
| { kind: 'noSource' }
| { kind: 'tooLong'; max: number }
| { kind: 'usesOther'; name: string }
| { kind: 'alsoUses'; names: string[] };
/** The one line under a target row that says what matters most about it for file. */
export function rowHint(target: SharedInstructionsTarget, file: SharedInstructionsFile): RowHint | null {
if (target.same_as) return { kind: 'sameAs', name: target.same_as };
const a = target.assigned.find((x) => x.name === file.name);
if (a?.status === 'not synced' || a?.status === 'drift') return { kind: a.status === 'drift' ? 'drift' : 'notSynced', mode: a.mode };
if (a?.status === 'no source') return { kind: 'noSource' };
if (target.max_chars && file.chars > target.max_chars) return { kind: 'tooLong', max: target.max_chars };
const others = usesOf(target).filter((n) => n !== file.name);
if (!others.length) return null;
return target.import ? { kind: 'alsoUses', names: others } : { kind: 'usesOther', name: others[0] };
}
/** Line count of a file as an editor shows it: a trailing newline does not start a new line. */
export const lineCount = (content: string) => (content ? content.replace(/\n$/, '').split('\n').length : 0);
+65 -43
View File
@@ -1141,60 +1141,82 @@
"instructions.shared.created": "{name} erstellt.",
"instructions.shared.empty.title": "Noch keine gemeinsame AGENTS.md",
"instructions.shared.empty.description": "Einmal schreiben, und Ziele wie Claude, Codex und Gemini lesen alle dasselbe.",
"instructions.shared.allTargets": "Alle Ziele",
"instructions.shared.own": "Eigene Datei",
"instructions.shared.filterHint": "Klicke auf eine gemeinsame AGENTS.md, um nur die Ziele anzuzeigen, die sie verwenden.",
"instructions.shared.open": "{name} öffnen",
"instructions.shared.search": "Ziele suchen",
"instructions.shared.count.one": "{count} Ziel",
"instructions.shared.count.other": "{count} Ziele",
"instructions.shared.selectAll": "Alle Ziele auswählen",
"instructions.shared.select": "{name} auswählen",
"instructions.shared.colTarget": "Ziel",
"instructions.shared.colFile": "Schreibt nach",
"instructions.shared.colUses": "Verwendet",
"instructions.shared.noTargets": "Hier gibt es keine Ziele.",
"instructions.shared.sameAs": "Liest dieselbe Datei wie {name} und folgt daher {name}",
"instructions.shared.tooLong": "{name} hat {chars} Zeichen; dieses Ziel liest nur die ersten {max}.",
"instructions.shared.uses": "Gemeinsame AGENTS.md, die {name} verwendet",
"instructions.shared.actions": "Aktionen für {name}",
"instructions.shared.restoreOwn": "Eigene Datei wiederherstellen",
"instructions.shared.cursorNote": "cursor wird nicht aufgeführt: Seine User Rules liegen in den Einstellungen von Cursor, nicht in einer Datei.",
"instructions.shared.multiHint": "Ziele, die @imports folgen, können mehrere gemeinsame Dateien verwenden; jede fügt ihrer Datei eine Zeile hinzu. Andere Ziele verwenden eine, verknüpft anstelle ihrer Datei.",
"instructions.shared.selected": "{count} ausgewählt",
"instructions.shared.changeTo": "Ändern zu…",
"instructions.shared.clear": "Auswahl aufheben",
"instructions.shared.assigned": "{targets} verwenden jetzt {files}.",
"instructions.shared.restored": "{targets} verwenden wieder ihre eigenen Dateien.",
"instructions.resolve.collect.title": "Zurückholen",
"instructions.resolve.collect.item": "In {name} zurückholen",
"instructions.resolve.collect.message": "Die Änderungen in der Datei von {target} gehen in {name} ein, und jedes Ziel, das {name} verwendet, erhält sie. Die aktuelle {name} wird vorher gesichert.",
"instructions.resolve.collect.done": "Änderungen von {target} in {name} zurückgeholt.",
"instructions.resolve.reapply.title": "Erneut anwenden",
"instructions.resolve.reapply.item": "{name} erneut anwenden",
"instructions.resolve.reapply.message": "Die bearbeitete Datei von {target} wird gesichert und dann wieder mit {name} verknüpft.",
"instructions.resolve.reapply.done": "{target} wieder mit {name} verknüpft.",
"instructions.detail.notFound": "Keine gemeinsame AGENTS.md namens {name}",
"instructions.detail.back": "Zurück zu AGENTS.md",
"instructions.detail.edit": "{file} bearbeiten",
"instructions.shared.listSep": ", ",
"instructions.shared.edit": "Bearbeiten",
"instructions.shared.more": "Weitere Aktionen",
"instructions.shared.copyPath": "Dateipfad kopieren",
"instructions.shared.pathCopied": "{path} kopiert.",
"instructions.shared.delete": "{name} löschen",
"instructions.delete.title": "{name} löschen?",
"instructions.delete.message": "Die {count} Ziele, die es nutzen ({targets}), kehren zuerst zu ihren eigenen Dateien zurück. {name} verschwindet aus der Liste; die Datei selbst bleibt, wo sie ist.",
"instructions.delete.unused": "Kein Ziel nutzt {name}. Es verschwindet aus der Liste; die Datei selbst bleibt, wo sie ist.",
"instructions.preview.stats": "{lines} Zeilen · {size}",
"instructions.preview.expand": "Alles anzeigen",
"instructions.preview.collapse": "Einklappen",
"instructions.shared.connectedCount": "{count} verbunden",
"instructions.shared.needSync.one": "{count} Ziel muss synchronisiert werden",
"instructions.shared.needSync.other": "{count} Ziele müssen synchronisiert werden",
"instructions.shared.synced": "{name} mit {targets} synchronisiert.",
"instructions.shared.connectAll": "Alle verbinden",
"instructions.shared.restoreAll": "Alle wiederherstellen",
"instructions.shared.connect": "{name} verbinden",
"instructions.shared.selectedShort": "{count} ausgewählt",
"instructions.shared.noneOff": "Alle ausgewählten Ziele verwenden {name} bereits",
"instructions.shared.noneOn": "Keines der ausgewählten Ziele verwendet {name}",
"instructions.shared.switch": "{target} verwendet {name}",
"instructions.shared.detached": "{targets} verwenden {name} nicht mehr.",
"instructions.turnOff.title": "{target} auf die eigene Datei zurücksetzen?",
"instructions.turnOff.message": "{path} wird wieder so, wie es vor dem Verbinden von {name} war. Spätere Änderungen an {name} erreichen {target} nicht mehr.",
"instructions.switchFrom.title": "{target} auf {name} umstellen?",
"instructions.switchFrom.message": "{target} kann nur eine Datei gleichzeitig verwenden und nutzt gerade {other}. Nach dem Wechsel gilt {other} nicht mehr für {target}.",
"instructions.switchFrom.confirm": "Zu {name} wechseln",
"instructions.plan.import": "Fügt eine Import-Zeile hinzu",
"instructions.plan.link": "Durch einen Link ersetzt",
"instructions.plan.switch": "Wechselt von {other} zu {name}",
"instructions.plan.tooLong": "Liest nur die ersten {max} Zeichen",
"instructions.plan.importKeep": "Entfernt die Import-Zeile von {name}; {others} bleiben",
"instructions.plan.dropImport": "Entfernt die Import-Zeile von {name}",
"instructions.plan.restoreLink": "Bekommt die ursprüngliche Datei zurück",
"instructions.plan.modified": "Änderungen von außen werden zuerst gesichert",
"instructions.connectAll.title.one": "{count} Ziel mit {name} verbinden?",
"instructions.connectAll.title.other": "{count} Ziele mit {name} verbinden?",
"instructions.connectAll.message": "Die aktuelle Datei jedes Ziels wird zuerst gesichert, sodass du sie später einzeln wiederherstellen kannst.",
"instructions.restoreAll.title.one": "{name} in {count} Ziel nicht mehr verwenden?",
"instructions.restoreAll.title.other": "{name} in {count} Zielen nicht mehr verwenden?",
"instructions.restoreAll.message": "Jedes Ziel wird wieder so, wie es vor dem Verbinden von {name} war.",
"instructions.hint.sameAs": "Liest dieselbe Datei wie {name}",
"instructions.hint.missingLink": "Der Link fehlt; eine Synchronisierung stellt ihn wieder her.",
"instructions.hint.missingFile": "Die Datei fehlt; eine Synchronisierung stellt sie wieder her.",
"instructions.hint.driftImport": "Die Import-Zeile fehlt; eine Synchronisierung fügt sie wieder hinzu.",
"instructions.hint.drift": "Stimmt nicht mehr mit {name} überein; eine Synchronisierung stellt es wieder her.",
"instructions.hint.noSource": "Die Datei {name} selbst fehlt.",
"instructions.hint.usesOther": "Verwendet gerade {name}",
"instructions.hint.alsoUses": "Verwendet auch {names}",
"instructions.row.modified": "Diese Datei wurde außerhalb von skillshare geändert und noch nicht zurück synchronisiert.",
"instructions.editor.modified": "Geändert",
"instructions.editor.unchanged": "Keine Änderungen",
"instructions.editor.readers": "Nach dem Speichern lesen diese Ziele den neuen Inhalt sofort:",
"instructions.editor.tooLong": "{target} liest nur die ersten {max} Zeichen; diese Datei hat {chars}.",
"instructions.editor.saveHint": "Mit ⌘S (Strg+S) speichern.",
"instructions.resolve.collect.title": "Änderungen von {target} in {name} übernehmen?",
"instructions.resolve.collect.item": "In {name} übernehmen",
"instructions.resolve.collect.message": "{name} wird durch den aktuellen Inhalt von {target} ersetzt, und alle {count} mit {name} verbundenen Ziele lesen ihn. Die aktuelle {name} wird vorher gesichert.",
"instructions.resolve.collect.done": "Änderungen von {target} in {name} übernommen.",
"instructions.resolve.reapply.title": "{target} mit {name} überschreiben?",
"instructions.resolve.reapply.item": "Mit {name} überschreiben",
"instructions.resolve.reapply.message": "Was in {target} außerhalb von skillshare geändert wurde, wird zuerst gesichert, dann kommt {name} zurück. Andere Ziele sind nicht betroffen.",
"instructions.resolve.reapply.done": "{target} mit {name} überschrieben.",
"instructions.detail.targets": "Ziele",
"instructions.detail.addTarget": "Ziel hinzufügen",
"instructions.detail.colWrites": "Schreibt nach",
"instructions.detail.unused": "Noch verwendet kein Ziel diese Datei.",
"instructions.detail.how.import": "Fügt eine Zeile @{path} hinzu und behält deinen eigenen Inhalt",
"instructions.detail.how.link": "Durch einen Link auf {path} ersetzt; das Original wurde gesichert",
"instructions.detail.how.modified": "Der Link wurde durch eine normale Datei mit anderem Inhalt ersetzt",
"instructions.detail.modified": "Jemand hat {path} direkt bearbeitet. Welche Seite möchtest du behalten?",
"instructions.detail.modifiedHint": "Zurückholen: Die Änderung geht in {name} ein und jedes Ziel erhält sie. Erneut anwenden: Die Änderung wird verworfen (vorher gesichert) und der Link kehrt zurück.",
"instructions.detail.restore": "Wiederherstellen",
"instructions.detail.restored": "{name} verwendet wieder seine eigene Datei.",
"instructions.detail.restoreHint": "Wiederherstellen versetzt ein Ziel in den Zustand vor der Verwendung von {name}: Die Sicherung kehrt zurück, oder die Datei wird entfernt, falls es keine gab.",
"instructions.restore.title": "Zur eigenen Datei zurückkehren?",
"instructions.restore.message": "{targets} wird auf den Stand vor dem Anhängen der gemeinsamen AGENTS.md zurückgesetzt: Das Backup wird wiederhergestellt, oder die Datei wird entfernt, falls es keine gab. Die gemeinsame AGENTS.md selbst bleibt erhalten.",
"instructions.detail.synced": "{name} synchronisiert.",
"instructions.detail.editNote": "Jedes Ziel, das diese Datei verwendet, liest die Änderung (derzeit {count}).",
"instructions.detail.delete.title": "Gemeinsame AGENTS.md löschen",
"instructions.detail.delete.message": "{name} wird aus der Konfiguration entfernt und seine {count} Ziele erhalten ihre eigenen Dateien zurück. Die Datei selbst bleibt im extras-Ordner.",
"instructions.detail.delete.confirm": "Löschen",
"instructions.detail.delete.done": "{name} gelöscht.",
"instructions.project.tracked": "mit dem repo versioniert",
+64 -42
View File
@@ -1141,60 +1141,82 @@
"instructions.shared.created": "Created {name}.",
"instructions.shared.empty.title": "No shared AGENTS.md yet",
"instructions.shared.empty.description": "Write it once, and targets like Claude, Codex and Gemini all read the same thing.",
"instructions.shared.allTargets": "All targets",
"instructions.shared.own": "Own file",
"instructions.shared.filterHint": "Click a shared AGENTS.md to list only the targets that use it.",
"instructions.shared.open": "Open {name}",
"instructions.shared.search": "Search targets",
"instructions.shared.count.one": "{count} target",
"instructions.shared.count.other": "{count} targets",
"instructions.shared.selectAll": "Select all targets",
"instructions.shared.select": "Select {name}",
"instructions.shared.colTarget": "Target",
"instructions.shared.colFile": "Writes to",
"instructions.shared.colUses": "Uses",
"instructions.shared.noTargets": "No targets here.",
"instructions.shared.sameAs": "Reads the same file as {name}, so it follows {name}",
"instructions.shared.tooLong": "{name} has {chars} characters; this target reads only the first {max}.",
"instructions.shared.uses": "Shared AGENTS.md files {name} uses",
"instructions.shared.actions": "Actions for {name}",
"instructions.shared.restoreOwn": "Restore its own file",
"instructions.shared.cursorNote": "cursor isn't listed: its user rules live in Cursor's settings, not in a file.",
"instructions.shared.multiHint": "Targets that follow @imports can use several shared files; each adds one line to their file. Other targets use one, linked in place of their file.",
"instructions.shared.selected": "{count} selected",
"instructions.shared.changeTo": "Change to…",
"instructions.shared.clear": "Clear selection",
"instructions.shared.assigned": "{targets} now use {files}.",
"instructions.shared.restored": "{targets} use their own files again.",
"instructions.resolve.collect.title": "Collect back",
"instructions.resolve.collect.item": "Collect back into {name}",
"instructions.resolve.collect.message": "The changes made in {target}'s file go into {name}, and every target using {name} gets them. The current {name} is backed up first.",
"instructions.shared.listSep": ", ",
"instructions.shared.edit": "Edit",
"instructions.shared.more": "More actions",
"instructions.shared.copyPath": "Copy file path",
"instructions.shared.pathCopied": "Copied {path}.",
"instructions.shared.delete": "Delete {name}",
"instructions.delete.title": "Delete {name}?",
"instructions.delete.message": "The {count} targets using it ({targets}) go back to their own files first. {name} leaves the list; the file itself stays where it is.",
"instructions.delete.unused": "No target uses {name}. It leaves the list; the file itself stays where it is.",
"instructions.preview.stats": "{lines} lines · {size}",
"instructions.preview.expand": "Show all",
"instructions.preview.collapse": "Collapse",
"instructions.shared.connectedCount": "{count} connected",
"instructions.shared.needSync.one": "{count} target needs a sync",
"instructions.shared.needSync.other": "{count} targets need a sync",
"instructions.shared.synced": "Synced {name} to {targets}.",
"instructions.shared.connectAll": "Connect all",
"instructions.shared.restoreAll": "Restore all",
"instructions.shared.connect": "Connect {name}",
"instructions.shared.selectedShort": "{count} selected",
"instructions.shared.noneOff": "Every selected target already uses {name}",
"instructions.shared.noneOn": "None of the selected targets uses {name} yet",
"instructions.shared.switch": "{target} uses {name}",
"instructions.shared.detached": "{targets} no longer use {name}.",
"instructions.turnOff.title": "Put {target} back on its own file?",
"instructions.turnOff.message": "{path} goes back to how it was before {name} was connected. Later changes to {name} no longer reach {target}.",
"instructions.switchFrom.title": "Switch {target} to {name}?",
"instructions.switchFrom.message": "{target} can use only one file at a time and uses {other} now. After switching, {other} no longer applies to {target}.",
"instructions.switchFrom.confirm": "Switch to {name}",
"instructions.plan.import": "Adds an import line",
"instructions.plan.link": "Replaced by a link",
"instructions.plan.switch": "Switches from {other} to {name}",
"instructions.plan.tooLong": "Reads only the first {max} characters",
"instructions.plan.importKeep": "Removes the {name} import line; {others} stay",
"instructions.plan.dropImport": "Removes the {name} import line",
"instructions.plan.restoreLink": "Gets its original file back",
"instructions.plan.modified": "Outside edits are backed up first",
"instructions.connectAll.title.one": "Connect {count} target to {name}?",
"instructions.connectAll.title.other": "Connect {count} targets to {name}?",
"instructions.connectAll.message": "Each target's current file is backed up first, so you can restore them one by one later.",
"instructions.restoreAll.title.one": "Stop using {name} in {count} target?",
"instructions.restoreAll.title.other": "Stop using {name} in {count} targets?",
"instructions.restoreAll.message": "Each target goes back to how it was before {name} was connected.",
"instructions.hint.sameAs": "Reads the same file as {name}",
"instructions.hint.missingLink": "The link is gone; a sync puts it back.",
"instructions.hint.missingFile": "The file is gone; a sync puts it back.",
"instructions.hint.driftImport": "The import line is gone; a sync adds it back.",
"instructions.hint.drift": "No longer matches {name}; a sync puts it back.",
"instructions.hint.noSource": "The {name} file itself is missing.",
"instructions.hint.usesOther": "Uses {name} now",
"instructions.hint.alsoUses": "Also uses {names}",
"instructions.row.modified": "This file was changed outside skillshare and has not been synced back.",
"instructions.editor.modified": "Modified",
"instructions.editor.unchanged": "No changes",
"instructions.editor.readers": "After saving, these targets read the new content right away:",
"instructions.editor.tooLong": "{target} reads only the first {max} characters; this file has {chars}.",
"instructions.editor.saveHint": "Press ⌘S (Ctrl+S) to save.",
"instructions.resolve.collect.title": "Collect {target}'s changes into {name}?",
"instructions.resolve.collect.item": "Collect into {name}",
"instructions.resolve.collect.message": "{name} is replaced with {target}'s current content, and all {count} targets connected to {name} read it. The current {name} is backed up first.",
"instructions.resolve.collect.done": "Collected {target}'s changes into {name}.",
"instructions.resolve.reapply.title": "Reapply",
"instructions.resolve.reapply.item": "Reapply {name}",
"instructions.resolve.reapply.message": "{target}'s edited file is backed up, then linked to {name} again.",
"instructions.resolve.reapply.done": "Linked {target} to {name} again.",
"instructions.detail.notFound": "No shared AGENTS.md named {name}",
"instructions.detail.back": "Back to AGENTS.md",
"instructions.detail.edit": "Edit {file}",
"instructions.resolve.reapply.title": "Overwrite {target} with {name}?",
"instructions.resolve.reapply.item": "Overwrite with {name}",
"instructions.resolve.reapply.message": "What was changed in {target} outside skillshare is backed up first, then {name} comes back. Other targets are not affected.",
"instructions.resolve.reapply.done": "Overwrote {target} with {name}.",
"instructions.detail.targets": "Targets",
"instructions.detail.addTarget": "Add target",
"instructions.detail.colWrites": "Writes to",
"instructions.detail.unused": "No target uses this file yet.",
"instructions.detail.how.import": "Adds one line @{path} and keeps your own content",
"instructions.detail.how.link": "Replaced by a link to {path}; the original was backed up",
"instructions.detail.how.modified": "The link was replaced by a regular file with different content",
"instructions.detail.modified": "Someone edited {path} directly. Which side do you keep?",
"instructions.detail.modifiedHint": "Collect back: the edit goes into {name} and every target gets it. Reapply: the edit is dropped (backed up first) and the link comes back.",
"instructions.detail.restore": "Restore",
"instructions.detail.restored": "{name} is back to its own file.",
"instructions.detail.restoreHint": "Restore puts a target back as it was before it used {name}: the backup comes back, or the file is removed if there was none.",
"instructions.restore.title": "Go back to the own file?",
"instructions.restore.message": "{targets} will return to how it was before the shared AGENTS.md was attached: the backup is put back, or the file is removed if there was none. The shared AGENTS.md itself is kept.",
"instructions.detail.synced": "Synced {name}.",
"instructions.detail.editNote": "Every target that uses this file reads the change ({count} now).",
"instructions.detail.delete.title": "Delete shared AGENTS.md",
"instructions.detail.delete.message": "{name} is removed from the config and its {count} targets get their own files back. The file itself stays in the extras folder.",
"instructions.detail.delete.confirm": "Delete",
"instructions.detail.delete.done": "Deleted {name}.",
"instructions.project.tracked": "tracked with the repo",
+65 -43
View File
@@ -1141,60 +1141,82 @@
"instructions.shared.created": "Se creó {name}.",
"instructions.shared.empty.title": "Aún no hay ningún AGENTS.md compartido",
"instructions.shared.empty.description": "Escríbelo una vez y destinos como Claude, Codex y Gemini leerán lo mismo.",
"instructions.shared.allTargets": "Todos los destinos",
"instructions.shared.own": "Archivo propio",
"instructions.shared.filterHint": "Haz clic en un AGENTS.md compartido para ver solo los destinos que lo usan.",
"instructions.shared.open": "Abrir {name}",
"instructions.shared.search": "Buscar destinos",
"instructions.shared.count.one": "{count} destino",
"instructions.shared.count.other": "{count} destinos",
"instructions.shared.selectAll": "Seleccionar todos los destinos",
"instructions.shared.select": "Seleccionar {name}",
"instructions.shared.colTarget": "Destino",
"instructions.shared.colFile": "Escribe en",
"instructions.shared.colUses": "Usa",
"instructions.shared.noTargets": "No hay destinos aquí.",
"instructions.shared.sameAs": "Lee el mismo archivo que {name}, así que sigue a {name}",
"instructions.shared.tooLong": "{name} tiene {chars} caracteres; este destino solo lee los primeros {max}.",
"instructions.shared.uses": "AGENTS.md compartidos que usa {name}",
"instructions.shared.actions": "Acciones para {name}",
"instructions.shared.restoreOwn": "Restaurar su propio archivo",
"instructions.shared.cursorNote": "cursor no aparece: sus reglas de usuario están en la configuración de Cursor, no en un archivo.",
"instructions.shared.multiHint": "Los destinos que siguen los @imports pueden usar varios archivos compartidos; cada uno añade una línea a su archivo. Los demás destinos usan uno, vinculado en lugar de su archivo.",
"instructions.shared.selected": "{count} seleccionados",
"instructions.shared.changeTo": "Cambiar a…",
"instructions.shared.clear": "Borrar selección",
"instructions.shared.assigned": "{targets} ahora usan {files}.",
"instructions.shared.restored": "{targets} vuelven a usar sus propios archivos.",
"instructions.resolve.collect.title": "Recuperar",
"instructions.resolve.collect.item": "Recuperar en {name}",
"instructions.resolve.collect.message": "Los cambios hechos en el archivo de {target} pasan a {name}, y todos los destinos que usan {name} los reciben. Antes se hace una copia de seguridad del {name} actual.",
"instructions.resolve.collect.done": "Se recuperaron los cambios de {target} en {name}.",
"instructions.resolve.reapply.title": "Volver a aplicar",
"instructions.resolve.reapply.item": "Volver a aplicar {name}",
"instructions.resolve.reapply.message": "Se hace una copia de seguridad del archivo editado de {target} y luego se vuelve a vincular a {name}.",
"instructions.resolve.reapply.done": "{target} se vinculó de nuevo a {name}.",
"instructions.detail.notFound": "No hay ningún AGENTS.md compartido llamado {name}",
"instructions.detail.back": "Volver a AGENTS.md",
"instructions.detail.edit": "Editar {file}",
"instructions.shared.listSep": ", ",
"instructions.shared.edit": "Editar",
"instructions.shared.more": "Más acciones",
"instructions.shared.copyPath": "Copiar ruta del archivo",
"instructions.shared.pathCopied": "Se copió {path}.",
"instructions.shared.delete": "Eliminar {name}",
"instructions.delete.title": "¿Eliminar {name}?",
"instructions.delete.message": "Los {count} destinos que lo usan ({targets}) vuelven primero a sus propios archivos. {name} sale de la lista; el archivo se queda donde está.",
"instructions.delete.unused": "Ningún destino usa {name}. Sale de la lista; el archivo se queda donde está.",
"instructions.preview.stats": "{lines} líneas · {size}",
"instructions.preview.expand": "Mostrar todo",
"instructions.preview.collapse": "Contraer",
"instructions.shared.connectedCount": "{count} conectados",
"instructions.shared.needSync.one": "{count} destino necesita sincronizarse",
"instructions.shared.needSync.other": "{count} destinos necesitan sincronizarse",
"instructions.shared.synced": "Se sincronizó {name} con {targets}.",
"instructions.shared.connectAll": "Conectar todos",
"instructions.shared.restoreAll": "Restaurar todos",
"instructions.shared.connect": "Conectar {name}",
"instructions.shared.selectedShort": "{count} seleccionados",
"instructions.shared.noneOff": "Todos los destinos seleccionados ya usan {name}",
"instructions.shared.noneOn": "Ninguno de los destinos seleccionados usa {name} todavía",
"instructions.shared.switch": "{target} usa {name}",
"instructions.shared.detached": "{targets} ya no usan {name}.",
"instructions.turnOff.title": "¿Devolver {target} a su propio archivo?",
"instructions.turnOff.message": "{path} vuelve a como estaba antes de conectar {name}. Los cambios posteriores en {name} ya no llegan a {target}.",
"instructions.switchFrom.title": "¿Cambiar {target} a {name}?",
"instructions.switchFrom.message": "{target} solo puede usar un archivo a la vez y ahora usa {other}. Después del cambio, {other} deja de aplicarse a {target}.",
"instructions.switchFrom.confirm": "Cambiar a {name}",
"instructions.plan.import": "Añade una línea de import",
"instructions.plan.link": "Se reemplaza por un enlace",
"instructions.plan.switch": "Cambia de {other} a {name}",
"instructions.plan.tooLong": "Solo lee los primeros {max} caracteres",
"instructions.plan.importKeep": "Quita la línea de import de {name}; {others} se mantienen",
"instructions.plan.dropImport": "Quita la línea de import de {name}",
"instructions.plan.restoreLink": "Recupera su archivo original",
"instructions.plan.modified": "Los cambios externos se respaldan primero",
"instructions.connectAll.title.one": "¿Conectar {count} destino a {name}?",
"instructions.connectAll.title.other": "¿Conectar {count} destinos a {name}?",
"instructions.connectAll.message": "El archivo actual de cada destino se respalda primero, así que luego puedes restaurarlos uno por uno.",
"instructions.restoreAll.title.one": "¿Dejar de usar {name} en {count} destino?",
"instructions.restoreAll.title.other": "¿Dejar de usar {name} en {count} destinos?",
"instructions.restoreAll.message": "Cada destino vuelve a como estaba antes de conectar {name}.",
"instructions.hint.sameAs": "Lee el mismo archivo que {name}",
"instructions.hint.missingLink": "Falta el enlace; al sincronizar se vuelve a crear.",
"instructions.hint.missingFile": "Falta el archivo; al sincronizar se vuelve a crear.",
"instructions.hint.driftImport": "Falta la línea de import; al sincronizar se vuelve a añadir.",
"instructions.hint.drift": "Ya no coincide con {name}; al sincronizar se restablece.",
"instructions.hint.noSource": "Falta el propio archivo {name}.",
"instructions.hint.usesOther": "Ahora usa {name}",
"instructions.hint.alsoUses": "También usa {names}",
"instructions.row.modified": "Este archivo se cambió fuera de skillshare y todavía no se sincronizó.",
"instructions.editor.modified": "Modificado",
"instructions.editor.unchanged": "Sin cambios",
"instructions.editor.readers": "Al guardar, estos destinos leen el contenido nuevo de inmediato:",
"instructions.editor.tooLong": "{target} solo lee los primeros {max} caracteres; este archivo tiene {chars}.",
"instructions.editor.saveHint": "Pulsa ⌘S (Ctrl+S) para guardar.",
"instructions.resolve.collect.title": "¿Pasar los cambios de {target} a {name}?",
"instructions.resolve.collect.item": "Pasar a {name}",
"instructions.resolve.collect.message": "{name} se reemplaza por el contenido actual de {target}, y los {count} destinos conectados a {name} lo leen. Antes se respalda el {name} actual.",
"instructions.resolve.collect.done": "Los cambios de {target} pasaron a {name}.",
"instructions.resolve.reapply.title": "¿Sobrescribir {target} con {name}?",
"instructions.resolve.reapply.item": "Sobrescribir con {name}",
"instructions.resolve.reapply.message": "Lo que se cambió en {target} fuera de skillshare se respalda primero y luego vuelve {name}. Los demás destinos no se ven afectados.",
"instructions.resolve.reapply.done": "Se sobrescribió {target} con {name}.",
"instructions.detail.targets": "Destinos",
"instructions.detail.addTarget": "Añadir destino",
"instructions.detail.colWrites": "Escribe en",
"instructions.detail.unused": "Ningún destino usa este archivo todavía.",
"instructions.detail.how.import": "Añade una línea @{path} y conserva tu propio contenido",
"instructions.detail.how.link": "Reemplazado por un enlace a {path}; se hizo copia de seguridad del original",
"instructions.detail.how.modified": "El enlace se reemplazó por un archivo normal con otro contenido",
"instructions.detail.modified": "Alguien editó {path} directamente. ¿Qué versión quieres conservar?",
"instructions.detail.modifiedHint": "Recuperar: el cambio pasa a {name} y todos los destinos lo reciben. Volver a aplicar: el cambio se descarta (con copia de seguridad previa) y el enlace vuelve.",
"instructions.detail.restore": "Restaurar",
"instructions.detail.restored": "{name} vuelve a usar su propio archivo.",
"instructions.detail.restoreHint": "Restaurar deja un destino como estaba antes de usar {name}: vuelve la copia de seguridad, o se elimina el archivo si no había ninguna.",
"instructions.restore.title": "¿Volver al archivo propio?",
"instructions.restore.message": "{targets} volverá a como estaba antes de conectar el AGENTS.md compartido: se restaura la copia de seguridad, o se elimina el archivo si no existía. El AGENTS.md compartido se conserva.",
"instructions.detail.synced": "Se sincronizó {name}.",
"instructions.detail.editNote": "Todos los destinos que usan este archivo leen el cambio ({count} ahora).",
"instructions.detail.delete.title": "Eliminar AGENTS.md compartido",
"instructions.detail.delete.message": "{name} se quita de la configuración y sus {count} destinos recuperan sus propios archivos. El archivo en sí se queda en la carpeta de extras.",
"instructions.detail.delete.confirm": "Eliminar",
"instructions.detail.delete.done": "Se eliminó {name}.",
"instructions.project.tracked": "versionado con el repo",
+65 -43
View File
@@ -1141,60 +1141,82 @@
"instructions.shared.created": "{name} ایجاد شد.",
"instructions.shared.empty.title": "هنوز AGENTS.md مشترکی وجود ندارد",
"instructions.shared.empty.description": "یک بار بنویسید تا مقصدهایی مانند Claude، Codex و Gemini همه همان محتوا را بخوانند.",
"instructions.shared.allTargets": "همه هدف‌ها",
"instructions.shared.own": "فایل خودش",
"instructions.shared.filterHint": "روی یک AGENTS.md مشترک کلیک کنید تا فقط هدف‌هایی که از آن استفاده می‌کنند نمایش داده شوند.",
"instructions.shared.open": "باز کردن {name}",
"instructions.shared.search": "جستجوی هدف‌ها",
"instructions.shared.count.one": "{count} هدف",
"instructions.shared.count.other": "{count} هدف",
"instructions.shared.selectAll": "انتخاب همه هدف‌ها",
"instructions.shared.select": "انتخاب {name}",
"instructions.shared.colTarget": "هدف",
"instructions.shared.colFile": "نوشتن در",
"instructions.shared.colUses": "استفاده از",
"instructions.shared.noTargets": "اینجا هدفی نیست.",
"instructions.shared.sameAs": "همان فایلی را می‌خواند که {name} می‌خواند، پس از {name} پیروی می‌کند",
"instructions.shared.tooLong": "{name} {chars} نویسه دارد؛ این هدف فقط {max} نویسه اول را می‌خواند.",
"instructions.shared.uses": "AGENTS.mdهای مشترکی که {name} استفاده می‌کند",
"instructions.shared.actions": "اقدامات برای {name}",
"instructions.shared.restoreOwn": "بازگرداندن فایل خودش",
"instructions.shared.cursorNote": "cursor در فهرست نیست: قوانین کاربری آن در تنظیمات Cursor است، نه در یک فایل.",
"instructions.shared.multiHint": "هدف‌هایی که از ‎@importها پیروی می‌کنند می‌توانند از چند فایل مشترک استفاده کنند؛ هر کدام یک خط به فایلشان اضافه می‌کند. هدف‌های دیگر فقط از یکی استفاده می‌کنند که به جای فایلشان لینک می‌شود.",
"instructions.shared.selected": "{count} انتخاب‌شده",
"instructions.shared.changeTo": "تغییر به…",
"instructions.shared.clear": "پاک کردن انتخاب",
"instructions.shared.assigned": "{targets} اکنون از {files} استفاده می‌کنند.",
"instructions.shared.restored": "{targets} دوباره از فایل‌های خودشان استفاده می‌کنند.",
"instructions.resolve.collect.title": "برگرداندن تغییرات",
"instructions.resolve.collect.item": "برگرداندن تغییرات به {name}",
"instructions.resolve.collect.message": "تغییرات فایل {target} به {name} منتقل می‌شود و همه هدف‌هایی که از {name} استفاده می‌کنند آن را دریافت می‌کنند. ابتدا از {name} فعلی پشتیبان گرفته می‌شود.",
"instructions.resolve.collect.done": "تغییرات {target} به {name} برگردانده شد.",
"instructions.resolve.reapply.title": "اعمال دوباره",
"instructions.resolve.reapply.item": "اعمال دوباره {name}",
"instructions.resolve.reapply.message": "از فایل ویرایش‌شده {target} پشتیبان گرفته می‌شود، سپس دوباره به {name} لینک می‌شود.",
"instructions.resolve.reapply.done": "{target} دوباره به {name} لینک شد.",
"instructions.detail.notFound": "AGENTS.md مشترکی با نام {name} وجود ندارد",
"instructions.detail.back": "بازگشت به AGENTS.md",
"instructions.detail.edit": "ویرایش {file}",
"instructions.shared.listSep": "، ",
"instructions.shared.edit": "ویرایش",
"instructions.shared.more": "اقدامات بیشتر",
"instructions.shared.copyPath": "کپی مسیر فایل",
"instructions.shared.pathCopied": "{path} کپی شد.",
"instructions.shared.delete": "حذف {name}",
"instructions.delete.title": "{name} حذف شود؟",
"instructions.delete.message": "{count} مقصدی که از آن استفاده می‌کنند ({targets}) ابتدا به فایل خودشان برمی‌گردند. {name} از فهرست حذف می‌شود، اما خود فایل سر جایش می‌ماند.",
"instructions.delete.unused": "هیچ مقصدی از {name} استفاده نمی‌کند. از فهرست حذف می‌شود، اما خود فایل سر جایش می‌ماند.",
"instructions.preview.stats": "{lines} خط · {size}",
"instructions.preview.expand": "نمایش همه",
"instructions.preview.collapse": "جمع کردن",
"instructions.shared.connectedCount": "{count} متصل",
"instructions.shared.needSync.one": "{count} هدف نیاز به همگام‌سازی دارد",
"instructions.shared.needSync.other": "{count} هدف نیاز به همگام‌سازی دارند",
"instructions.shared.synced": "{name} با {targets} همگام شد.",
"instructions.shared.connectAll": "اتصال همه",
"instructions.shared.restoreAll": "بازگرداندن همه",
"instructions.shared.connect": "اتصال {name}",
"instructions.shared.selectedShort": "{count} انتخاب‌شده",
"instructions.shared.noneOff": "همه هدف‌های انتخاب‌شده از قبل از {name} استفاده می‌کنند",
"instructions.shared.noneOn": "هیچ‌کدام از هدف‌های انتخاب‌شده هنوز از {name} استفاده نمی‌کنند",
"instructions.shared.switch": "{target} از {name} استفاده کند",
"instructions.shared.detached": "{targets} دیگر از {name} استفاده نمی‌کنند.",
"instructions.turnOff.title": "{target} به فایل خودش برگردد؟",
"instructions.turnOff.message": "{path} به حالت پیش از اتصال {name} برمی‌گردد. تغییرات بعدی {name} دیگر به {target} نمی‌رسد.",
"instructions.switchFrom.title": "{target} به {name} تغییر کند؟",
"instructions.switchFrom.message": "{target} هر بار فقط می‌تواند یک فایل داشته باشد و اکنون از {other} استفاده می‌کند. پس از تغییر، {other} دیگر برای {target} به کار نمی‌رود.",
"instructions.switchFrom.confirm": "تغییر به {name}",
"instructions.plan.import": "افزودن یک خط import",
"instructions.plan.link": "با پیوند جایگزین می‌شود",
"instructions.plan.switch": "از {other} به {name} تغییر می‌کند",
"instructions.plan.tooLong": "فقط {max} نویسه اول را می‌خواند",
"instructions.plan.importKeep": "خط import {name} حذف می‌شود؛ {others} می‌ماند",
"instructions.plan.dropImport": "خط import {name} حذف می‌شود",
"instructions.plan.restoreLink": "فایل اصلی‌اش برمی‌گردد",
"instructions.plan.modified": "تغییرات بیرونی ابتدا پشتیبان‌گیری می‌شود",
"instructions.connectAll.title.one": "{count} هدف به {name} متصل شود؟",
"instructions.connectAll.title.other": "{count} هدف به {name} متصل شوند؟",
"instructions.connectAll.message": "فایل فعلی هر هدف ابتدا پشتیبان‌گیری می‌شود تا بعداً بتوانید آن‌ها را یکی‌یکی بازگردانید.",
"instructions.restoreAll.title.one": "استفاده از {name} در {count} هدف متوقف شود؟",
"instructions.restoreAll.title.other": "استفاده از {name} در {count} هدف متوقف شود؟",
"instructions.restoreAll.message": "هر هدف به حالت پیش از اتصال {name} برمی‌گردد.",
"instructions.hint.sameAs": "همان فایل {name} را می‌خواند",
"instructions.hint.missingLink": "پیوند از بین رفته است؛ همگام‌سازی آن را برمی‌گرداند.",
"instructions.hint.missingFile": "فایل از بین رفته است؛ همگام‌سازی آن را برمی‌گرداند.",
"instructions.hint.driftImport": "خط import از بین رفته است؛ همگام‌سازی آن را دوباره اضافه می‌کند.",
"instructions.hint.drift": "دیگر با {name} یکی نیست؛ همگام‌سازی آن را برمی‌گرداند.",
"instructions.hint.noSource": "خود فایل {name} وجود ندارد.",
"instructions.hint.usesOther": "اکنون از {name} استفاده می‌کند",
"instructions.hint.alsoUses": "از {names} هم استفاده می‌کند",
"instructions.row.modified": "این فایل بیرون از skillshare تغییر کرده و هنوز همگام نشده است.",
"instructions.editor.modified": "تغییر یافته",
"instructions.editor.unchanged": "بدون تغییر",
"instructions.editor.readers": "پس از ذخیره، این هدف‌ها بلافاصله محتوای تازه را می‌خوانند:",
"instructions.editor.tooLong": "{target} فقط {max} نویسه اول را می‌خواند؛ این فایل {chars} نویسه دارد.",
"instructions.editor.saveHint": "برای ذخیره ⌘S (Ctrl+S) را بزنید.",
"instructions.resolve.collect.title": "تغییرات {target} در {name} ثبت شود؟",
"instructions.resolve.collect.item": "ثبت در {name}",
"instructions.resolve.collect.message": "{name} با محتوای فعلی {target} جایگزین می‌شود و همه {count} هدف متصل به {name} آن را می‌خوانند. ابتدا از {name} فعلی پشتیبان گرفته می‌شود.",
"instructions.resolve.collect.done": "تغییرات {target} در {name} ثبت شد.",
"instructions.resolve.reapply.title": "{target} با {name} بازنویسی شود؟",
"instructions.resolve.reapply.item": "بازنویسی با {name}",
"instructions.resolve.reapply.message": "آنچه بیرون از skillshare در {target} تغییر کرده ابتدا پشتیبان‌گیری می‌شود و سپس {name} برمی‌گردد. هدف‌های دیگر تغییری نمی‌کنند.",
"instructions.resolve.reapply.done": "{target} با {name} بازنویسی شد.",
"instructions.detail.targets": "هدف‌ها",
"instructions.detail.addTarget": "افزودن هدف",
"instructions.detail.colWrites": "نوشتن در",
"instructions.detail.unused": "هنوز هیچ هدفی از این فایل استفاده نمی‌کند.",
"instructions.detail.how.import": "یک خط ‎@{path} اضافه می‌کند و محتوای خودتان را نگه می‌دارد",
"instructions.detail.how.link": "با لینکی به {path} جایگزین شد؛ از نسخه اصلی پشتیبان گرفته شد",
"instructions.detail.how.modified": "لینک با یک فایل معمولی با محتوای متفاوت جایگزین شده است",
"instructions.detail.modified": "کسی {path} را مستقیماً ویرایش کرده است. کدام طرف را نگه می‌دارید؟",
"instructions.detail.modifiedHint": "برگرداندن تغییرات: ویرایش به {name} می‌رود و همه هدف‌ها آن را می‌گیرند. اعمال دوباره: ویرایش کنار گذاشته می‌شود (با پشتیبان‌گیری قبلی) و لینک برمی‌گردد.",
"instructions.detail.restore": "بازگرداندن",
"instructions.detail.restored": "{name} به فایل خودش برگشت.",
"instructions.detail.restoreHint": "بازگرداندن، هدف را به حالت پیش از استفاده از {name} برمی‌گرداند: پشتیبان برمی‌گردد، یا اگر پشتیبانی نبود فایل حذف می‌شود.",
"instructions.restore.title": "به فایل خودش برگردد؟",
"instructions.restore.message": "{targets} به حالت پیش از اتصال AGENTS.md مشترک برمی‌گردد: پشتیبان بازگردانده می‌شود، یا اگر فایلی نبود حذف می‌شود. خود AGENTS.md مشترک حفظ می‌شود.",
"instructions.detail.synced": "{name} همگام شد.",
"instructions.detail.editNote": "همه هدف‌هایی که از این فایل استفاده می‌کنند تغییر را می‌خوانند (اکنون {count}).",
"instructions.detail.delete.title": "حذف AGENTS.md مشترک",
"instructions.detail.delete.message": "{name} از پیکربندی حذف می‌شود و {count} هدف آن فایل‌های خودشان را پس می‌گیرند. خود فایل در پوشه extras باقی می‌ماند.",
"instructions.detail.delete.confirm": "حذف",
"instructions.detail.delete.done": "{name} حذف شد.",
"instructions.project.tracked": "همراه با repo ردیابی می‌شود",
+65 -43
View File
@@ -1141,60 +1141,82 @@
"instructions.shared.created": "{name} créé.",
"instructions.shared.empty.title": "Aucun AGENTS.md partagé",
"instructions.shared.empty.description": "Écrivez-le une fois, et des cibles comme Claude, Codex et Gemini liront la même chose.",
"instructions.shared.allTargets": "Toutes les cibles",
"instructions.shared.own": "Fichier propre",
"instructions.shared.filterHint": "Cliquez sur un AGENTS.md partagé pour n'afficher que les cibles qui l'utilisent.",
"instructions.shared.open": "Ouvrir {name}",
"instructions.shared.search": "Rechercher des cibles",
"instructions.shared.count.one": "{count} cible",
"instructions.shared.count.other": "{count} cibles",
"instructions.shared.selectAll": "Sélectionner toutes les cibles",
"instructions.shared.select": "Sélectionner {name}",
"instructions.shared.colTarget": "Cible",
"instructions.shared.colFile": "Écrit dans",
"instructions.shared.colUses": "Utilise",
"instructions.shared.noTargets": "Aucune cible ici.",
"instructions.shared.sameAs": "Lit le même fichier que {name}, donc suit {name}",
"instructions.shared.tooLong": "{name} contient {chars} caractères ; cette cible ne lit que les {max} premiers.",
"instructions.shared.uses": "AGENTS.md partagés utilisés par {name}",
"instructions.shared.actions": "Actions pour {name}",
"instructions.shared.restoreOwn": "Restaurer son propre fichier",
"instructions.shared.cursorNote": "cursor n'est pas listé : ses règles utilisateur se trouvent dans les paramètres de Cursor, pas dans un fichier.",
"instructions.shared.multiHint": "Les cibles qui suivent les @imports peuvent utiliser plusieurs fichiers partagés ; chacun ajoute une ligne à leur fichier. Les autres cibles en utilisent un seul, lié à la place de leur fichier.",
"instructions.shared.selected": "{count} sélectionné(s)",
"instructions.shared.changeTo": "Remplacer par…",
"instructions.shared.clear": "Effacer la sélection",
"instructions.shared.assigned": "{targets} utilisent désormais {files}.",
"instructions.shared.restored": "{targets} utilisent à nouveau leurs propres fichiers.",
"instructions.resolve.collect.title": "Récupérer",
"instructions.resolve.collect.item": "Récupérer dans {name}",
"instructions.resolve.collect.message": "Les modifications faites dans le fichier de {target} passent dans {name}, et chaque cible qui utilise {name} les reçoit. Le {name} actuel est d'abord sauvegardé.",
"instructions.resolve.collect.done": "Modifications de {target} récupérées dans {name}.",
"instructions.resolve.reapply.title": "Réappliquer",
"instructions.resolve.reapply.item": "Réappliquer {name}",
"instructions.resolve.reapply.message": "Le fichier modifié de {target} est sauvegardé, puis lié de nouveau à {name}.",
"instructions.resolve.reapply.done": "{target} de nouveau lié à {name}.",
"instructions.detail.notFound": "Aucun AGENTS.md partagé nommé {name}",
"instructions.detail.back": "Retour à AGENTS.md",
"instructions.detail.edit": "Modifier {file}",
"instructions.shared.listSep": ", ",
"instructions.shared.edit": "Modifier",
"instructions.shared.more": "Plus d'actions",
"instructions.shared.copyPath": "Copier le chemin du fichier",
"instructions.shared.pathCopied": "{path} copié.",
"instructions.shared.delete": "Supprimer {name}",
"instructions.delete.title": "Supprimer {name} ?",
"instructions.delete.message": "Les {count} cibles qui l'utilisent ({targets}) reviennent d'abord à leurs propres fichiers. {name} quitte la liste ; le fichier lui-même reste en place.",
"instructions.delete.unused": "Aucune cible n'utilise {name}. Il quitte la liste ; le fichier lui-même reste en place.",
"instructions.preview.stats": "{lines} lignes · {size}",
"instructions.preview.expand": "Tout afficher",
"instructions.preview.collapse": "Réduire",
"instructions.shared.connectedCount": "{count} connectée(s)",
"instructions.shared.needSync.one": "{count} cible à synchroniser",
"instructions.shared.needSync.other": "{count} cibles à synchroniser",
"instructions.shared.synced": "{name} synchronisé vers {targets}.",
"instructions.shared.connectAll": "Tout connecter",
"instructions.shared.restoreAll": "Tout restaurer",
"instructions.shared.connect": "Connecter {name}",
"instructions.shared.selectedShort": "{count} sélectionné(s)",
"instructions.shared.noneOff": "Toutes les cibles sélectionnées utilisent déjà {name}",
"instructions.shared.noneOn": "Aucune des cibles sélectionnées n'utilise encore {name}",
"instructions.shared.switch": "{target} utilise {name}",
"instructions.shared.detached": "{targets} n'utilisent plus {name}.",
"instructions.turnOff.title": "Remettre {target} sur son propre fichier ?",
"instructions.turnOff.message": "{path} revient à son état d'avant la connexion de {name}. Les modifications ultérieures de {name} n'atteignent plus {target}.",
"instructions.switchFrom.title": "Passer {target} sur {name} ?",
"instructions.switchFrom.message": "{target} ne peut utiliser qu'un fichier à la fois et utilise {other} en ce moment. Après le changement, {other} ne s'applique plus à {target}.",
"instructions.switchFrom.confirm": "Passer à {name}",
"instructions.plan.import": "Ajoute une ligne d'import",
"instructions.plan.link": "Remplacé par un lien",
"instructions.plan.switch": "Passe de {other} à {name}",
"instructions.plan.tooLong": "Ne lit que les {max} premiers caractères",
"instructions.plan.importKeep": "Retire la ligne d'import de {name} ; {others} restent",
"instructions.plan.dropImport": "Retire la ligne d'import de {name}",
"instructions.plan.restoreLink": "Retrouve son fichier d'origine",
"instructions.plan.modified": "Les modifications externes sont d'abord sauvegardées",
"instructions.connectAll.title.one": "Connecter {count} cible à {name} ?",
"instructions.connectAll.title.other": "Connecter {count} cibles à {name} ?",
"instructions.connectAll.message": "Le fichier actuel de chaque cible est d'abord sauvegardé, vous pourrez donc les restaurer un par un.",
"instructions.restoreAll.title.one": "Ne plus utiliser {name} dans {count} cible ?",
"instructions.restoreAll.title.other": "Ne plus utiliser {name} dans {count} cibles ?",
"instructions.restoreAll.message": "Chaque cible revient à son état d'avant la connexion de {name}.",
"instructions.hint.sameAs": "Lit le même fichier que {name}",
"instructions.hint.missingLink": "Le lien a disparu ; une synchronisation le remet.",
"instructions.hint.missingFile": "Le fichier a disparu ; une synchronisation le remet.",
"instructions.hint.driftImport": "La ligne d'import a disparu ; une synchronisation la rajoute.",
"instructions.hint.drift": "Ne correspond plus à {name} ; une synchronisation le rétablit.",
"instructions.hint.noSource": "Le fichier {name} lui-même est introuvable.",
"instructions.hint.usesOther": "Utilise {name} en ce moment",
"instructions.hint.alsoUses": "Utilise aussi {names}",
"instructions.row.modified": "Ce fichier a été modifié en dehors de skillshare et n'a pas encore été resynchronisé.",
"instructions.editor.modified": "Modifié",
"instructions.editor.unchanged": "Aucune modification",
"instructions.editor.readers": "Après l'enregistrement, ces cibles lisent aussitôt le nouveau contenu :",
"instructions.editor.tooLong": "{target} ne lit que les {max} premiers caractères ; ce fichier en contient {chars}.",
"instructions.editor.saveHint": "Appuyez sur ⌘S (Ctrl+S) pour enregistrer.",
"instructions.resolve.collect.title": "Reprendre les modifications de {target} dans {name} ?",
"instructions.resolve.collect.item": "Reprendre dans {name}",
"instructions.resolve.collect.message": "{name} est remplacé par le contenu actuel de {target}, et les {count} cibles connectées à {name} le lisent. Le {name} actuel est d'abord sauvegardé.",
"instructions.resolve.collect.done": "Modifications de {target} reprises dans {name}.",
"instructions.resolve.reapply.title": "Écraser {target} avec {name} ?",
"instructions.resolve.reapply.item": "Écraser avec {name}",
"instructions.resolve.reapply.message": "Ce qui a été modifié dans {target} en dehors de skillshare est d'abord sauvegardé, puis {name} revient. Les autres cibles ne sont pas touchées.",
"instructions.resolve.reapply.done": "{target} écrasé avec {name}.",
"instructions.detail.targets": "Cibles",
"instructions.detail.addTarget": "Ajouter une cible",
"instructions.detail.colWrites": "Écrit dans",
"instructions.detail.unused": "Aucune cible n'utilise encore ce fichier.",
"instructions.detail.how.import": "Ajoute une ligne @{path} et garde votre propre contenu",
"instructions.detail.how.link": "Remplacé par un lien vers {path} ; l'original a été sauvegardé",
"instructions.detail.how.modified": "Le lien a été remplacé par un fichier normal au contenu différent",
"instructions.detail.modified": "Quelqu'un a modifié {path} directement. Quel côté voulez-vous garder ?",
"instructions.detail.modifiedHint": "Récupérer : la modification passe dans {name} et chaque cible la reçoit. Réappliquer : la modification est abandonnée (après sauvegarde) et le lien revient.",
"instructions.detail.restore": "Restaurer",
"instructions.detail.restored": "{name} utilise à nouveau son propre fichier.",
"instructions.detail.restoreHint": "Restaurer remet une cible dans l'état où elle était avant d'utiliser {name} : la sauvegarde revient, ou le fichier est supprimé s'il n'y en avait pas.",
"instructions.restore.title": "Revenir au fichier propre ?",
"instructions.restore.message": "{targets} reviendra à son état d'avant le rattachement de l'AGENTS.md partagé : la sauvegarde est remise en place, ou le fichier est supprimé s'il n'existait pas. L'AGENTS.md partagé lui-même est conservé.",
"instructions.detail.synced": "{name} synchronisé.",
"instructions.detail.editNote": "Chaque cible qui utilise ce fichier lit la modification ({count} actuellement).",
"instructions.detail.delete.title": "Supprimer l'AGENTS.md partagé",
"instructions.detail.delete.message": "{name} est retiré de la configuration et ses {count} cibles retrouvent leurs propres fichiers. Le fichier lui-même reste dans le dossier extras.",
"instructions.detail.delete.confirm": "Supprimer",
"instructions.detail.delete.done": "{name} supprimé.",
"instructions.project.tracked": "suivi avec le repo",
+65 -43
View File
@@ -1141,60 +1141,82 @@
"instructions.shared.created": "{name} dibuat.",
"instructions.shared.empty.title": "Belum ada AGENTS.md bersama",
"instructions.shared.empty.description": "Tulis sekali, dan target seperti Claude, Codex, dan Gemini membaca isi yang sama.",
"instructions.shared.allTargets": "Semua target",
"instructions.shared.own": "File sendiri",
"instructions.shared.filterHint": "Klik AGENTS.md bersama untuk menampilkan hanya target yang menggunakannya.",
"instructions.shared.open": "Buka {name}",
"instructions.shared.search": "Cari target",
"instructions.shared.count.one": "{count} target",
"instructions.shared.count.other": "{count} target",
"instructions.shared.selectAll": "Pilih semua target",
"instructions.shared.select": "Pilih {name}",
"instructions.shared.colTarget": "Target",
"instructions.shared.colFile": "Menulis ke",
"instructions.shared.colUses": "Menggunakan",
"instructions.shared.noTargets": "Tidak ada target di sini.",
"instructions.shared.sameAs": "Membaca file yang sama dengan {name}, jadi mengikuti {name}",
"instructions.shared.tooLong": "{name} berisi {chars} karakter; target ini hanya membaca {max} karakter pertama.",
"instructions.shared.uses": "AGENTS.md bersama yang digunakan {name}",
"instructions.shared.actions": "Tindakan untuk {name}",
"instructions.shared.restoreOwn": "Pulihkan file sendiri",
"instructions.shared.cursorNote": "cursor tidak tercantum: aturan penggunanya ada di pengaturan Cursor, bukan di file.",
"instructions.shared.multiHint": "Target yang mengikuti @import bisa memakai beberapa file bersama; masing-masing menambah satu baris ke file mereka. Target lain memakai satu, di-link sebagai pengganti file mereka.",
"instructions.shared.selected": "{count} dipilih",
"instructions.shared.changeTo": "Ubah ke…",
"instructions.shared.clear": "Hapus pilihan",
"instructions.shared.assigned": "{targets} sekarang menggunakan {files}.",
"instructions.shared.restored": "{targets} kembali menggunakan file sendiri.",
"instructions.resolve.collect.title": "Tarik kembali",
"instructions.resolve.collect.item": "Tarik kembali ke {name}",
"instructions.resolve.collect.message": "Perubahan di file {target} masuk ke {name}, dan setiap target yang memakai {name} menerimanya. {name} saat ini dicadangkan lebih dulu.",
"instructions.resolve.collect.done": "Perubahan {target} ditarik ke {name}.",
"instructions.resolve.reapply.title": "Terapkan ulang",
"instructions.resolve.reapply.item": "Terapkan ulang {name}",
"instructions.resolve.reapply.message": "File {target} yang diedit dicadangkan, lalu di-link lagi ke {name}.",
"instructions.resolve.reapply.done": "{target} di-link lagi ke {name}.",
"instructions.detail.notFound": "Tidak ada AGENTS.md bersama bernama {name}",
"instructions.detail.back": "Kembali ke AGENTS.md",
"instructions.detail.edit": "Edit {file}",
"instructions.shared.listSep": ", ",
"instructions.shared.edit": "Edit",
"instructions.shared.more": "Tindakan lain",
"instructions.shared.copyPath": "Salin path file",
"instructions.shared.pathCopied": "{path} disalin.",
"instructions.shared.delete": "Hapus {name}",
"instructions.delete.title": "Hapus {name}?",
"instructions.delete.message": "{count} target yang memakainya ({targets}) kembali ke file masing-masing lebih dulu. {name} keluar dari daftar; filenya tetap di tempatnya.",
"instructions.delete.unused": "Tidak ada target yang memakai {name}. Ia keluar dari daftar; filenya tetap di tempatnya.",
"instructions.preview.stats": "{lines} baris · {size}",
"instructions.preview.expand": "Tampilkan semua",
"instructions.preview.collapse": "Ciutkan",
"instructions.shared.connectedCount": "{count} terhubung",
"instructions.shared.needSync.one": "{count} target perlu disinkronkan",
"instructions.shared.needSync.other": "{count} target perlu disinkronkan",
"instructions.shared.synced": "{name} disinkronkan ke {targets}.",
"instructions.shared.connectAll": "Hubungkan semua",
"instructions.shared.restoreAll": "Pulihkan semua",
"instructions.shared.connect": "Hubungkan {name}",
"instructions.shared.selectedShort": "{count} dipilih",
"instructions.shared.noneOff": "Semua target yang dipilih sudah memakai {name}",
"instructions.shared.noneOn": "Belum ada target terpilih yang memakai {name}",
"instructions.shared.switch": "{target} memakai {name}",
"instructions.shared.detached": "{targets} tidak lagi memakai {name}.",
"instructions.turnOff.title": "Kembalikan {target} ke file sendiri?",
"instructions.turnOff.message": "{path} kembali seperti sebelum {name} dihubungkan. Perubahan {name} berikutnya tidak lagi sampai ke {target}.",
"instructions.switchFrom.title": "Ganti {target} ke {name}?",
"instructions.switchFrom.message": "{target} hanya bisa memakai satu file sekaligus dan sekarang memakai {other}. Setelah diganti, {other} tidak lagi dipakai {target}.",
"instructions.switchFrom.confirm": "Ganti ke {name}",
"instructions.plan.import": "Menambah satu baris import",
"instructions.plan.link": "Diganti dengan tautan",
"instructions.plan.switch": "Beralih dari {other} ke {name}",
"instructions.plan.tooLong": "Hanya membaca {max} karakter pertama",
"instructions.plan.importKeep": "Menghapus baris import {name}; {others} tetap",
"instructions.plan.dropImport": "Menghapus baris import {name}",
"instructions.plan.restoreLink": "Mendapat file aslinya kembali",
"instructions.plan.modified": "Perubahan dari luar dicadangkan dulu",
"instructions.connectAll.title.one": "Hubungkan {count} target ke {name}?",
"instructions.connectAll.title.other": "Hubungkan {count} target ke {name}?",
"instructions.connectAll.message": "File asli setiap target dicadangkan dulu, jadi nanti bisa dipulihkan satu per satu.",
"instructions.restoreAll.title.one": "Berhenti memakai {name} di {count} target?",
"instructions.restoreAll.title.other": "Berhenti memakai {name} di {count} target?",
"instructions.restoreAll.message": "Setiap target kembali seperti sebelum {name} dihubungkan.",
"instructions.hint.sameAs": "Membaca file yang sama dengan {name}",
"instructions.hint.missingLink": "Tautannya hilang; sinkronisasi akan memasangnya lagi.",
"instructions.hint.missingFile": "File-nya hilang; sinkronisasi akan membuatnya lagi.",
"instructions.hint.driftImport": "Baris import hilang; sinkronisasi akan menambahkannya lagi.",
"instructions.hint.drift": "Tidak lagi cocok dengan {name}; sinkronisasi akan mengembalikannya.",
"instructions.hint.noSource": "File {name} sendiri tidak ada.",
"instructions.hint.usesOther": "Sekarang memakai {name}",
"instructions.hint.alsoUses": "Juga memakai {names}",
"instructions.row.modified": "File ini diubah di luar skillshare dan belum disinkronkan kembali.",
"instructions.editor.modified": "Diubah",
"instructions.editor.unchanged": "Tidak ada perubahan",
"instructions.editor.readers": "Setelah disimpan, target berikut langsung membaca isi baru:",
"instructions.editor.tooLong": "{target} hanya membaca {max} karakter pertama; file ini berisi {chars}.",
"instructions.editor.saveHint": "Tekan ⌘S (Ctrl+S) untuk menyimpan.",
"instructions.resolve.collect.title": "Masukkan perubahan {target} ke {name}?",
"instructions.resolve.collect.item": "Masukkan ke {name}",
"instructions.resolve.collect.message": "{name} diganti dengan isi {target} saat ini, dan {count} target yang terhubung ke {name} akan membacanya. {name} yang lama dicadangkan dulu.",
"instructions.resolve.collect.done": "Perubahan {target} sudah dimasukkan ke {name}.",
"instructions.resolve.reapply.title": "Timpa {target} dengan {name}?",
"instructions.resolve.reapply.item": "Timpa dengan {name}",
"instructions.resolve.reapply.message": "Perubahan di {target} dari luar skillshare dicadangkan dulu, lalu {name} dipasang kembali. Target lain tidak terpengaruh.",
"instructions.resolve.reapply.done": "{target} sudah ditimpa dengan {name}.",
"instructions.detail.targets": "Target",
"instructions.detail.addTarget": "Tambah target",
"instructions.detail.colWrites": "Menulis ke",
"instructions.detail.unused": "Belum ada target yang menggunakan file ini.",
"instructions.detail.how.import": "Menambahkan satu baris @{path} dan mempertahankan konten Anda",
"instructions.detail.how.link": "Diganti dengan link ke {path}; file asli sudah dicadangkan",
"instructions.detail.how.modified": "Link diganti dengan file biasa yang isinya berbeda",
"instructions.detail.modified": "Seseorang mengedit {path} secara langsung. Sisi mana yang dipertahankan?",
"instructions.detail.modifiedHint": "Tarik kembali: editan masuk ke {name} dan setiap target menerimanya. Terapkan ulang: editan dibuang (dicadangkan dulu) dan link kembali.",
"instructions.detail.restore": "Pulihkan",
"instructions.detail.restored": "{name} kembali ke file sendiri.",
"instructions.detail.restoreHint": "Pulihkan mengembalikan target seperti sebelum memakai {name}: cadangannya kembali, atau file dihapus jika tidak ada cadangan.",
"instructions.restore.title": "Kembali ke file sendiri?",
"instructions.restore.message": "{targets} akan kembali seperti sebelum AGENTS.md bersama disambungkan: cadangan dikembalikan, atau file dihapus jika sebelumnya tidak ada. AGENTS.md bersama itu sendiri tetap disimpan.",
"instructions.detail.synced": "{name} disinkronkan.",
"instructions.detail.editNote": "Setiap target yang memakai file ini membaca perubahannya ({count} saat ini).",
"instructions.detail.delete.title": "Hapus AGENTS.md bersama",
"instructions.detail.delete.message": "{name} dihapus dari konfigurasi dan {count} targetnya kembali memakai file sendiri. File-nya tetap ada di folder extras.",
"instructions.detail.delete.confirm": "Hapus",
"instructions.detail.delete.done": "{name} dihapus.",
"instructions.project.tracked": "dilacak bersama repo",
+63 -41
View File
@@ -1141,60 +1141,82 @@
"instructions.shared.created": "{name} を作成しました。",
"instructions.shared.empty.title": "共有 AGENTS.md はまだありません",
"instructions.shared.empty.description": "一度書けば、Claude、Codex、Gemini などのターゲットが同じ内容を読みます。",
"instructions.shared.allTargets": "すべてのターゲット",
"instructions.shared.own": "自身のファイル",
"instructions.shared.filterHint": "共有 AGENTS.md をクリックすると、それを使うターゲットだけを表示します。",
"instructions.shared.open": "{name} を開く",
"instructions.shared.search": "ターゲットを検索",
"instructions.shared.count.one": "{count} 個のターゲット",
"instructions.shared.count.other": "{count} 個のターゲット",
"instructions.shared.selectAll": "すべてのターゲットを選択",
"instructions.shared.select": "{name} を選択",
"instructions.shared.colTarget": "ターゲット",
"instructions.shared.colFile": "書き込み先",
"instructions.shared.colUses": "使用中",
"instructions.shared.noTargets": "ここにはターゲットがありません。",
"instructions.shared.sameAs": "{name} と同じファイルを読み込むため、{name} に従います",
"instructions.shared.tooLong": "{name} は {chars} 文字あります。このターゲットは先頭 {max} 文字しか読み込みません。",
"instructions.shared.uses": "{name} が使う共有 AGENTS.md",
"instructions.shared.actions": "{name} の操作",
"instructions.shared.restoreOwn": "自身のファイルに戻す",
"instructions.shared.cursorNote": "cursor は表示されません。ユーザールールはファイルではなく Cursor の設定に保存されます。",
"instructions.shared.multiHint": "@import に対応するターゲットは複数の共有ファイルを使え、ファイルごとに 1 行追加されます。その他のターゲットは 1 つだけを使い、元のファイルの代わりにリンクされます。",
"instructions.shared.selected": "{count} 件選択中",
"instructions.shared.changeTo": "変更先…",
"instructions.shared.clear": "選択を解除",
"instructions.shared.assigned": "{targets} は {files} を使うようになりました。",
"instructions.shared.restored": "{targets} は再び自身のファイルを使います。",
"instructions.resolve.collect.title": "取り込む",
"instructions.shared.listSep": "、",
"instructions.shared.edit": "編集",
"instructions.shared.more": "その他の操作",
"instructions.shared.copyPath": "ファイルパスをコピー",
"instructions.shared.pathCopied": "{path} をコピーしました。",
"instructions.shared.delete": "{name} を削除",
"instructions.delete.title": "{name} を削除しますか?",
"instructions.delete.message": "これを使っている {count} 個のターゲット({targets})は、先に自分のファイルに戻ります。{name} は一覧から外れますが、ファイル自体はそのまま残ります。",
"instructions.delete.unused": "{name} を使っているターゲットはありません。一覧から外れますが、ファイル自体はそのまま残ります。",
"instructions.preview.stats": "{lines} 行 · {size}",
"instructions.preview.expand": "すべて表示",
"instructions.preview.collapse": "折りたたむ",
"instructions.shared.connectedCount": "{count} 個接続中",
"instructions.shared.needSync.one": "{count} 個のターゲットに同期が必要",
"instructions.shared.needSync.other": "{count} 個のターゲットに同期が必要",
"instructions.shared.synced": "{name} を {targets} に同期しました。",
"instructions.shared.connectAll": "すべて接続",
"instructions.shared.restoreAll": "すべて復元",
"instructions.shared.connect": "{name} に接続",
"instructions.shared.selectedShort": "{count} 件選択",
"instructions.shared.noneOff": "選択したターゲットはすべて {name} に接続済みです",
"instructions.shared.noneOn": "選択したターゲットはまだどれも {name} に接続していません",
"instructions.shared.switch": "{target} で {name} を使う",
"instructions.shared.detached": "{targets} は {name} を使わなくなりました。",
"instructions.turnOff.title": "{target} を元のファイルに戻しますか?",
"instructions.turnOff.message": "{path} は {name} に接続する前の状態に戻ります。今後 {name} を変更しても {target} には反映されません。",
"instructions.switchFrom.title": "{target} を {name} に切り替えますか?",
"instructions.switchFrom.message": "{target} は一度に 1 つしか接続できず、今は {other} に接続しています。切り替えると {other} は {target} で使われなくなります。",
"instructions.switchFrom.confirm": "{name} に切り替え",
"instructions.plan.import": "import 行を 1 行追加",
"instructions.plan.link": "リンクに置き換え",
"instructions.plan.switch": "{other} から {name} に切り替え",
"instructions.plan.tooLong": "先頭 {max} 文字だけ読み込み",
"instructions.plan.importKeep": "{name} の import 行を削除、{others} は残す",
"instructions.plan.dropImport": "{name} の import 行を削除",
"instructions.plan.restoreLink": "元のファイルに戻す",
"instructions.plan.modified": "外部での変更は先にバックアップ",
"instructions.connectAll.title.one": "{count} 個のターゲットを {name} に接続しますか?",
"instructions.connectAll.title.other": "{count} 個のターゲットを {name} に接続しますか?",
"instructions.connectAll.message": "各ターゲットの元のファイルは先にバックアップされるので、あとから 1 つずつ復元できます。",
"instructions.restoreAll.title.one": "{count} 個のターゲットで {name} の使用をやめますか?",
"instructions.restoreAll.title.other": "{count} 個のターゲットで {name} の使用をやめますか?",
"instructions.restoreAll.message": "各ターゲットは {name} に接続する前の状態に戻ります。",
"instructions.hint.sameAs": "{name} と同じファイルを読み込み",
"instructions.hint.missingLink": "リンクがありません。同期すると戻ります。",
"instructions.hint.missingFile": "ファイルがありません。同期すると戻ります。",
"instructions.hint.driftImport": "import 行がありません。同期すると追加されます。",
"instructions.hint.drift": "{name} と一致しません。同期すると戻ります。",
"instructions.hint.noSource": "{name} のファイル自体がありません。",
"instructions.hint.usesOther": "現在は {name} を使用",
"instructions.hint.alsoUses": "{names} にも接続",
"instructions.row.modified": "このファイルは skillshare の外で変更され、まだ同期されていません。",
"instructions.editor.modified": "変更あり",
"instructions.editor.unchanged": "変更なし",
"instructions.editor.readers": "保存すると、これらのターゲットがすぐに新しい内容を読み込みます:",
"instructions.editor.tooLong": "{target} は先頭 {max} 文字しか読み込みません。このファイルは {chars} 文字あります。",
"instructions.editor.saveHint": "⌘S(Ctrl+S)で保存します。",
"instructions.resolve.collect.title": "{target} の変更を {name} に取り込みますか?",
"instructions.resolve.collect.item": "{name} に取り込む",
"instructions.resolve.collect.message": "{target} のファイルで行われた変更が {name} に反映され、{name} を使うすべてのターゲットに届きます。現在の {name} は先にバックアップされます。",
"instructions.resolve.collect.message": "{name} は {target} の現在の内容に置き換わり、{name} に接続している {count} 個のターゲットすべてが読み込みます。元の {name} は先にバックアップされます。",
"instructions.resolve.collect.done": "{target} の変更を {name} に取り込みました。",
"instructions.resolve.reapply.title": "再適用",
"instructions.resolve.reapply.item": "{name} を再適用",
"instructions.resolve.reapply.message": "{target} の編集済みファイルをバックアップしてから、再び {name} にリンクします。",
"instructions.resolve.reapply.done": "{target} を再び {name} にリンクしました。",
"instructions.detail.notFound": "{name} という共有 AGENTS.md はありません",
"instructions.detail.back": "AGENTS.md に戻る",
"instructions.detail.edit": "{file} を編集",
"instructions.resolve.reapply.title": "{target} を {name} で上書きしますか?",
"instructions.resolve.reapply.item": "{name} で上書き",
"instructions.resolve.reapply.message": "{target} で skillshare の外から変更された内容は先にバックアップされ、{name} に戻ります。ほかのターゲットには影響しません。",
"instructions.resolve.reapply.done": "{target} を {name} で上書きしました。",
"instructions.detail.targets": "ターゲット",
"instructions.detail.addTarget": "ターゲットを追加",
"instructions.detail.colWrites": "書き込み先",
"instructions.detail.unused": "このファイルを使っているターゲットはまだありません。",
"instructions.detail.how.import": "@{path} の 1 行を追加し、独自の内容は残します",
"instructions.detail.how.link": "{path} へのリンクに置き換え、元のファイルはバックアップ済み",
"instructions.detail.how.modified": "リンクが内容の異なる通常のファイルに置き換えられています",
"instructions.detail.modified": "{path} が直接編集されました。どちらを残しますか?",
"instructions.detail.modifiedHint": "取り込む: 編集内容が {name} に反映され、すべてのターゲットに届きます。再適用: 編集内容を破棄し(先にバックアップ)、リンクを戻します。",
"instructions.detail.restore": "復元",
"instructions.detail.restored": "{name} は自身のファイルに戻りました。",
"instructions.detail.restoreHint": "復元すると、ターゲットは {name} を使う前の状態に戻ります。バックアップがあれば戻し、なければファイルを削除します。",
"instructions.restore.title": "自分のファイルに戻しますか?",
"instructions.restore.message": "{targets} は共有 AGENTS.md をつなぐ前の状態に戻ります。バックアップがあれば戻し、元々ファイルがなければ削除します。共有 AGENTS.md 自体は削除されません。",
"instructions.detail.synced": "{name} を同期しました。",
"instructions.detail.editNote": "このファイルを使うすべてのターゲットが変更を読み込みます(現在 {count} 個)。",
"instructions.detail.delete.title": "共有 AGENTS.md を削除",
"instructions.detail.delete.message": "{name} は設定から削除され、{count} 個のターゲットは自身のファイルに戻ります。ファイル自体は extras フォルダーに残ります。",
"instructions.detail.delete.confirm": "削除",
"instructions.detail.delete.done": "{name} を削除しました。",
"instructions.project.tracked": "repo で管理",
+65 -43
View File
@@ -1141,60 +1141,82 @@
"instructions.shared.created": "{name}을(를) 생성했습니다.",
"instructions.shared.empty.title": "아직 공유 AGENTS.md가 없습니다",
"instructions.shared.empty.description": "한 번 작성하면 Claude, Codex, Gemini 같은 대상이 모두 같은 내용을 읽습니다.",
"instructions.shared.allTargets": "모든 대상",
"instructions.shared.own": "자체 파일",
"instructions.shared.filterHint": "공유 AGENTS.md를 클릭하면 그것을 쓰는 대상만 표시합니다.",
"instructions.shared.open": "{name} 열기",
"instructions.shared.search": "대상 검색",
"instructions.shared.count.one": "대상 {count}개",
"instructions.shared.count.other": "대상 {count}개",
"instructions.shared.selectAll": "모든 대상 선택",
"instructions.shared.select": "{name} 선택",
"instructions.shared.colTarget": "대상",
"instructions.shared.colFile": "쓰기 위치",
"instructions.shared.colUses": "사용 중",
"instructions.shared.noTargets": "여기에 대상이 없습니다.",
"instructions.shared.sameAs": "{name}과(와) 같은 파일을 읽으므로 {name}을(를) 따릅니다",
"instructions.shared.tooLong": "{name}은(는) {chars}자이며, 이 대상은 처음 {max}자만 읽습니다.",
"instructions.shared.uses": "{name}이(가) 사용하는 공유 AGENTS.md",
"instructions.shared.actions": "{name} 작업",
"instructions.shared.restoreOwn": "자체 파일로 복원",
"instructions.shared.cursorNote": "cursor는 표시되지 않습니다. 사용자 규칙이 파일이 아닌 Cursor 설정에 저장됩니다.",
"instructions.shared.multiHint": "@import를 따르는 대상은 여러 공유 파일을 쓸 수 있으며, 파일마다 한 줄이 추가됩니다. 다른 대상은 하나만 쓰며, 원래 파일 자리에 링크됩니다.",
"instructions.shared.selected": "{count}개 선택됨",
"instructions.shared.changeTo": "변경…",
"instructions.shared.clear": "선택 해제",
"instructions.shared.assigned": "{targets}이(가) 이제 {files}을(를) 사용합니다.",
"instructions.shared.restored": "{targets}이(가) 다시 자체 파일을 사용합니다.",
"instructions.resolve.collect.title": "되가져오기",
"instructions.resolve.collect.item": "{name}(으)로 되가져오기",
"instructions.resolve.collect.message": "{target} 파일에서 바뀐 내용이 {name}에 반영되고, {name}을(를) 쓰는 모든 대상이 받게 됩니다. 현재 {name}은(는) 먼저 백업됩니다.",
"instructions.resolve.collect.done": "{target}의 변경 사항을 {name}(으)로 가져왔습니다.",
"instructions.resolve.reapply.title": "다시 적용",
"instructions.resolve.reapply.item": "{name} 다시 적용",
"instructions.resolve.reapply.message": "{target}의 편집된 파일을 백업한 뒤 다시 {name}에 연결합니다.",
"instructions.resolve.reapply.done": "{target}을(를) 다시 {name}에 연결했습니다.",
"instructions.detail.notFound": "{name}(이)라는 공유 AGENTS.md가 없습니다",
"instructions.detail.back": "AGENTS.md로 돌아가기",
"instructions.detail.edit": "{file} 편집",
"instructions.shared.listSep": ", ",
"instructions.shared.edit": "편집",
"instructions.shared.more": "더 보기",
"instructions.shared.copyPath": "파일 경로 복사",
"instructions.shared.pathCopied": "{path}을(를) 복사했습니다.",
"instructions.shared.delete": "{name} 삭제",
"instructions.delete.title": "{name}을(를) 삭제할까요?",
"instructions.delete.message": "이 파일을 쓰는 대상 {count}개({targets})는 먼저 자체 파일로 복원됩니다. {name}은(는) 목록에서 빠지고, 파일 자체는 그대로 남습니다.",
"instructions.delete.unused": "{name}을(를) 쓰는 대상이 없습니다. 목록에서 빠지고, 파일 자체는 그대로 남습니다.",
"instructions.preview.stats": "{lines}줄 · {size}",
"instructions.preview.expand": "모두 펼치기",
"instructions.preview.collapse": "접기",
"instructions.shared.connectedCount": "{count}개 연결됨",
"instructions.shared.needSync.one": "대상 {count}개 동기화 필요",
"instructions.shared.needSync.other": "대상 {count}개 동기화 필요",
"instructions.shared.synced": "{name}을(를) {targets}에 동기화했습니다.",
"instructions.shared.connectAll": "모두 연결",
"instructions.shared.restoreAll": "모두 복원",
"instructions.shared.connect": "{name} 연결",
"instructions.shared.selectedShort": "{count}개 선택",
"instructions.shared.noneOff": "선택한 대상이 모두 이미 {name}에 연결되어 있습니다",
"instructions.shared.noneOn": "선택한 대상 중 {name}에 연결된 것이 없습니다",
"instructions.shared.switch": "{target}에서 {name} 사용",
"instructions.shared.detached": "{targets}이(가) 더 이상 {name}을(를) 사용하지 않습니다.",
"instructions.turnOff.title": "{target}을(를) 원래 파일로 되돌릴까요?",
"instructions.turnOff.message": "{path}은(는) {name}을(를) 연결하기 전 상태로 돌아갑니다. 이후 {name}을(를) 바꿔도 {target}에는 반영되지 않습니다.",
"instructions.switchFrom.title": "{target}을(를) {name}(으)로 바꿀까요?",
"instructions.switchFrom.message": "{target}은(는) 한 번에 하나만 연결할 수 있고 지금은 {other}에 연결되어 있습니다. 바꾸면 {other}은(는) 더 이상 {target}에서 쓰이지 않습니다.",
"instructions.switchFrom.confirm": "{name}(으)로 변경",
"instructions.plan.import": "import 줄 추가",
"instructions.plan.link": "링크로 대체",
"instructions.plan.switch": "{other}에서 {name}(으)로 변경",
"instructions.plan.tooLong": "처음 {max}자만 읽음",
"instructions.plan.importKeep": "{name} import 줄 삭제, {others} 유지",
"instructions.plan.dropImport": "{name} import 줄 삭제",
"instructions.plan.restoreLink": "원래 파일로 되돌림",
"instructions.plan.modified": "외부 변경 사항은 먼저 백업",
"instructions.connectAll.title.one": "대상 {count}개를 {name}에 연결할까요?",
"instructions.connectAll.title.other": "대상 {count}개를 {name}에 연결할까요?",
"instructions.connectAll.message": "각 대상의 원래 파일은 먼저 백업되므로 나중에 하나씩 복원할 수 있습니다.",
"instructions.restoreAll.title.one": "대상 {count}개에서 {name} 사용을 그만둘까요?",
"instructions.restoreAll.title.other": "대상 {count}개에서 {name} 사용을 그만둘까요?",
"instructions.restoreAll.message": "각 대상은 {name}을(를) 연결하기 전 상태로 돌아갑니다.",
"instructions.hint.sameAs": "{name}과(와) 같은 파일을 읽음",
"instructions.hint.missingLink": "링크가 없습니다. 동기화하면 다시 만들어집니다.",
"instructions.hint.missingFile": "파일이 없습니다. 동기화하면 다시 만들어집니다.",
"instructions.hint.driftImport": "import 줄이 없습니다. 동기화하면 다시 추가됩니다.",
"instructions.hint.drift": "{name}과(와) 맞지 않습니다. 동기화하면 되돌아갑니다.",
"instructions.hint.noSource": "{name} 파일 자체가 없습니다.",
"instructions.hint.usesOther": "지금은 {name} 사용 중",
"instructions.hint.alsoUses": "{names}에도 연결됨",
"instructions.row.modified": "이 파일은 skillshare 밖에서 변경되었고 아직 동기화되지 않았습니다.",
"instructions.editor.modified": "수정됨",
"instructions.editor.unchanged": "변경 없음",
"instructions.editor.readers": "저장하면 이 대상들이 바로 새 내용을 읽습니다:",
"instructions.editor.tooLong": "{target}은(는) 처음 {max}자만 읽습니다. 이 파일은 {chars}자입니다.",
"instructions.editor.saveHint": "⌘S(Ctrl+S)를 눌러 저장합니다.",
"instructions.resolve.collect.title": "{target}의 변경 사항을 {name}에 반영할까요?",
"instructions.resolve.collect.item": "{name}에 반영",
"instructions.resolve.collect.message": "{name}이(가) {target}의 현재 내용으로 바뀌고, {name}에 연결된 대상 {count}개가 모두 읽게 됩니다. 원래 {name}은(는) 먼저 백업됩니다.",
"instructions.resolve.collect.done": "{target}의 변경 사항을 {name}에 반영했습니다.",
"instructions.resolve.reapply.title": "{target}을(를) {name}(으)로 덮어쓸까요?",
"instructions.resolve.reapply.item": "{name}(으)로 덮어쓰기",
"instructions.resolve.reapply.message": "skillshare 밖에서 {target}에 바뀐 내용은 먼저 백업되고 {name}(으)로 되돌아갑니다. 다른 대상에는 영향이 없습니다.",
"instructions.resolve.reapply.done": "{target}을(를) {name}(으)로 덮어썼습니다.",
"instructions.detail.targets": "대상",
"instructions.detail.addTarget": "대상 추가",
"instructions.detail.colWrites": "쓰기 위치",
"instructions.detail.unused": "아직 이 파일을 쓰는 대상이 없습니다.",
"instructions.detail.how.import": "@{path} 한 줄을 추가하고 기존 내용은 유지합니다",
"instructions.detail.how.link": "{path}에 대한 링크로 교체했으며 원본은 백업했습니다",
"instructions.detail.how.modified": "링크가 내용이 다른 일반 파일로 바뀌었습니다",
"instructions.detail.modified": "누군가 {path}을(를) 직접 편집했습니다. 어느 쪽을 유지할까요?",
"instructions.detail.modifiedHint": "되가져오기: 편집 내용이 {name}에 반영되어 모든 대상이 받습니다. 다시 적용: 편집 내용을 버리고(먼저 백업) 링크를 되돌립니다.",
"instructions.detail.restore": "복원",
"instructions.detail.restored": "{name}이(가) 자체 파일로 돌아갔습니다.",
"instructions.detail.restoreHint": "복원하면 대상이 {name}을(를) 쓰기 전 상태로 돌아갑니다. 백업이 있으면 되돌리고, 없으면 파일을 삭제합니다.",
"instructions.restore.title": "자체 파일로 되돌릴까요?",
"instructions.restore.message": "{targets}이(가) 공유 AGENTS.md를 연결하기 전 상태로 돌아갑니다. 백업이 있으면 되돌리고, 원래 파일이 없었다면 삭제합니다. 공유 AGENTS.md 자체는 삭제되지 않습니다.",
"instructions.detail.synced": "{name}을(를) 동기화했습니다.",
"instructions.detail.editNote": "이 파일을 쓰는 모든 대상이 변경 사항을 읽습니다(현재 {count}개).",
"instructions.detail.delete.title": "공유 AGENTS.md 삭제",
"instructions.detail.delete.message": "{name}이(가) 설정에서 제거되고 {count}개 대상은 자체 파일로 돌아갑니다. 파일 자체는 extras 폴더에 남습니다.",
"instructions.detail.delete.confirm": "삭제",
"instructions.detail.delete.done": "{name}을(를) 삭제했습니다.",
"instructions.project.tracked": "repo와 함께 추적됨",
+65 -43
View File
@@ -1141,60 +1141,82 @@
"instructions.shared.created": "{name} criado.",
"instructions.shared.empty.title": "Nenhum AGENTS.md compartilhado ainda",
"instructions.shared.empty.description": "Escreva uma vez e destinos como Claude, Codex e Gemini leem o mesmo conteúdo.",
"instructions.shared.allTargets": "Todos os destinos",
"instructions.shared.own": "Arquivo próprio",
"instructions.shared.filterHint": "Clique em um AGENTS.md compartilhado para listar só os destinos que o usam.",
"instructions.shared.open": "Abrir {name}",
"instructions.shared.search": "Buscar destinos",
"instructions.shared.count.one": "{count} destino",
"instructions.shared.count.other": "{count} destinos",
"instructions.shared.selectAll": "Selecionar todos os destinos",
"instructions.shared.select": "Selecionar {name}",
"instructions.shared.colTarget": "Destino",
"instructions.shared.colFile": "Grava em",
"instructions.shared.colUses": "Usa",
"instructions.shared.noTargets": "Nenhum destino aqui.",
"instructions.shared.sameAs": "Lê o mesmo arquivo que {name}, então segue {name}",
"instructions.shared.tooLong": "{name} tem {chars} caracteres; este destino lê apenas os primeiros {max}.",
"instructions.shared.uses": "AGENTS.md compartilhados que {name} usa",
"instructions.shared.actions": "Ações para {name}",
"instructions.shared.restoreOwn": "Restaurar o próprio arquivo",
"instructions.shared.cursorNote": "cursor não aparece: as regras de usuário ficam nas configurações do Cursor, não em um arquivo.",
"instructions.shared.multiHint": "Destinos que seguem @imports podem usar vários arquivos compartilhados; cada um adiciona uma linha ao arquivo deles. Os demais usam um só, vinculado no lugar do arquivo deles.",
"instructions.shared.selected": "{count} selecionado(s)",
"instructions.shared.changeTo": "Alterar para…",
"instructions.shared.clear": "Limpar seleção",
"instructions.shared.assigned": "{targets} agora usam {files}.",
"instructions.shared.restored": "{targets} voltaram a usar os próprios arquivos.",
"instructions.resolve.collect.title": "Trazer de volta",
"instructions.resolve.collect.item": "Trazer de volta para {name}",
"instructions.resolve.collect.message": "As alterações feitas no arquivo de {target} vão para {name}, e todos os destinos que usam {name} as recebem. É feito backup do {name} atual antes.",
"instructions.resolve.collect.done": "Alterações de {target} trazidas para {name}.",
"instructions.resolve.reapply.title": "Reaplicar",
"instructions.resolve.reapply.item": "Reaplicar {name}",
"instructions.resolve.reapply.message": "É feito backup do arquivo editado de {target}, que depois é vinculado a {name} novamente.",
"instructions.resolve.reapply.done": "{target} vinculado a {name} novamente.",
"instructions.detail.notFound": "Nenhum AGENTS.md compartilhado chamado {name}",
"instructions.detail.back": "Voltar para AGENTS.md",
"instructions.detail.edit": "Editar {file}",
"instructions.shared.listSep": ", ",
"instructions.shared.edit": "Editar",
"instructions.shared.more": "Mais ações",
"instructions.shared.copyPath": "Copiar caminho do arquivo",
"instructions.shared.pathCopied": "{path} copiado.",
"instructions.shared.delete": "Excluir {name}",
"instructions.delete.title": "Excluir {name}?",
"instructions.delete.message": "Os {count} destinos que o usam ({targets}) voltam primeiro aos próprios arquivos. {name} sai da lista; o arquivo continua onde está.",
"instructions.delete.unused": "Nenhum destino usa {name}. Ele sai da lista; o arquivo continua onde está.",
"instructions.preview.stats": "{lines} linhas · {size}",
"instructions.preview.expand": "Mostrar tudo",
"instructions.preview.collapse": "Recolher",
"instructions.shared.connectedCount": "{count} conectados",
"instructions.shared.needSync.one": "{count} destino precisa sincronizar",
"instructions.shared.needSync.other": "{count} destinos precisam sincronizar",
"instructions.shared.synced": "{name} sincronizado com {targets}.",
"instructions.shared.connectAll": "Conectar todos",
"instructions.shared.restoreAll": "Restaurar todos",
"instructions.shared.connect": "Conectar {name}",
"instructions.shared.selectedShort": "{count} selecionado(s)",
"instructions.shared.noneOff": "Todos os destinos selecionados já usam {name}",
"instructions.shared.noneOn": "Nenhum dos destinos selecionados usa {name} ainda",
"instructions.shared.switch": "{target} usa {name}",
"instructions.shared.detached": "{targets} não usam mais {name}.",
"instructions.turnOff.title": "Voltar {target} para o próprio arquivo?",
"instructions.turnOff.message": "{path} volta a ser como era antes de conectar {name}. Alterações futuras em {name} não chegam mais a {target}.",
"instructions.switchFrom.title": "Trocar {target} para {name}?",
"instructions.switchFrom.message": "{target} só pode usar um arquivo por vez e agora usa {other}. Depois da troca, {other} deixa de valer para {target}.",
"instructions.switchFrom.confirm": "Trocar para {name}",
"instructions.plan.import": "Adiciona uma linha de import",
"instructions.plan.link": "Substituído por um link",
"instructions.plan.switch": "Troca de {other} para {name}",
"instructions.plan.tooLong": "Lê só os primeiros {max} caracteres",
"instructions.plan.importKeep": "Remove a linha de import de {name}; {others} continuam",
"instructions.plan.dropImport": "Remove a linha de import de {name}",
"instructions.plan.restoreLink": "Recebe de volta o arquivo original",
"instructions.plan.modified": "Alterações externas são salvas em backup antes",
"instructions.connectAll.title.one": "Conectar {count} destino a {name}?",
"instructions.connectAll.title.other": "Conectar {count} destinos a {name}?",
"instructions.connectAll.message": "O arquivo atual de cada destino é salvo em backup antes, então você pode restaurá-los um a um depois.",
"instructions.restoreAll.title.one": "Parar de usar {name} em {count} destino?",
"instructions.restoreAll.title.other": "Parar de usar {name} em {count} destinos?",
"instructions.restoreAll.message": "Cada destino volta a ser como era antes de conectar {name}.",
"instructions.hint.sameAs": "Lê o mesmo arquivo que {name}",
"instructions.hint.missingLink": "O link sumiu; sincronizar o recria.",
"instructions.hint.missingFile": "O arquivo sumiu; sincronizar o recria.",
"instructions.hint.driftImport": "A linha de import sumiu; sincronizar a adiciona de novo.",
"instructions.hint.drift": "Não corresponde mais a {name}; sincronizar restaura.",
"instructions.hint.noSource": "O próprio arquivo {name} está faltando.",
"instructions.hint.usesOther": "Usa {name} agora",
"instructions.hint.alsoUses": "Também usa {names}",
"instructions.row.modified": "Este arquivo foi alterado fora do skillshare e ainda não foi sincronizado de volta.",
"instructions.editor.modified": "Modificado",
"instructions.editor.unchanged": "Sem alterações",
"instructions.editor.readers": "Depois de salvar, estes destinos leem o novo conteúdo na hora:",
"instructions.editor.tooLong": "{target} lê só os primeiros {max} caracteres; este arquivo tem {chars}.",
"instructions.editor.saveHint": "Pressione ⌘S (Ctrl+S) para salvar.",
"instructions.resolve.collect.title": "Levar as alterações de {target} para {name}?",
"instructions.resolve.collect.item": "Levar para {name}",
"instructions.resolve.collect.message": "{name} é substituído pelo conteúdo atual de {target}, e os {count} destinos conectados a {name} passam a lê-lo. É feito backup do {name} atual antes.",
"instructions.resolve.collect.done": "As alterações de {target} foram levadas para {name}.",
"instructions.resolve.reapply.title": "Sobrescrever {target} com {name}?",
"instructions.resolve.reapply.item": "Sobrescrever com {name}",
"instructions.resolve.reapply.message": "O que foi alterado em {target} fora do skillshare é salvo em backup antes, e então {name} volta. Os outros destinos não são afetados.",
"instructions.resolve.reapply.done": "{target} sobrescrito com {name}.",
"instructions.detail.targets": "Destinos",
"instructions.detail.addTarget": "Adicionar destino",
"instructions.detail.colWrites": "Grava em",
"instructions.detail.unused": "Nenhum destino usa este arquivo ainda.",
"instructions.detail.how.import": "Adiciona uma linha @{path} e mantém seu próprio conteúdo",
"instructions.detail.how.link": "Substituído por um link para {path}; foi feito backup do original",
"instructions.detail.how.modified": "O link foi substituído por um arquivo comum com conteúdo diferente",
"instructions.detail.modified": "Alguém editou {path} diretamente. Qual lado você mantém?",
"instructions.detail.modifiedHint": "Trazer de volta: a edição vai para {name} e todos os destinos a recebem. Reaplicar: a edição é descartada (com backup antes) e o link volta.",
"instructions.detail.restore": "Restaurar",
"instructions.detail.restored": "{name} voltou ao próprio arquivo.",
"instructions.detail.restoreHint": "Restaurar deixa o destino como era antes de usar {name}: o backup volta, ou o arquivo é removido se não havia backup.",
"instructions.restore.title": "Voltar ao arquivo próprio?",
"instructions.restore.message": "{targets} voltará ao estado anterior à conexão do AGENTS.md compartilhado: o backup é restaurado, ou o arquivo é removido se não existia. O AGENTS.md compartilhado em si é mantido.",
"instructions.detail.synced": "{name} sincronizado.",
"instructions.detail.editNote": "Todos os destinos que usam este arquivo leem a alteração ({count} agora).",
"instructions.detail.delete.title": "Excluir AGENTS.md compartilhado",
"instructions.detail.delete.message": "{name} é removido da configuração e seus {count} destinos recebem de volta os próprios arquivos. O arquivo em si continua na pasta de extras.",
"instructions.detail.delete.confirm": "Excluir",
"instructions.detail.delete.done": "{name} excluído.",
"instructions.project.tracked": "versionado com o repo",
+65 -43
View File
@@ -1141,60 +1141,82 @@
"instructions.shared.created": "已创建 {name}。",
"instructions.shared.empty.title": "还没有共享 AGENTS.md",
"instructions.shared.empty.description": "写一份,让 Claude、Codex、Gemini 等目标都读到同样的内容。",
"instructions.shared.allTargets": "全部目标",
"instructions.shared.own": "自己的文件",
"instructions.shared.filterHint": "点击一份 AGENTS.md,右边只列出接到它的目标。",
"instructions.shared.open": "打开 {name}",
"instructions.shared.search": "搜索目标",
"instructions.shared.count.one": "{count} 个目标",
"instructions.shared.count.other": "{count} 个目标",
"instructions.shared.selectAll": "全选目标",
"instructions.shared.select": "选择 {name}",
"instructions.shared.colTarget": "目标",
"instructions.shared.colFile": "写入到",
"instructions.shared.colUses": "用哪一份",
"instructions.shared.noTargets": "这里没有目标。",
"instructions.shared.sameAs": "与 {name} 读取同一个文件,因此跟随 {name}",
"instructions.shared.tooLong": "{name} 有 {chars} 个字符,这个目标只读取前 {max} 个。",
"instructions.shared.uses": "{name} 用哪一份 AGENTS.md",
"instructions.shared.actions": "{name} 的操作",
"instructions.shared.restoreOwn": "还原为自己的文件",
"instructions.shared.cursorNote": "cursor 没有全局的文件(User Rules 存在 Cursor 设置里),不会出现在这里。",
"instructions.shared.multiHint": "支持 @import 的目标可以同时接好几份,每份在文件里插入一行。其他目标一次只能接一份,用链接替代原本的文件。",
"instructions.shared.selected": "已选择 {count} 个",
"instructions.shared.changeTo": "改为…",
"instructions.shared.clear": "取消选择",
"instructions.shared.assigned": "{targets} 现在使用 {files}。",
"instructions.shared.restored": "{targets} 已改回使用自己的文件。",
"instructions.resolve.collect.title": "收回来源",
"instructions.resolve.collect.item": "收回到 {name}",
"instructions.resolve.collect.message": "{target} 文件中的修改会写回 {name},所有使用 {name} 的目标都会获得这些修改。当前的 {name} 会先备份。",
"instructions.resolve.collect.done": "已将 {target} 的修改收回到 {name}。",
"instructions.resolve.reapply.title": "重新应用",
"instructions.resolve.reapply.item": "重新应用 {name}",
"instructions.resolve.reapply.message": "{target} 修改过的文件会先备份,再重新链接到 {name}。",
"instructions.resolve.reapply.done": "已将 {target} 重新链接到 {name}。",
"instructions.detail.notFound": "没有名为 {name} 的共享 AGENTS.md",
"instructions.detail.back": "返回 AGENTS.md",
"instructions.detail.edit": "编辑 {file}",
"instructions.shared.listSep": "、",
"instructions.shared.edit": "编辑",
"instructions.shared.more": "更多操作",
"instructions.shared.copyPath": "复制文件路径",
"instructions.shared.pathCopied": "已复制 {path}。",
"instructions.shared.delete": "删除 {name}",
"instructions.delete.title": "删除 {name}?",
"instructions.delete.message": "接上它的 {count} 个目标({targets})会先还原成自己的文件。{name} 会从列表中移除,文件本身保留在原处。",
"instructions.delete.unused": "没有目标接上 {name}。它会从列表中移除,文件本身保留在原处。",
"instructions.preview.stats": "{lines} 行 · {size}",
"instructions.preview.expand": "展开全部",
"instructions.preview.collapse": "收起",
"instructions.shared.connectedCount": "{count} 个已连接",
"instructions.shared.needSync.one": "{count} 个目标需要同步",
"instructions.shared.needSync.other": "{count} 个目标需要同步",
"instructions.shared.synced": "已把 {name} 同步到 {targets}。",
"instructions.shared.connectAll": "全部连接",
"instructions.shared.restoreAll": "全部还原",
"instructions.shared.connect": "连接 {name}",
"instructions.shared.selectedShort": "已选 {count} 个",
"instructions.shared.noneOff": "选中的目标都已经连接 {name}",
"instructions.shared.noneOn": "选中的目标都还没连接 {name}",
"instructions.shared.switch": "{target} 使用 {name}",
"instructions.shared.detached": "{targets} 不再使用 {name}。",
"instructions.turnOff.title": "让 {target} 改回自己的文件?",
"instructions.turnOff.message": "{path} 会回到连接 {name} 之前的样子。之后修改 {name},{target} 不会再跟着变。",
"instructions.switchFrom.title": "{target} 改用 {name}?",
"instructions.switchFrom.message": "{target} 一次只能连接一份,现在连接的是 {other}。换过去之后 {other} 就不再给 {target} 用。",
"instructions.switchFrom.confirm": "改用 {name}",
"instructions.plan.import": "加一行 import",
"instructions.plan.link": "用链接替换",
"instructions.plan.switch": "从 {other} 换成 {name}",
"instructions.plan.tooLong": "只读前 {max} 字",
"instructions.plan.importKeep": "去掉 {name} 的 import 行,{others} 保留",
"instructions.plan.dropImport": "去掉 {name} 的 import 行",
"instructions.plan.restoreLink": "换回原来的文件",
"instructions.plan.modified": "外部修改会先备份",
"instructions.connectAll.title.one": "让 {count} 个目标都连接 {name}?",
"instructions.connectAll.title.other": "让 {count} 个目标都连接 {name}?",
"instructions.connectAll.message": "每个目标原来的文件都会先备份,之后可以一个一个还原。",
"instructions.restoreAll.title.one": "让 {count} 个目标都不再使用 {name}?",
"instructions.restoreAll.title.other": "让 {count} 个目标都不再使用 {name}?",
"instructions.restoreAll.message": "每个目标会回到连接 {name} 之前的样子。",
"instructions.hint.sameAs": "和 {name} 读同一个文件",
"instructions.hint.missingLink": "链接不见了,同步后会补回来。",
"instructions.hint.missingFile": "文件不见了,同步后会补回来。",
"instructions.hint.driftImport": "import 行不见了,同步后会加回来。",
"instructions.hint.drift": "和 {name} 对不上,同步后会换回来。",
"instructions.hint.noSource": "{name} 本身的文件不见了。",
"instructions.hint.usesOther": "目前使用 {name}",
"instructions.hint.alsoUses": "也连接了 {names}",
"instructions.row.modified": "这个文件在 skillshare 以外被修改过,还没同步回来。",
"instructions.editor.modified": "已修改",
"instructions.editor.unchanged": "无变更",
"instructions.editor.readers": "保存后,这些目标会直接读到新内容:",
"instructions.editor.tooLong": "{target} 只读取前 {max} 个字符,这份有 {chars} 个。",
"instructions.editor.saveHint": "按 ⌘S(Ctrl+S)保存。",
"instructions.resolve.collect.title": "把 {target} 的修改收进 {name}?",
"instructions.resolve.collect.item": "收进 {name}",
"instructions.resolve.collect.message": "{name} 会换成 {target} 现在的内容,连接 {name} 的 {count} 个目标都会读到。原来的 {name} 会先备份。",
"instructions.resolve.collect.done": "已把 {target} 的修改收进 {name}。",
"instructions.resolve.reapply.title": "用 {name} 覆盖 {target}?",
"instructions.resolve.reapply.item": "用 {name} 覆盖",
"instructions.resolve.reapply.message": "{target} 在 skillshare 以外修改的内容会先备份,再换回 {name}。其他目标不受影响。",
"instructions.resolve.reapply.done": "已用 {name} 覆盖 {target}。",
"instructions.detail.targets": "目标",
"instructions.detail.addTarget": "添加目标",
"instructions.detail.colWrites": "写入到",
"instructions.detail.unused": "还没有目标接这份文件。",
"instructions.detail.how.import": "添加一行 @{path},保留你自己的内容",
"instructions.detail.how.link": "已替换为指向 {path} 的链接,原文件已备份",
"instructions.detail.how.modified": "链接被替换成了内容不同的普通文件",
"instructions.detail.modified": "有人直接修改了 {path}。要保留哪一边?",
"instructions.detail.modifiedHint": "收回来源:修改写回 {name},所有目标都会获得。重新应用:丢弃修改(先备份),恢复链接。",
"instructions.detail.restore": "还原",
"instructions.detail.restored": "{name} 已还原为自己的文件。",
"instructions.detail.restoreHint": "还原会让目标回到使用 {name} 之前的状态:有备份就放回备份,原本没有文件就删除。",
"instructions.restore.title": "还原成自己的文件?",
"instructions.restore.message": "{targets} 会退回接上共享 AGENTS.md 之前的样子:有备份就放回备份,原本没有文件就删掉。共享的 AGENTS.md 本身不会被删除。",
"instructions.detail.synced": "已同步 {name}。",
"instructions.detail.editNote": "所有接这份文件的目标都会读到修改(当前 {count} 个)。",
"instructions.detail.delete.title": "删除共享 AGENTS.md",
"instructions.detail.delete.message": "{name} 会从配置中移除,使用它的 {count} 个目标会换回自己的文件。文件本身会保留在 extras 文件夹中。",
"instructions.detail.delete.confirm": "删除",
"instructions.detail.delete.done": "已删除 {name}。",
"instructions.project.tracked": "随 repo 纳入版本控制",
+65 -43
View File
@@ -1141,60 +1141,82 @@
"instructions.shared.created": "已建立 {name}。",
"instructions.shared.empty.title": "還沒有共用 AGENTS.md",
"instructions.shared.empty.description": "寫一份,讓 Claude、Codex、Gemini 等目標都讀到同樣的內容。",
"instructions.shared.allTargets": "全部目標",
"instructions.shared.own": "自己的",
"instructions.shared.filterHint": "點一份 AGENTS.md,右邊只列接到它的目標。",
"instructions.shared.open": "開啟 {name}",
"instructions.shared.search": "搜尋目標",
"instructions.shared.count.one": "{count} 個目標",
"instructions.shared.count.other": "{count} 個目標",
"instructions.shared.selectAll": "全選目標",
"instructions.shared.select": "選取 {name}",
"instructions.shared.colTarget": "目標",
"instructions.shared.colFile": "寫到",
"instructions.shared.colUses": "用哪一份",
"instructions.shared.noTargets": "這裡沒有目標。",
"instructions.shared.sameAs": "和 {name} 讀同一個檔案,跟著 {name} 走",
"instructions.shared.tooLong": "{name} 有 {chars} 個字元,這個目標只讀前 {max} 個。",
"instructions.shared.uses": "{name} 用哪一份 AGENTS.md",
"instructions.shared.actions": "{name} 的操作",
"instructions.shared.restoreOwn": "還原成自己的檔案",
"instructions.shared.cursorNote": "cursor 沒有全域的檔案(User Rules 存在 Cursor 設定裡),不會出現在這裡。",
"instructions.shared.multiHint": "支援 @import 的目標可以同時接好幾份,每份在檔案裡插一行。其他目標一次只能接一份,用連結取代原本的檔案。",
"instructions.shared.selected": "已選 {count} 個目標",
"instructions.shared.changeTo": "改接到…",
"instructions.shared.clear": "取消選取",
"instructions.shared.assigned": "{targets} 已改接 {files}。",
"instructions.shared.restored": "{targets} 已改回自己的檔案。",
"instructions.resolve.collect.title": "收回來源",
"instructions.resolve.collect.item": "收回 {name}",
"instructions.resolve.collect.message": "{target} 檔案裡的改動會寫回 {name},所有接 {name} 的目標都會拿到。原本的 {name} 會先備份。",
"instructions.resolve.collect.done": "已把 {target} 的改動收回 {name}。",
"instructions.resolve.reapply.title": "重新套用",
"instructions.resolve.reapply.item": "重新套用 {name}",
"instructions.resolve.reapply.message": "{target} 改過的檔案會先備份,再重新連結到 {name}。",
"instructions.resolve.reapply.done": "已重新把 {target} 連結到 {name}。",
"instructions.detail.notFound": "沒有名為 {name} 的共用 AGENTS.md",
"instructions.detail.back": "返回 AGENTS.md",
"instructions.detail.edit": "編輯 {file}",
"instructions.shared.listSep": "、",
"instructions.shared.edit": "編輯",
"instructions.shared.more": "更多操作",
"instructions.shared.copyPath": "複製檔案路徑",
"instructions.shared.pathCopied": "已複製 {path}。",
"instructions.shared.delete": "刪除 {name}",
"instructions.delete.title": "刪除 {name}?",
"instructions.delete.message": "接上它的 {count} 個目標({targets})會先還原成自己的檔案。{name} 會從清單拿掉,檔案本身留在原處。",
"instructions.delete.unused": "沒有目標接上 {name}。它會從清單拿掉,檔案本身留在原處。",
"instructions.preview.stats": "{lines} 行 · {size}",
"instructions.preview.expand": "展開全部",
"instructions.preview.collapse": "收合",
"instructions.shared.connectedCount": "{count} 個接上",
"instructions.shared.needSync.one": "{count} 個目標需要同步",
"instructions.shared.needSync.other": "{count} 個目標需要同步",
"instructions.shared.synced": "已把 {name} 同步到 {targets}。",
"instructions.shared.connectAll": "全部接上",
"instructions.shared.restoreAll": "全部還原",
"instructions.shared.connect": "接上 {name}",
"instructions.shared.selectedShort": "已選 {count} 個",
"instructions.shared.noneOff": "選到的目標都已經接上 {name}",
"instructions.shared.noneOn": "選到的目標都還沒接上 {name}",
"instructions.shared.switch": "{target} 使用 {name}",
"instructions.shared.detached": "{targets} 不再用 {name}。",
"instructions.turnOff.title": "讓 {target} 改回自己的檔案?",
"instructions.turnOff.message": "{path} 會回到接上 {name} 之前的樣子。之後改 {name},{target} 不會再跟著變。",
"instructions.switchFrom.title": "{target} 改用 {name}?",
"instructions.switchFrom.message": "{target} 一次只能接一份,現在接的是 {other}。換過去之後 {other} 就不再給 {target} 用。",
"instructions.switchFrom.confirm": "改用 {name}",
"instructions.plan.import": "加一行 import",
"instructions.plan.link": "用連結取代",
"instructions.plan.switch": "從 {other} 換成 {name}",
"instructions.plan.tooLong": "只讀前 {max} 字",
"instructions.plan.importKeep": "拿掉 {name} 的 import 行,{others} 保留",
"instructions.plan.dropImport": "拿掉 {name} 的 import 行",
"instructions.plan.restoreLink": "換回原本的檔案",
"instructions.plan.modified": "外部改動會先備份",
"instructions.connectAll.title.one": "讓 {count} 個目標都接上 {name}?",
"instructions.connectAll.title.other": "讓 {count} 個目標都接上 {name}?",
"instructions.connectAll.message": "每個目標原本的檔案都會先備份,之後可以一個一個還原。",
"instructions.restoreAll.title.one": "讓 {count} 個目標都不再用 {name}?",
"instructions.restoreAll.title.other": "讓 {count} 個目標都不再用 {name}?",
"instructions.restoreAll.message": "每個目標會回到接上 {name} 之前的樣子。",
"instructions.hint.sameAs": "跟 {name} 讀同一個檔案",
"instructions.hint.missingLink": "連結不見了,同步後會補回來。",
"instructions.hint.missingFile": "檔案不見了,同步後會補回來。",
"instructions.hint.driftImport": "import 行不見了,同步後會加回來。",
"instructions.hint.drift": "跟 {name} 對不上,同步後會換回來。",
"instructions.hint.noSource": "{name} 本身的檔案不見了。",
"instructions.hint.usesOther": "目前用 {name}",
"instructions.hint.alsoUses": "也接了 {names}",
"instructions.row.modified": "這個檔案在 skillshare 以外被改過,還沒同步回來。",
"instructions.editor.modified": "已修改",
"instructions.editor.unchanged": "無變更",
"instructions.editor.readers": "存檔後,這些目標會直接讀到新內容:",
"instructions.editor.tooLong": "{target} 只讀前 {max} 個字元,這份有 {chars} 個。",
"instructions.editor.saveHint": "按 ⌘S(Ctrl+S)儲存。",
"instructions.resolve.collect.title": "把 {target} 的改動收進 {name}?",
"instructions.resolve.collect.item": "收進 {name}",
"instructions.resolve.collect.message": "{name} 會換成 {target} 現在的內容,接上 {name} 的 {count} 個目標都會讀到。原本的 {name} 會先備份。",
"instructions.resolve.collect.done": "已把 {target} 的改動收進 {name}。",
"instructions.resolve.reapply.title": "用 {name} 覆蓋 {target}?",
"instructions.resolve.reapply.item": "用 {name} 覆蓋",
"instructions.resolve.reapply.message": "{target} 在 skillshare 以外改的內容會先備份,再換回 {name}。其他目標不受影響。",
"instructions.resolve.reapply.done": "已用 {name} 覆蓋 {target}。",
"instructions.detail.targets": "目標",
"instructions.detail.addTarget": "加入目標",
"instructions.detail.colWrites": "寫到",
"instructions.detail.unused": "還沒有目標接這份檔案。",
"instructions.detail.how.import": "插入一行 @{path},保留你自己的內容",
"instructions.detail.how.link": "換成連到 {path} 的連結,原本的檔案已備份",
"instructions.detail.how.modified": "連結被換成一般檔案,而且內容改過",
"instructions.detail.modified": "有人直接改了 {path}。要保留哪一邊?",
"instructions.detail.modifiedHint": "收回來源:改動寫回 {name},所有目標都拿到。重新套用:丟掉改動(先備份),換回連結。",
"instructions.detail.restore": "還原",
"instructions.detail.restored": "{name} 已還原成自己的檔案。",
"instructions.detail.restoreHint": "還原:退回這個目標接上 {name} 之前的樣子。有備份就放回備份,原本沒檔案就刪掉。",
"instructions.restore.title": "還原成自己的檔案?",
"instructions.restore.message": "{targets} 會退回接上共用 AGENTS.md 之前的樣子:有備份就放回備份,原本沒有檔案就刪掉。共用的 AGENTS.md 本身不會被刪除。",
"instructions.detail.synced": "已同步 {name}。",
"instructions.detail.editNote": "所有接這份檔案的目標都會讀到改動(目前 {count} 個)。",
"instructions.detail.delete.title": "刪除共用 AGENTS.md",
"instructions.detail.delete.message": "{name} 會從設定中移除,接它的 {count} 個目標會換回自己的檔案。檔案本身會留在 extras 資料夾。",
"instructions.detail.delete.confirm": "刪除",
"instructions.detail.delete.done": "已刪除 {name}。",
"instructions.project.tracked": "跟著 repo 進版控",
-216
View File
@@ -1,216 +0,0 @@
import { useState } from 'react';
import { Link, useNavigate, useParams } from 'react-router-dom';
import { useQuery, useQueryClient } from '@tanstack/react-query';
import { FileX, TriangleAlert } from 'lucide-react';
import { api } from '../api/client';
import type { InstructionsAssignment, SharedInstructionsTarget } from '../api/client';
import AgentIcon from '../components/AgentIcon';
import Button from '../components/Button';
import ConfirmDialog from '../components/ConfirmDialog';
import EmptyState from '../components/EmptyState';
import PageHeader from '../components/PageHeader';
import { Select } from '../components/Select';
import { PageSkeleton } from '../components/Skeleton';
import { useToast } from '../components/Toast';
import InstructionsEditorDialog from '../components/instructions/InstructionsEditorDialog';
import { formatSize, overLimit, refreshInstructions, statusTone } from '../components/instructions/instructionsView';
import { useT } from '../i18n';
import { queryKeys } from '../lib/queryKeys';
import { shortenHome } from '../lib/paths';
type Pending = { title: string; message: string; confirm: string; danger?: boolean; run: () => Promise<void> };
/** ③ One shared instruction file: which targets use it, how, and their state. */
export default function SharedInstructionPage() {
const { name = '' } = useParams();
const t = useT();
const navigate = useNavigate();
const { toast } = useToast();
const queryClient = useQueryClient();
const list = useQuery({ queryKey: queryKeys.instructions.shared, queryFn: () => api.listSharedInstructions() });
// Off once deletion starts, so the refresh afterwards does not ask for a file that is gone.
const [deleting, setDeleting] = useState(false);
const content = useQuery({ queryKey: queryKeys.instructions.sharedContent(name), queryFn: () => api.getSharedInstructionsContent(name), enabled: !deleting });
const [editing, setEditing] = useState(false);
const [pending, setPending] = useState<Pending | null>(null);
const [busy, setBusy] = useState(false);
if (list.isPending) return <PageSkeleton />;
if (list.error) return <div className="ss-note bad"><span className="flex-1">{list.error.message}</span></div>;
const file = list.data.files.find((f) => f.name === name);
if (!file) {
return (
<EmptyState
icon={FileX}
title={t('instructions.detail.notFound', { name })}
action={<Link to="/extras?tab=instructions"><Button variant="secondary">{t('instructions.detail.back')}</Button></Link>}
/>
);
}
const using = list.data.targets.filter((tg) => tg.assigned.some((a) => a.name === name));
const addable = list.data.targets.filter((tg) => !tg.same_as && !using.includes(tg) && (tg.import || tg.assigned.length === 0));
const run = async (fn: () => Promise<unknown>, done: string) => {
setBusy(true);
try {
await fn();
if (done) toast(done, 'success');
} catch (err) {
toast((err as Error).message, 'error');
} finally {
setBusy(false);
refreshInstructions(queryClient);
}
};
const add = (tg: SharedInstructionsTarget) => run(async () => {
const res = await api.assignSharedInstructions([tg.name], [...tg.assigned.map((a) => a.name), name]);
if (!res.success) throw new Error(res.errors.join('; '));
}, t('instructions.shared.assigned', { targets: tg.name, files: name }));
const sync = () => run(async () => {
const res = await api.syncExtras({ name });
const failed = res.extras.flatMap((e) => e.targets).find((r) => r.error);
if (failed) throw new Error(failed.error);
}, t('instructions.detail.synced', { name }));
const confirmRun = async () => {
const p = pending!;
setPending(null);
await run(p.run, '');
};
return (
<div className="ss-wrap animate-fade-in">
<PageHeader
crumbs={[{ label: t('extras.title'), to: '/extras' }, { label: t('extras.tab.instructions'), to: '/extras?tab=instructions' }, { label: name }]}
title={name}
mono
subtitle={<span className="font-mono">{shortenHome(file.path)}{file.exists && ` · ${formatSize(file.size)}`}</span>}
actions={
<>
<Button variant="ghost" onClick={() => setPending({
title: t('instructions.detail.delete.title'),
message: t('instructions.detail.delete.message', { name, count: using.length }),
confirm: t('instructions.detail.delete.confirm'),
danger: true,
run: async () => { setDeleting(true); try { await api.deleteExtra(name); } catch (err) { setDeleting(false); throw err; } toast(t('instructions.detail.delete.done', { name }), 'success'); navigate('/extras?tab=instructions'); },
})}>{t('instructions.detail.delete.title')}</Button>
<Button variant="secondary" onClick={() => setEditing(true)} disabled={!content.data}>{t('instructions.detail.edit', { file: file.file })}</Button>
<Button variant="primary" onClick={() => void sync()} loading={busy} disabled={using.length === 0}>{t('extras.sync')}</Button>
</>
}
/>
<section className="flex flex-col gap-2.5">
<div className="ss-sec">
<h2>{t('instructions.detail.targets')}</h2>
<span className="ss-cnt">{using.length}</span>
<span className="ss-tag">global</span>
<span className="flex-1" />
{addable.length > 0 && (
<Select className="w-[200px]" size="sm" ariaLabel={t('instructions.detail.addTarget')} value="" placeholder={t('instructions.detail.addTarget')}
options={[{ value: '', label: t('instructions.detail.addTarget') }, ...addable.map((tg) => ({ value: tg.name, label: tg.name, icon: <AgentIcon target={tg.name} size={14} /> }))]}
onChange={(v) => { const tg = addable.find((x) => x.name === v); if (tg) void add(tg); }} disabled={busy} />
)}
</div>
<div className="ss-list">
<div className="ss-lh">
<span className="w-[30px]" />
<span className="w-[110px]">{t('instructions.shared.colTarget')}</span>
<span className="flex-1">{t('instructions.detail.colWrites')}</span>
<span className="w-[80px]">mode</span>
<span className="w-[100px]">{t('instructions.project.colStatus')}</span>
<span className="w-[90px]" />
</div>
{using.length === 0 && <div className="ss-r text-[13px] text-ink-3">{t('instructions.detail.unused')}</div>}
{using.map((tg) => {
const a = tg.assigned.find((x) => x.name === name) as InstructionsAssignment;
const base = tg.path.split('/').pop() ?? '';
const dir = shortenHome(tg.path).slice(0, -base.length);
const hint = tg.same_as ? t('instructions.shared.sameAs', { name: tg.same_as })
: a.status === 'modified' ? t('instructions.detail.how.modified')
: t(`instructions.detail.how.${a.mode === 'import' ? 'import' : 'link'}`, { path: `…/${name}/${file.file}` });
return (
<div key={tg.name} className="contents">
<div className="ss-r !min-h-[58px]">
<span className="ss-at"><AgentIcon target={tg.name} size={17} /></span>
<Link to={`/targets/${encodeURIComponent(tg.name)}?tab=instructions`} className="w-[110px] shrink-0 truncate font-mono text-[13px] font-semibold hover:underline">{tg.name}</Link>
<span className="flex min-w-0 flex-1 flex-col gap-0.5">
<span className="truncate font-mono text-[12.5px] text-ink-2" title={tg.path}>{dir}<b className="text-ink">{base}</b></span>
<span className="text-[12px] text-ink-3">{hint}</span>
</span>
<span className="w-[80px] shrink-0"><span className="ss-tag">{a.mode}</span></span>
<span className="w-[100px] shrink-0"><span className={`ss-st ${statusTone(a.status)}`}>{a.status}</span></span>
<span className="flex w-[90px] shrink-0 justify-end">
{!tg.same_as && (
<Button variant="secondary" size="sm" disabled={busy} onClick={() => setPending({
title: t('instructions.restore.title'),
message: t('instructions.restore.message', { targets: tg.name }),
confirm: t('instructions.detail.restore'),
run: async () => {
const res = await api.restoreSharedInstructions(name, tg.name);
if (!res.success) throw new Error(res.errors.join('; '));
toast(t('instructions.detail.restored', { name: tg.name }), 'success');
},
})}>{t('instructions.detail.restore')}</Button>
)}
</span>
</div>
{a.status === 'modified' && !tg.same_as && (
<div className="ss-r !min-h-0 !py-3">
<div className="ss-note warn w-full">
<TriangleAlert size={16} />
<span className="flex flex-1 flex-col gap-2">
<span>{t('instructions.detail.modified', { path: shortenHome(tg.path) })}</span>
<span className="flex items-center gap-2">
<Button variant="secondary" size="sm" disabled={busy} onClick={() => setPending({
title: t('instructions.resolve.collect.title'), message: t('instructions.resolve.collect.message', { name, target: tg.name }), confirm: t('instructions.resolve.collect.title'),
run: async () => { await api.resolveSharedInstructions(name, tg.name, 'collect'); toast(t('instructions.resolve.collect.done', { name, target: tg.name }), 'success'); },
})}>{t('instructions.resolve.collect.title')}</Button>
<Button variant="secondary" size="sm" disabled={busy} onClick={() => setPending({
title: t('instructions.resolve.reapply.title'), message: t('instructions.resolve.reapply.message', { name, target: tg.name }), confirm: t('instructions.resolve.reapply.title'),
run: async () => { await api.resolveSharedInstructions(name, tg.name, 'reapply'); toast(t('instructions.resolve.reapply.done', { name, target: tg.name }), 'success'); },
})}>{t('instructions.resolve.reapply.title')}</Button>
</span>
<span className="text-[12.5px]">{t('instructions.detail.modifiedHint', { name })}</span>
</span>
</div>
</div>
)}
</div>
);
})}
</div>
{using.flatMap((tg) => overLimit(tg, [file]).map((f) => (
<p key={tg.name} className="text-[13px] text-warn">{t('instructions.shared.tooLong', { name: f.name, chars: f.chars.toLocaleString(), max: tg.max_chars?.toLocaleString() ?? '' })}</p>
)))}
<p className="text-[13px] text-ink-3">{t('instructions.detail.restoreHint', { name })}</p>
</section>
{editing && content.data && (
<InstructionsEditorDialog
title={`${name} · ${file.file}`}
path={file.path}
content={content.data.content}
note={t('instructions.detail.editNote', { count: using.length })}
onSave={async (next) => {
await api.putSharedInstructionsContent(name, next);
refreshInstructions(queryClient);
}}
onClose={() => setEditing(false)}
/>
)}
<ConfirmDialog
open={pending !== null}
title={pending?.title ?? ''}
message={pending?.message ?? ''}
confirmText={pending?.confirm}
variant={pending?.danger ? 'danger' : 'default'}
onCancel={() => setPending(null)}
onConfirm={() => void confirmRun()}
/>
</div>
);
}