mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 12:23:22 +00:00
Merge remote-tracking branch 'origin/main' into runkids/feat-497-prefixed-naming
# Conflicts: # ui/src/i18n/locales/de.json # ui/src/i18n/locales/en.json # ui/src/i18n/locales/es.json # ui/src/i18n/locales/fa.json # ui/src/i18n/locales/fr.json # ui/src/i18n/locales/id.json # ui/src/i18n/locales/ja.json # ui/src/i18n/locales/ko.json # ui/src/i18n/locales/pt-BR.json # ui/src/i18n/locales/zh-CN.json # ui/src/i18n/locales/zh-TW.json # ui/src/pages/TargetDetailPage.test.tsx # ui/src/pages/TargetDetailPage.tsx
This commit is contained in:
@@ -99,7 +99,7 @@ func checkSharedTargetPaths(cfg *config.Config, result *doctorResult, isProject
|
||||
})
|
||||
|
||||
conflicts := make(map[string]config.SkillsFolderConflict)
|
||||
for _, c := range config.SkillsFolderConflicts(cfg.Targets) {
|
||||
for _, c := range config.SkillsFolderConflicts(cfg.Targets, cfg.Mode) {
|
||||
conflicts[c.Path] = c
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ func checkSharedTargetPaths(cfg *config.Config, result *doctorResult, isProject
|
||||
detail := fmt.Sprintf("%s ← %s", c.path, strings.Join(c.targets, ", "))
|
||||
suggestion := sharedTargetPathsSuggestion(c.path, c.targets, isProject)
|
||||
if conflict, ok := conflicts[c.path]; ok {
|
||||
detail += " (different filters, so they undo each other on every sync)"
|
||||
detail += " (different settings, so they undo each other on every sync)"
|
||||
suggestion = folderConflictSuggestion(conflict, isProject)
|
||||
}
|
||||
ui.Warning("Shared path %s", detail)
|
||||
|
||||
@@ -20,8 +20,8 @@ func printSyncOverlapHint(targets map[string]config.TargetConfig, isProject, jso
|
||||
return
|
||||
}
|
||||
explained := map[string]bool{}
|
||||
for _, c := range config.SkillsFolderConflicts(targets) {
|
||||
ui.Warning("%s sync skills to %s with different filters, so each sync undoes the other",
|
||||
for _, c := range config.SkillsFolderConflicts(targets, defaultMode) {
|
||||
ui.Warning("%s sync skills to %s with different settings, so each sync undoes the other",
|
||||
joinAnd(c.Targets), shortenPath(c.Path))
|
||||
for _, name := range c.Stop {
|
||||
fmt.Println(ui.DimText(" keep one: " + skillsOffCommand(name, isProject)))
|
||||
|
||||
@@ -18,7 +18,7 @@ func TestPrintSyncOverlapHint_NamesConflictAndFix(t *testing.T) {
|
||||
out := captureStdout(t, func() { printSyncOverlapHint(targets, true, false, "", nil) })
|
||||
|
||||
for _, want := range []string{
|
||||
"codex and universal sync skills to " + filepath.FromSlash("/tmp/agents/skills") + " with different filters, so each sync undoes the other",
|
||||
"codex and universal sync skills to " + filepath.FromSlash("/tmp/agents/skills") + " with different settings, so each sync undoes the other",
|
||||
"keep one: skillshare target codex --skills=false -p",
|
||||
} {
|
||||
if !strings.Contains(out, want) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"cmp"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"sort"
|
||||
@@ -98,8 +99,8 @@ func SkillsPathKeptBy(targets map[string]TargetConfig, name string, leaving map[
|
||||
}
|
||||
|
||||
// SkillsFolderConflict is a skills folder that two or more targets with skills
|
||||
// on sync into with different include or exclude filters, so each sync
|
||||
// undoes the others' links. Keep is the target to leave on; Stop the rest.
|
||||
// on sync into with different settings, so each sync undoes the others'
|
||||
// links. Keep is the target to leave on; Stop the rest.
|
||||
type SkillsFolderConflict struct {
|
||||
Path string `json:"path"`
|
||||
Targets []string `json:"targets"`
|
||||
@@ -108,10 +109,11 @@ type SkillsFolderConflict struct {
|
||||
}
|
||||
|
||||
// SkillsFolderConflicts returns the shared skills folders whose targets'
|
||||
// filters differ, sorted by path. Targets with identical settings agree on
|
||||
// the folder's contents and are not a conflict. universal is kept when it is
|
||||
// in the group, otherwise the alphabetically first target.
|
||||
func SkillsFolderConflicts(targets map[string]TargetConfig) []SkillsFolderConflict {
|
||||
// settings differ, sorted by path. defaultMode is the global mode a target
|
||||
// without its own inherits. Targets with identical settings agree on the
|
||||
// folder's contents and are not a conflict. universal is kept when it is in
|
||||
// the group, otherwise the alphabetically first target.
|
||||
func SkillsFolderConflicts(targets map[string]TargetConfig, defaultMode string) []SkillsFolderConflict {
|
||||
byFolder := make(map[string][]string)
|
||||
for name, tc := range targets {
|
||||
if !tc.SkillsConfig().IsEnabled() {
|
||||
@@ -132,7 +134,7 @@ func SkillsFolderConflicts(targets map[string]TargetConfig) []SkillsFolderConfli
|
||||
differ := false
|
||||
for _, n := range names[1:] {
|
||||
other := targets[n]
|
||||
if !sameSkillsSettings(first.SkillsConfig(), other.SkillsConfig()) {
|
||||
if !sameSkillsSettings(first.SkillsConfig(), other.SkillsConfig(), defaultMode) {
|
||||
differ = true
|
||||
break
|
||||
}
|
||||
@@ -156,8 +158,17 @@ func SkillsFolderConflicts(targets map[string]TargetConfig) []SkillsFolderConfli
|
||||
return out
|
||||
}
|
||||
|
||||
func sameSkillsSettings(a, b ResourceTargetConfig) bool {
|
||||
return sameSet(a.Include, b.Include) && sameSet(a.Exclude, b.Exclude)
|
||||
func sameSkillsSettings(a, b ResourceTargetConfig, defaultMode string) bool {
|
||||
mode := cmp.Or(a.Mode, defaultMode, "merge")
|
||||
if mode != cmp.Or(b.Mode, defaultMode, "merge") {
|
||||
return false
|
||||
}
|
||||
// symlink mode links the whole folder to the source, so no per-skill setting applies.
|
||||
if mode == "symlink" {
|
||||
return true
|
||||
}
|
||||
return EffectiveTargetNaming(a.TargetNaming) == EffectiveTargetNaming(b.TargetNaming) &&
|
||||
sameSet(a.Include, b.Include) && sameSet(a.Exclude, b.Exclude)
|
||||
}
|
||||
|
||||
func sameSet(a, b []string) bool {
|
||||
|
||||
@@ -67,7 +67,7 @@ func TestSkillsFolderConflicts_DifferentFilters(t *testing.T) {
|
||||
"universal": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills", Exclude: []string{"feature-radar*"}}},
|
||||
"codex": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills/"}},
|
||||
"claude": {Skills: &ResourceTargetConfig{Path: "/tmp/claude/skills"}},
|
||||
})
|
||||
}, "")
|
||||
want := []SkillsFolderConflict{{Path: "/tmp/agents/skills", Targets: []string{"codex", "universal"}, Keep: "universal", Stop: []string{"codex"}}}
|
||||
if !slices.EqualFunc(got, want, conflictEqual) {
|
||||
t.Errorf("SkillsFolderConflicts = %+v, want %+v", got, want)
|
||||
@@ -78,7 +78,7 @@ func TestSkillsFolderConflicts_SameSettingsNoConflict(t *testing.T) {
|
||||
got := SkillsFolderConflicts(map[string]TargetConfig{
|
||||
"universal": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills", Include: []string{"a", "b"}}},
|
||||
"codex": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills", Include: []string{"b", "a"}}},
|
||||
})
|
||||
}, "")
|
||||
if len(got) != 0 {
|
||||
t.Errorf("expected no conflict, got %+v", got)
|
||||
}
|
||||
@@ -89,18 +89,80 @@ func TestSkillsFolderConflicts_DifferentFiltersKeepsFirstName(t *testing.T) {
|
||||
"warp": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills", Include: []string{"x*"}}},
|
||||
"amp": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills"}},
|
||||
"witsy": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills"}},
|
||||
})
|
||||
}, "")
|
||||
want := []SkillsFolderConflict{{Path: "/tmp/agents/skills", Targets: []string{"amp", "warp", "witsy"}, Keep: "amp", Stop: []string{"warp", "witsy"}}}
|
||||
if !slices.EqualFunc(got, want, conflictEqual) {
|
||||
t.Errorf("SkillsFolderConflicts = %+v, want %+v", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSkillsFolderConflicts_DifferentTargetNaming(t *testing.T) {
|
||||
got := SkillsFolderConflicts(map[string]TargetConfig{
|
||||
"aflat": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills", Mode: "merge", TargetNaming: "flat"}},
|
||||
"bstd": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills", Mode: "merge", TargetNaming: "standard"}},
|
||||
}, "")
|
||||
want := []SkillsFolderConflict{{Path: "/tmp/agents/skills", Targets: []string{"aflat", "bstd"}, Keep: "aflat", Stop: []string{"bstd"}}}
|
||||
if !slices.EqualFunc(got, want, conflictEqual) {
|
||||
t.Errorf("SkillsFolderConflicts = %+v, want %+v", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSkillsFolderConflicts_DifferentMode(t *testing.T) {
|
||||
got := SkillsFolderConflicts(map[string]TargetConfig{
|
||||
"amerge": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills", Mode: "merge"}},
|
||||
"bcopy": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills", Mode: "copy"}},
|
||||
}, "")
|
||||
want := []SkillsFolderConflict{{Path: "/tmp/agents/skills", Targets: []string{"amerge", "bcopy"}, Keep: "amerge", Stop: []string{"bcopy"}}}
|
||||
if !slices.EqualFunc(got, want, conflictEqual) {
|
||||
t.Errorf("SkillsFolderConflicts = %+v, want %+v", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSkillsFolderConflicts_SymlinkIgnoresTargetNaming(t *testing.T) {
|
||||
got := SkillsFolderConflicts(map[string]TargetConfig{
|
||||
"aflat": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills", Mode: "symlink", TargetNaming: "flat"}},
|
||||
"bstd": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills", TargetNaming: "standard"}},
|
||||
}, "symlink")
|
||||
if len(got) != 0 {
|
||||
t.Errorf("expected no conflict, got %+v", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSkillsFolderConflicts_SymlinkIgnoresFilters(t *testing.T) {
|
||||
got := SkillsFolderConflicts(map[string]TargetConfig{
|
||||
"universal": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills", Mode: "symlink", Exclude: []string{"x"}}},
|
||||
"codex": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills", Mode: "symlink"}},
|
||||
}, "")
|
||||
if len(got) != 0 {
|
||||
t.Errorf("expected no conflict, got %+v", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSkillsFolderConflicts_UnsetEqualsDefault(t *testing.T) {
|
||||
got := SkillsFolderConflicts(map[string]TargetConfig{
|
||||
"unset": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills"}},
|
||||
"explicit": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills", Mode: "merge", TargetNaming: "flat"}},
|
||||
}, "")
|
||||
if len(got) != 0 {
|
||||
t.Errorf("expected no conflict, got %+v", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSkillsFolderConflicts_UnsetModeInheritsDefault(t *testing.T) {
|
||||
got := SkillsFolderConflicts(map[string]TargetConfig{
|
||||
"unset": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills"}},
|
||||
"explicit": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills", Mode: "copy"}},
|
||||
}, "copy")
|
||||
if len(got) != 0 {
|
||||
t.Errorf("expected no conflict, got %+v", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSkillsFolderConflicts_IgnoresSkillsOff(t *testing.T) {
|
||||
got := SkillsFolderConflicts(map[string]TargetConfig{
|
||||
"universal": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills", Exclude: []string{"x"}}},
|
||||
"codex": disabledAt("/tmp/agents/skills"),
|
||||
})
|
||||
}, "")
|
||||
if len(got) != 0 {
|
||||
t.Errorf("expected no conflict with skills off, got %+v", got)
|
||||
}
|
||||
@@ -109,3 +171,21 @@ func TestSkillsFolderConflicts_IgnoresSkillsOff(t *testing.T) {
|
||||
func conflictEqual(a, b SkillsFolderConflict) bool {
|
||||
return filepath.ToSlash(a.Path) == filepath.ToSlash(b.Path) && a.Keep == b.Keep && slices.Equal(a.Targets, b.Targets) && slices.Equal(a.Stop, b.Stop)
|
||||
}
|
||||
|
||||
func TestSkillsSharedWith(t *testing.T) {
|
||||
targets := map[string]TargetConfig{
|
||||
"universal": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills"}},
|
||||
"codex": {Skills: &ResourceTargetConfig{Path: "/tmp/agents/skills/"}},
|
||||
"off": disabledAt("/tmp/agents/skills"),
|
||||
"claude": {Skills: &ResourceTargetConfig{Path: "/tmp/claude/skills"}},
|
||||
}
|
||||
if got := SkillsSharedWith(targets, "universal"); !slices.Equal(got, []string{"codex"}) {
|
||||
t.Errorf("SkillsSharedWith(universal) = %v, want [codex]", got)
|
||||
}
|
||||
if got := SkillsSharedWith(targets, "off"); got != nil {
|
||||
t.Errorf("SkillsSharedWith(off) = %v, want nil for a target with skills off", got)
|
||||
}
|
||||
if got := SkillsSharedWith(targets, "claude"); got != nil {
|
||||
t.Errorf("SkillsSharedWith(claude) = %v, want nil", got)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,27 @@ func SkillsAlsoReadBy(targets map[string]TargetConfig, name, projectRoot string)
|
||||
return names
|
||||
}
|
||||
|
||||
// SkillsSharedWith names the other targets with skills on that write to the
|
||||
// same skills folder as target name, or nil when name has skills off itself.
|
||||
func SkillsSharedWith(targets map[string]TargetConfig, name string) []string {
|
||||
tc, ok := targets[name]
|
||||
if !ok || !tc.SkillsConfig().IsEnabled() {
|
||||
return nil
|
||||
}
|
||||
folder := skillsFolder(tc)
|
||||
if folder == "" {
|
||||
return nil
|
||||
}
|
||||
var names []string
|
||||
for other, otc := range targets {
|
||||
if other != name && otc.SkillsConfig().IsEnabled() && skillsFolder(otc) == folder {
|
||||
names = append(names, other)
|
||||
}
|
||||
}
|
||||
sort.Strings(names)
|
||||
return names
|
||||
}
|
||||
|
||||
// SkillsReadFrom names the configured targets with skills on whose skills
|
||||
// folder the built-in tool name reads. name need not be configured, so the
|
||||
// add-target list can say a tool already sees another target's skills.
|
||||
|
||||
@@ -140,8 +140,8 @@ type syncOutcome struct {
|
||||
// folderConflicts returns the skills folders whose targets undo each other's
|
||||
// sync, never nil, plus how many targets overlap in a way they don't explain.
|
||||
// harmless is passed on to config.DetectPathOverlap.
|
||||
func folderConflicts(targets map[string]config.TargetConfig, isProject bool, harmless func(scanner, writer string) bool) ([]config.SkillsFolderConflict, int) {
|
||||
conflicts := config.SkillsFolderConflicts(targets)
|
||||
func folderConflicts(targets map[string]config.TargetConfig, isProject bool, defaultMode string, harmless func(scanner, writer string) bool) ([]config.SkillsFolderConflict, int) {
|
||||
conflicts := config.SkillsFolderConflicts(targets, defaultMode)
|
||||
explained := map[string]bool{}
|
||||
for _, c := range conflicts {
|
||||
for _, name := range c.Targets {
|
||||
@@ -406,7 +406,7 @@ func (s *Server) syncResources(start time.Time, dryRun, force bool, kind, projec
|
||||
}
|
||||
s.writeOpsLog("sync", status, start, logArgs, "")
|
||||
|
||||
conflicts, overlap := folderConflicts(s.cfg.Targets, s.IsProjectMode(),
|
||||
conflicts, overlap := folderConflicts(s.cfg.Targets, s.IsProjectMode(), globalMode,
|
||||
ssync.HarmlessOverlap(s.cfg.Targets, globalMode, allSkills))
|
||||
// Targets sync from a map; a fixed order keeps the dashboard's notices still.
|
||||
slices.SortFunc(unmatched, func(a, b unmatchedInclude) int { return strings.Compare(a.Target, b.Target) })
|
||||
@@ -614,7 +614,7 @@ func (s *Server) handleDiff(w http.ResponseWriter, r *http.Request) {
|
||||
globalMode := s.cfg.Mode
|
||||
ignorePatterns := ssync.EffectiveFileIgnorePatterns(s.cfg.Ignore)
|
||||
targets := s.cloneTargets()
|
||||
conflicts, _ := folderConflicts(targets, s.IsProjectMode(), nil)
|
||||
conflicts, _ := folderConflicts(targets, s.IsProjectMode(), globalMode, nil)
|
||||
s.mu.RUnlock()
|
||||
|
||||
if globalMode == "" {
|
||||
|
||||
@@ -50,6 +50,9 @@ type targetItem struct {
|
||||
// skills off whose tool reads this target's folder.
|
||||
SkillsReadFrom []string `json:"skillsReadFrom,omitempty"`
|
||||
SkillsAlsoReadBy []string `json:"skillsAlsoReadBy,omitempty"`
|
||||
// SkillsSharedWith names the other targets with skills on that write to this
|
||||
// target's skills folder, so the page can warn when their settings differ.
|
||||
SkillsSharedWith []string `json:"skillsSharedWith,omitempty"`
|
||||
}
|
||||
|
||||
var removeTargetPath = os.Remove
|
||||
@@ -173,6 +176,7 @@ func (s *Server) handleListTargets(w http.ResponseWriter, r *http.Request) {
|
||||
item.Status = status.String()
|
||||
}
|
||||
item.SkillsAlsoReadBy = config.SkillsAlsoReadBy(targets, name, projectRoot)
|
||||
item.SkillsSharedWith = config.SkillsSharedWith(targets, name)
|
||||
|
||||
var agentSummary *targetsummary.AgentSummary
|
||||
if isProjectMode {
|
||||
|
||||
@@ -44,6 +44,7 @@ type skillsTargetItem struct {
|
||||
SkillsEnabled bool `json:"skillsEnabled"`
|
||||
SkillsReadFrom []string `json:"skillsReadFrom"`
|
||||
SkillsAlsoReadBy []string `json:"skillsAlsoReadBy"`
|
||||
SkillsSharedWith []string `json:"skillsSharedWith"`
|
||||
LinkedCount int `json:"linkedCount"`
|
||||
}
|
||||
|
||||
@@ -99,6 +100,19 @@ func TestSkillsOffPreview_SharedFolder(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestListTargets_NamesTargetsSharingASkillsFolder(t *testing.T) {
|
||||
shared := filepath.Join(t.TempDir(), "agents", "skills")
|
||||
s, _ := newTestServerWithTargets(t, map[string]string{"universal": shared, "codex": shared, "claude": filepath.Join(t.TempDir(), "claude", "skills")})
|
||||
|
||||
items := listSkillsTargets(t, s)
|
||||
if !slices.Equal(items["universal"].SkillsSharedWith, []string{"codex"}) || !slices.Equal(items["codex"].SkillsSharedWith, []string{"universal"}) {
|
||||
t.Errorf("universal = %+v, codex = %+v", items["universal"], items["codex"])
|
||||
}
|
||||
if len(items["claude"].SkillsSharedWith) != 0 {
|
||||
t.Errorf("claude = %+v, want no sharing", items["claude"])
|
||||
}
|
||||
}
|
||||
|
||||
func TestUpdateTarget_SkillsOffDetachesAndPersists(t *testing.T) {
|
||||
s, _, _, gemini := newSkillsOffServer(t)
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ a folder an enabled target also writes to is left alone. `sync`/`diff`/`status`/
|
||||
skip the target's skills. `--skills` cannot be combined with include/exclude flags in one
|
||||
command. Works with `-p`.
|
||||
|
||||
When `sync` warns that two targets "sync skills to <folder> with different filters, so each
|
||||
When `sync` warns that two targets "sync skills to <folder> with different settings, so each
|
||||
sync undoes the other", run the `skillshare target <name> --skills=false` it prints.
|
||||
|
||||
## Project Targets (`-p`)
|
||||
|
||||
@@ -280,7 +280,7 @@ targets:
|
||||
}
|
||||
|
||||
// TestSync_SharedPath_DifferentFiltersWarns covers two targets sharing a
|
||||
// skills folder with different filters: each sync undoes the other, so sync
|
||||
// skills folder with different settings: each sync undoes the other, so sync
|
||||
// names them and says how to keep one.
|
||||
func TestSync_SharedPath_DifferentFiltersWarns(t *testing.T) {
|
||||
sb := testutil.NewSandbox(t)
|
||||
@@ -305,7 +305,7 @@ targets:
|
||||
|
||||
result := sb.RunCLI("sync")
|
||||
result.AssertSuccess(t)
|
||||
result.AssertOutputContains(t, "codex and universal sync skills to ~/.agents/skills with different filters, so each sync undoes the other")
|
||||
result.AssertOutputContains(t, "codex and universal sync skills to ~/.agents/skills with different settings, so each sync undoes the other")
|
||||
result.AssertOutputContains(t, "keep one: skillshare target codex --skills=false")
|
||||
result.AssertOutputNotContains(t, "Skill path overlap")
|
||||
}
|
||||
|
||||
@@ -67,6 +67,8 @@ export interface Target {
|
||||
skillsReadFrom?: string[];
|
||||
/** Targets with skills off that read this target's skills folder. */
|
||||
skillsAlsoReadBy?: string[];
|
||||
/** Other targets with skills on that write to this target's skills folder. */
|
||||
skillsSharedWith?: string[];
|
||||
}
|
||||
|
||||
export interface SkillsDetach {
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
import { TriangleAlert } from 'lucide-react';
|
||||
import type { FolderConflict, Target } from '../../api/client';
|
||||
import { useI18n, useT } from '../../i18n';
|
||||
import { shortenHome } from '../../lib/paths';
|
||||
import Button from '../Button';
|
||||
import { NAMES, TargetLinks } from '../targets/FilterSection';
|
||||
import { joinList } from '../targets/targetView';
|
||||
|
||||
/** Include and exclude as a short phrase; sorted, because the server compares them as sets. */
|
||||
function filterSummary(x: Target, t: ReturnType<typeof useT>, locale: string) {
|
||||
const parts = [
|
||||
x.include.length > 0 && t('sync.folderConflict.filters.include', { names: joinList([...x.include].sort(), locale) }),
|
||||
x.exclude.length > 0 && t('sync.folderConflict.filters.exclude', { names: joinList([...x.exclude].sort(), locale) }),
|
||||
].filter(Boolean);
|
||||
return parts.length > 0 ? parts.join(' · ') : t('sync.folderConflict.filters.all');
|
||||
}
|
||||
|
||||
/** A folder that targets sync into with different settings: what to stop, and which settings differ. */
|
||||
export default function FolderConflictNotice({ conflict, targets, onStop }: { conflict: FolderConflict; targets: Target[]; onStop: (name: string) => void }) {
|
||||
const t = useT();
|
||||
const { locale } = useI18n();
|
||||
// The target kept first, as its column.
|
||||
const columns = [conflict.keep, ...conflict.stop].map((name) => targets.find((x) => x.name === name)).filter((x): x is Target => !!x);
|
||||
// Symlink links the whole folder, so naming and filters say nothing there (null).
|
||||
const rows = [
|
||||
{ key: 'mode', label: 'targetDetail.syncMode', tag: true, value: (x: Target) => x.mode },
|
||||
{ key: 'naming', label: 'targetDetail.naming', tag: true, value: (x: Target) => (x.mode === 'symlink' ? null : x.targetNaming) },
|
||||
{ key: 'filters', label: 'sync.folderConflict.filters', tag: false, value: (x: Target) => (x.mode === 'symlink' ? null : filterSummary(x, t, locale)) },
|
||||
].filter((r) => new Set(columns.map(r.value).filter((v) => v !== null)).size > 1);
|
||||
|
||||
return (
|
||||
<div className="ss-note warn flex-col !items-stretch">
|
||||
<div className="flex flex-wrap items-center gap-x-2.5 gap-y-2">
|
||||
<TriangleAlert size={16} className="shrink-0 text-warn" />
|
||||
<span className="min-w-0 flex-1 basis-80">{t('sync.folderConflict.text', { names: joinList(conflict.targets, locale), path: shortenHome(conflict.path) })}</span>
|
||||
{conflict.stop.map((name) => (
|
||||
<Button key={name} variant="secondary" size="sm" onClick={() => onStop(name)}>
|
||||
{t('sync.folderConflict.stop', { name })}
|
||||
</Button>
|
||||
))}
|
||||
</div>
|
||||
{rows.length > 0 && (
|
||||
<div className="flex flex-col gap-2 pl-[26px]">
|
||||
<table className="w-full table-fixed border-collapse text-left [border-top:var(--sep)]">
|
||||
<colgroup><col className="w-24" />{columns.map((x) => <col key={x.name} />)}</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<td aria-hidden="true" className="pb-1 pr-4 pt-2" />
|
||||
{columns.map((x) => (
|
||||
<th key={x.name} scope="col" className="break-words pb-1 pr-4 pt-2 text-[12px] font-medium text-ink-3">
|
||||
{x.name === conflict.keep ? t('sync.folderConflict.keeps', { name: x.name }) : x.name}
|
||||
</th>
|
||||
))}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{rows.map((r) => (
|
||||
<tr key={r.key}>
|
||||
<th scope="row" className="py-1.5 pr-4 text-left align-top font-semibold">{t(r.label)}</th>
|
||||
{columns.map((x) => {
|
||||
const v = r.value(x);
|
||||
return (
|
||||
<td key={x.name} className="break-words py-1.5 pr-4 align-top text-ink-2">
|
||||
{v === null ? t('sync.folderConflict.na') : r.tag ? <span className="ss-tag">{v}</span> : v}
|
||||
</td>
|
||||
);
|
||||
})}
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
<div className="text-ink-2"><TargetLinks sentence={t('sync.folderConflict.hint', { names: NAMES })} names={conflict.stop} /></div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -177,27 +177,34 @@ export function ModePicker({ kind, mode, onChange, disabled }: { kind: Kind; mod
|
||||
}
|
||||
|
||||
// Stands in for the names in a sentence, which are then put back as links.
|
||||
const NAMES = '\u0000';
|
||||
export const NAMES = '\u0000';
|
||||
|
||||
/** A sentence with its NAMES placeholder replaced by links to those targets. */
|
||||
export function TargetLinks({ sentence, names }: { sentence: string; names: string[] }) {
|
||||
const t = useT();
|
||||
const [before, after = ''] = sentence.split(NAMES);
|
||||
return (
|
||||
<p className="min-w-0">
|
||||
{before}
|
||||
{names.map((n, i) => (
|
||||
<Fragment key={n}>
|
||||
{i > 0 && t('instructions.shared.listSep')}
|
||||
<Link to={`/targets/${encodeURIComponent(n)}`} className="font-semibold underline-offset-2 hover:underline">{n}</Link>
|
||||
</Fragment>
|
||||
))}
|
||||
{after}
|
||||
</p>
|
||||
);
|
||||
}
|
||||
|
||||
/** Other targets tied to this folder, as a note so it does not read as a filter pattern. */
|
||||
function TargetRow({ sentence, names }: { sentence: string; names: string[] }) {
|
||||
const t = useT();
|
||||
const [before, after = ''] = sentence.split(NAMES);
|
||||
return (
|
||||
<div className="ss-note items-center">
|
||||
<span className="ss-stack shrink-0" aria-hidden="true">
|
||||
{names.slice(0, 5).map((n) => <span key={n} className="ss-at !h-6 !w-6"><AgentIcon target={n} size={13} /></span>)}
|
||||
</span>
|
||||
<p className="min-w-0">
|
||||
{before}
|
||||
{names.map((n, i) => (
|
||||
<Fragment key={n}>
|
||||
{i > 0 && t('instructions.shared.listSep')}
|
||||
<Link to={`/targets/${encodeURIComponent(n)}`} className="font-semibold underline-offset-2 hover:underline">{n}</Link>
|
||||
</Fragment>
|
||||
))}
|
||||
{after}
|
||||
</p>
|
||||
<TargetLinks sentence={sentence} names={names} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1784,7 +1784,7 @@
|
||||
"targetDetail.mode.merge.skill": "Ein Symlink pro Skill. Skills, die du in diesem Ziel erstellt hast, bleiben unberührt.",
|
||||
"targetDetail.mode.merge.agent": "Ein Symlink pro Agent-Datei. Agents, die du in diesem Ziel erstellt hast, bleiben unberührt.",
|
||||
"targetDetail.mode.copy": "Echte Kopien. Für Tools, die Symlinks nicht folgen können.",
|
||||
"targetDetail.mode.symlink": "Der ganze Ordner wird zu einem Symlink. Filter gelten in diesem Modus nicht.",
|
||||
"targetDetail.mode.symlink": "Der ganze Ordner wird zu einem Symlink. Filter und Benennung gelten in diesem Modus nicht.",
|
||||
"targetDetail.naming": "Benennung",
|
||||
"targetDetail.namingFlat": "Verschachtelte Skills bekommen flache, mit __ verbundene Namen.",
|
||||
"targetDetail.namingStandard": "Skills verwenden den Namen aus SKILL.md.",
|
||||
@@ -1792,6 +1792,11 @@
|
||||
"targetDetail.prefixedNeedsCopy": "prefixed braucht den copy-Modus, weil es den Namen in jeder Kopie umschreibt.",
|
||||
"targetDetail.prefixedNeedsCopyTitle": "Braucht den copy-Modus",
|
||||
"targetDetail.pending": "ausstehend",
|
||||
"targetDetail.shared.mode": "{other} synchronisiert ebenfalls Skills nach {path}, mit {theirs}. Mit {mine} würde jede Synchronisierung die andere rückgängig machen.",
|
||||
"targetDetail.shared.naming": "{other} synchronisiert ebenfalls Skills nach {path}, mit {theirs}-Benennung. Mit {mine} würde jede Synchronisierung die andere rückgängig machen.",
|
||||
"targetDetail.shared.use": "{value} wie {other} verwenden",
|
||||
"targetDetail.shared.filters": "{other} synchronisiert ebenfalls Skills nach {path}, mit anderen Filtern. Jede Synchronisierung würde wieder hinzufügen oder entfernen, was die andere herausfiltert.",
|
||||
"targetDetail.shared.useFilters": "Dieselben Filter wie {other} verwenden",
|
||||
"targetDetail.skipped.one": "{count} Skill kann die Standardbenennung nicht nutzen und wird übersprungen. Probiere flat.",
|
||||
"targetDetail.skipped.other": "{count} Skills können die Standardbenennung nicht nutzen und werden übersprungen. Probiere flat.",
|
||||
"targetDetail.collect": "Sammeln",
|
||||
@@ -1903,8 +1908,15 @@
|
||||
"sync.local.hint": "Die Synchronisierung lässt sie unberührt. Sammeln holt sie in deine Quelle.",
|
||||
"sync.local.collect": "Sammeln",
|
||||
"sync.forceHint": "Dateien ersetzen, die in einem Ziel bearbeitet wurden",
|
||||
"sync.folderConflict.text": "{names} synchronisieren Skills mit unterschiedlichen Filtern in denselben Ordner {path}, sodass jede Synchronisierung die andere rückgängig macht.",
|
||||
"sync.folderConflict.text": "{names} synchronisieren Skills mit unterschiedlichen Einstellungen in denselben Ordner {path}, sodass jede Synchronisierung die andere rückgängig macht.",
|
||||
"sync.folderConflict.stop": "Skills für {name} nicht mehr synchronisieren",
|
||||
"sync.folderConflict.keeps": "{name} · schreibt weiter",
|
||||
"sync.folderConflict.filters": "Filter",
|
||||
"sync.folderConflict.filters.include": "enthält {names}",
|
||||
"sync.folderConflict.filters.exclude": "schließt {names} aus",
|
||||
"sync.folderConflict.filters.all": "alle Skills",
|
||||
"sync.folderConflict.na": "entfällt",
|
||||
"sync.folderConflict.hint": "Nur die abweichenden Zeilen sind aufgeführt. Um beide beizubehalten, gib {names} auf der Zielseite dieselben Einstellungen.",
|
||||
"sync.error.showDetails": "Diagnose anzeigen",
|
||||
"sync.error.hideDetails": "Diagnose ausblenden",
|
||||
"sync.last.title": "Letzte Skills-/Agents-Sync",
|
||||
|
||||
@@ -1784,7 +1784,7 @@
|
||||
"targetDetail.mode.merge.skill": "One symlink per skill. Skills you made inside this target are left alone.",
|
||||
"targetDetail.mode.merge.agent": "One symlink per agent file. Agents you made inside this target are left alone.",
|
||||
"targetDetail.mode.copy": "Real copies. For tools that cannot follow symlinks.",
|
||||
"targetDetail.mode.symlink": "The whole folder becomes one symlink. Filters do not apply in this mode.",
|
||||
"targetDetail.mode.symlink": "The whole folder becomes one symlink. Filters and naming do not apply in this mode.",
|
||||
"targetDetail.naming": "Naming",
|
||||
"targetDetail.namingFlat": "Nested skills get flat names joined with __.",
|
||||
"targetDetail.namingStandard": "Skills use the name from SKILL.md.",
|
||||
@@ -1792,6 +1792,11 @@
|
||||
"targetDetail.prefixedNeedsCopy": "prefixed needs copy mode, because it rewrites the name inside each copy.",
|
||||
"targetDetail.prefixedNeedsCopyTitle": "Needs copy mode",
|
||||
"targetDetail.pending": "pending",
|
||||
"targetDetail.shared.mode": "{other} also syncs skills to {path}, with {theirs}. With {mine}, each sync would undo the other.",
|
||||
"targetDetail.shared.naming": "{other} also syncs skills to {path}, with {theirs} naming. With {mine}, each sync would undo the other.",
|
||||
"targetDetail.shared.use": "Use {value} like {other}",
|
||||
"targetDetail.shared.filters": "{other} also syncs skills to {path}, with different filters. Each sync would add back or remove what the other filters out.",
|
||||
"targetDetail.shared.useFilters": "Use the same filters as {other}",
|
||||
"targetDetail.skipped.one": "{count} skill can't use standard naming and is skipped. Try flat.",
|
||||
"targetDetail.skipped.other": "{count} skills can't use standard naming and are skipped. Try flat.",
|
||||
"targetDetail.collect": "Collect",
|
||||
@@ -1903,8 +1908,15 @@
|
||||
"sync.local.hint": "Sync leaves them alone. Collect brings them into your source.",
|
||||
"sync.local.collect": "Collect",
|
||||
"sync.forceHint": "Replace files that were edited inside a target",
|
||||
"sync.folderConflict.text": "{names} sync skills to the same folder {path} with different filters, so each sync undoes the other.",
|
||||
"sync.folderConflict.text": "{names} sync skills to the same folder {path} with different settings, so each sync undoes the other.",
|
||||
"sync.folderConflict.stop": "Stop syncing skills for {name}",
|
||||
"sync.folderConflict.keeps": "{name} · keeps writing",
|
||||
"sync.folderConflict.filters": "Filters",
|
||||
"sync.folderConflict.filters.include": "includes {names}",
|
||||
"sync.folderConflict.filters.exclude": "excludes {names}",
|
||||
"sync.folderConflict.filters.all": "all skills",
|
||||
"sync.folderConflict.na": "n/a",
|
||||
"sync.folderConflict.hint": "Only the rows that differ are listed. To keep both, give {names} the same settings on the target page.",
|
||||
"sync.error.showDetails": "Show diagnostics",
|
||||
"sync.error.hideDetails": "Hide diagnostics",
|
||||
"sync.last.title": "Last skills and agents sync",
|
||||
|
||||
@@ -1784,7 +1784,7 @@
|
||||
"targetDetail.mode.merge.skill": "Un enlace simbólico por skill. Los skills que creaste dentro de este destino no se tocan.",
|
||||
"targetDetail.mode.merge.agent": "Un enlace simbólico por archivo de agent. Los agents que creaste dentro de este destino no se tocan.",
|
||||
"targetDetail.mode.copy": "Copias reales. Para herramientas que no pueden seguir enlaces simbólicos.",
|
||||
"targetDetail.mode.symlink": "La carpeta completa se convierte en un enlace simbólico. Los filtros no se aplican en este modo.",
|
||||
"targetDetail.mode.symlink": "La carpeta completa se convierte en un enlace simbólico. Los filtros y los nombres no se aplican en este modo.",
|
||||
"targetDetail.naming": "Nombres",
|
||||
"targetDetail.namingFlat": "Los skills anidados reciben nombres planos unidos con __.",
|
||||
"targetDetail.namingStandard": "Los skills usan el nombre de SKILL.md.",
|
||||
@@ -1792,6 +1792,11 @@
|
||||
"targetDetail.prefixedNeedsCopy": "prefixed necesita el modo copy, porque reescribe el nombre dentro de cada copia.",
|
||||
"targetDetail.prefixedNeedsCopyTitle": "Necesita el modo copy",
|
||||
"targetDetail.pending": "pendiente",
|
||||
"targetDetail.shared.mode": "{other} también sincroniza skills en {path}, con {theirs}. Con {mine}, cada sincronización desharía la otra.",
|
||||
"targetDetail.shared.naming": "{other} también sincroniza skills en {path}, con nombres {theirs}. Con {mine}, cada sincronización desharía la otra.",
|
||||
"targetDetail.shared.use": "Usar {value} como {other}",
|
||||
"targetDetail.shared.filters": "{other} también sincroniza skills en {path}, con otros filtros. Cada sincronización volvería a añadir o quitaría lo que la otra filtra.",
|
||||
"targetDetail.shared.useFilters": "Usar los mismos filtros que {other}",
|
||||
"targetDetail.skipped.one": "{count} skill no puede usar nombres estándar y se omite. Prueba flat.",
|
||||
"targetDetail.skipped.other": "{count} skills no pueden usar nombres estándar y se omiten. Prueba flat.",
|
||||
"targetDetail.collect": "Recopilar",
|
||||
@@ -1903,8 +1908,15 @@
|
||||
"sync.local.hint": "La sincronización no los toca. Recopilar los trae a tu origen.",
|
||||
"sync.local.collect": "Recopilar",
|
||||
"sync.forceHint": "Reemplazar archivos editados dentro de un destino",
|
||||
"sync.folderConflict.text": "{names} sincronizan skills en la misma carpeta {path} con filtros distintos, así que cada sincronización deshace la otra.",
|
||||
"sync.folderConflict.text": "{names} sincronizan skills en la misma carpeta {path} con ajustes distintos, así que cada sincronización deshace la otra.",
|
||||
"sync.folderConflict.stop": "Dejar de sincronizar skills con {name}",
|
||||
"sync.folderConflict.keeps": "{name} · sigue escribiendo",
|
||||
"sync.folderConflict.filters": "Filtros",
|
||||
"sync.folderConflict.filters.include": "incluye {names}",
|
||||
"sync.folderConflict.filters.exclude": "excluye {names}",
|
||||
"sync.folderConflict.filters.all": "todos los skills",
|
||||
"sync.folderConflict.na": "n/d",
|
||||
"sync.folderConflict.hint": "Solo se muestran las filas que difieren. Para conservar ambos, da a {names} los mismos ajustes en la página del destino.",
|
||||
"sync.error.showDetails": "Mostrar diagnóstico",
|
||||
"sync.error.hideDetails": "Ocultar diagnóstico",
|
||||
"sync.last.title": "Última sync de skills y agents",
|
||||
|
||||
@@ -1784,7 +1784,7 @@
|
||||
"targetDetail.mode.merge.skill": "یک symlink برای هر اسکیل. اسکیلهایی که داخل این هدف ساختهاید دست نمیخورند.",
|
||||
"targetDetail.mode.merge.agent": "یک symlink برای هر فایل Agent. Agentهایی که داخل این هدف ساختهاید دست نمیخورند.",
|
||||
"targetDetail.mode.copy": "کپی واقعی. برای ابزارهایی که نمیتوانند symlink را دنبال کنند.",
|
||||
"targetDetail.mode.symlink": "کل پوشه یک symlink میشود. فیلترها در این حالت اعمال نمیشوند.",
|
||||
"targetDetail.mode.symlink": "کل پوشه یک symlink میشود. فیلترها و نامگذاری در این حالت اعمال نمیشوند.",
|
||||
"targetDetail.naming": "نامگذاری",
|
||||
"targetDetail.namingFlat": "اسکیلهای تودرتو نام تخت با __ میگیرند.",
|
||||
"targetDetail.namingStandard": "اسکیلها از نام داخل SKILL.md استفاده میکنند.",
|
||||
@@ -1792,6 +1792,11 @@
|
||||
"targetDetail.prefixedNeedsCopy": "prefixed به حالت copy نیاز دارد، چون نام را درون هر کپی بازنویسی میکند.",
|
||||
"targetDetail.prefixedNeedsCopyTitle": "به حالت copy نیاز دارد",
|
||||
"targetDetail.pending": "در انتظار",
|
||||
"targetDetail.shared.mode": "{other} هم Skills را در {path} همگامسازی میکند، با {theirs}. با {mine}، هر همگامسازی کار دیگری را خنثی میکند.",
|
||||
"targetDetail.shared.naming": "{other} هم Skills را در {path} همگامسازی میکند، با نامگذاری {theirs}. با {mine}، هر همگامسازی کار دیگری را خنثی میکند.",
|
||||
"targetDetail.shared.use": "استفاده از {value} مثل {other}",
|
||||
"targetDetail.shared.filters": "{other} هم Skills را در {path} همگامسازی میکند، با فیلترهای متفاوت. هر همگامسازی چیزی را که دیگری فیلتر میکند دوباره اضافه یا حذف میکند.",
|
||||
"targetDetail.shared.useFilters": "استفاده از همان فیلترهای {other}",
|
||||
"targetDetail.skipped.one": "{count} اسکیل نمیتواند از نامگذاری standard استفاده کند و نادیده گرفته میشود. flat را امتحان کنید.",
|
||||
"targetDetail.skipped.other": "{count} اسکیل نمیتوانند از نامگذاری standard استفاده کنند و نادیده گرفته میشوند. flat را امتحان کنید.",
|
||||
"targetDetail.collect": "جمعآوری",
|
||||
@@ -1903,8 +1908,15 @@
|
||||
"sync.local.hint": "همگامسازی به آنها دست نمیزند. جمعآوری آنها را به منبع شما میآورد.",
|
||||
"sync.local.collect": "جمعآوری",
|
||||
"sync.forceHint": "فایلهایی را که داخل هدف ویرایش شدهاند جایگزین کن",
|
||||
"sync.folderConflict.text": "{names} Skills را با فیلترهای متفاوت در یک پوشه ({path}) همگامسازی میکنند، بنابراین هر همگامسازی کار دیگری را خنثی میکند.",
|
||||
"sync.folderConflict.text": "{names} Skills را با تنظیمات متفاوت در یک پوشه ({path}) همگامسازی میکنند، بنابراین هر همگامسازی کار دیگری را خنثی میکند.",
|
||||
"sync.folderConflict.stop": "توقف همگامسازی Skills برای {name}",
|
||||
"sync.folderConflict.keeps": "{name} · همچنان مینویسد",
|
||||
"sync.folderConflict.filters": "فیلترها",
|
||||
"sync.folderConflict.filters.include": "شامل {names}",
|
||||
"sync.folderConflict.filters.exclude": "بهجز {names}",
|
||||
"sync.folderConflict.filters.all": "همه Skills",
|
||||
"sync.folderConflict.na": "ندارد",
|
||||
"sync.folderConflict.hint": "فقط ردیفهایی که تفاوت دارند فهرست شدهاند. برای نگه داشتن هر دو، همین تنظیمات را در صفحه هدف برای {names} هم بگذارید.",
|
||||
"sync.error.showDetails": "نمایش جزئیات عیبیابی",
|
||||
"sync.error.hideDetails": "پنهان کردن جزئیات عیبیابی",
|
||||
"sync.last.title": "آخرین همگامسازی skills و agents",
|
||||
|
||||
@@ -1784,7 +1784,7 @@
|
||||
"targetDetail.mode.merge.skill": "Un lien symbolique par skill. Les skills créés dans cette cible ne sont pas touchés.",
|
||||
"targetDetail.mode.merge.agent": "Un lien symbolique par fichier d’agent. Les agents créés dans cette cible ne sont pas touchés.",
|
||||
"targetDetail.mode.copy": "De vraies copies. Pour les outils qui ne suivent pas les liens symboliques.",
|
||||
"targetDetail.mode.symlink": "Tout le dossier devient un lien symbolique. Les filtres ne s’appliquent pas dans ce mode.",
|
||||
"targetDetail.mode.symlink": "Tout le dossier devient un lien symbolique. Les filtres et le nommage ne s’appliquent pas dans ce mode.",
|
||||
"targetDetail.naming": "Nommage",
|
||||
"targetDetail.namingFlat": "Les skills imbriqués reçoivent des noms à plat joints par __.",
|
||||
"targetDetail.namingStandard": "Les skills utilisent le nom de SKILL.md.",
|
||||
@@ -1792,6 +1792,11 @@
|
||||
"targetDetail.prefixedNeedsCopy": "prefixed nécessite le mode copy, car il réécrit le nom dans chaque copie.",
|
||||
"targetDetail.prefixedNeedsCopyTitle": "Nécessite le mode copy",
|
||||
"targetDetail.pending": "en attente",
|
||||
"targetDetail.shared.mode": "{other} synchronise aussi des skills vers {path}, avec {theirs}. Avec {mine}, chaque synchronisation annulerait l’autre.",
|
||||
"targetDetail.shared.naming": "{other} synchronise aussi des skills vers {path}, avec le nommage {theirs}. Avec {mine}, chaque synchronisation annulerait l’autre.",
|
||||
"targetDetail.shared.use": "Utiliser {value} comme {other}",
|
||||
"targetDetail.shared.filters": "{other} synchronise aussi des skills vers {path}, avec d’autres filtres. Chaque synchronisation rajouterait ou retirerait ce que l’autre filtre.",
|
||||
"targetDetail.shared.useFilters": "Utiliser les mêmes filtres que {other}",
|
||||
"targetDetail.skipped.one": "{count} skill ne peut pas utiliser le nommage standard et est ignoré. Essayez flat.",
|
||||
"targetDetail.skipped.other": "{count} skills ne peuvent pas utiliser le nommage standard et sont ignorés. Essayez flat.",
|
||||
"targetDetail.collect": "Collecter",
|
||||
@@ -1903,8 +1908,15 @@
|
||||
"sync.local.hint": "La synchronisation n'y touche pas. Collecter les ramène dans votre source.",
|
||||
"sync.local.collect": "Collecter",
|
||||
"sync.forceHint": "Remplacer les fichiers modifiés dans une cible",
|
||||
"sync.folderConflict.text": "{names} synchronisent les skills dans le même dossier {path} avec des filtres différents : chaque synchronisation annule l’autre.",
|
||||
"sync.folderConflict.text": "{names} synchronisent les skills dans le même dossier {path} avec des paramètres différents : chaque synchronisation annule l’autre.",
|
||||
"sync.folderConflict.stop": "Arrêter de synchroniser les skills vers {name}",
|
||||
"sync.folderConflict.keeps": "{name} · continue d’écrire",
|
||||
"sync.folderConflict.filters": "Filtres",
|
||||
"sync.folderConflict.filters.include": "inclut {names}",
|
||||
"sync.folderConflict.filters.exclude": "exclut {names}",
|
||||
"sync.folderConflict.filters.all": "tous les skills",
|
||||
"sync.folderConflict.na": "s.o.",
|
||||
"sync.folderConflict.hint": "Seules les lignes qui diffèrent sont listées. Pour garder les deux, donnez à {names} les mêmes paramètres sur la page de la cible.",
|
||||
"sync.error.showDetails": "Afficher le diagnostic",
|
||||
"sync.error.hideDetails": "Masquer le diagnostic",
|
||||
"sync.last.title": "Dernière synchro skills et agents",
|
||||
|
||||
@@ -1784,7 +1784,7 @@
|
||||
"targetDetail.mode.merge.skill": "Satu symlink per skill. Skill yang Anda buat di dalam target ini tidak diubah.",
|
||||
"targetDetail.mode.merge.agent": "Satu symlink per file agent. Agent yang Anda buat di dalam target ini tidak diubah.",
|
||||
"targetDetail.mode.copy": "Salinan asli. Untuk alat yang tidak bisa mengikuti symlink.",
|
||||
"targetDetail.mode.symlink": "Seluruh folder menjadi satu symlink. Filter tidak berlaku dalam mode ini.",
|
||||
"targetDetail.mode.symlink": "Seluruh folder menjadi satu symlink. Filter dan penamaan tidak berlaku dalam mode ini.",
|
||||
"targetDetail.naming": "Penamaan",
|
||||
"targetDetail.namingFlat": "Skill bertingkat mendapat nama datar yang digabung dengan __.",
|
||||
"targetDetail.namingStandard": "Skill memakai nama dari SKILL.md.",
|
||||
@@ -1792,6 +1792,11 @@
|
||||
"targetDetail.prefixedNeedsCopy": "prefixed butuh mode copy, karena menulis ulang nama di dalam setiap salinan.",
|
||||
"targetDetail.prefixedNeedsCopyTitle": "Butuh mode copy",
|
||||
"targetDetail.pending": "tertunda",
|
||||
"targetDetail.shared.mode": "{other} juga menyinkronkan skill ke {path}, dengan {theirs}. Dengan {mine}, setiap sinkronisasi akan membatalkan yang lain.",
|
||||
"targetDetail.shared.naming": "{other} juga menyinkronkan skill ke {path}, dengan penamaan {theirs}. Dengan {mine}, setiap sinkronisasi akan membatalkan yang lain.",
|
||||
"targetDetail.shared.use": "Pakai {value} seperti {other}",
|
||||
"targetDetail.shared.filters": "{other} juga menyinkronkan skill ke {path}, dengan filter yang berbeda. Setiap sinkronisasi akan menambahkan kembali atau menghapus apa yang disaring yang lain.",
|
||||
"targetDetail.shared.useFilters": "Pakai filter yang sama dengan {other}",
|
||||
"targetDetail.skipped.one": "{count} skill tidak bisa memakai penamaan standard dan dilewati. Coba flat.",
|
||||
"targetDetail.skipped.other": "{count} skill tidak bisa memakai penamaan standard dan dilewati. Coba flat.",
|
||||
"targetDetail.collect": "Kumpulkan",
|
||||
@@ -1903,8 +1908,15 @@
|
||||
"sync.local.hint": "Sinkronisasi tidak menyentuhnya. Kumpulkan membawanya ke sumber Anda.",
|
||||
"sync.local.collect": "Kumpulkan",
|
||||
"sync.forceHint": "Ganti file yang diedit di dalam target",
|
||||
"sync.folderConflict.text": "{names} menyinkronkan skill ke folder yang sama {path} dengan filter berbeda, sehingga setiap sinkronisasi membatalkan yang lain.",
|
||||
"sync.folderConflict.text": "{names} menyinkronkan skill ke folder yang sama {path} dengan pengaturan berbeda, sehingga setiap sinkronisasi membatalkan yang lain.",
|
||||
"sync.folderConflict.stop": "Berhenti menyinkronkan skill ke {name}",
|
||||
"sync.folderConflict.keeps": "{name} · tetap menulis",
|
||||
"sync.folderConflict.filters": "Filter",
|
||||
"sync.folderConflict.filters.include": "menyertakan {names}",
|
||||
"sync.folderConflict.filters.exclude": "mengecualikan {names}",
|
||||
"sync.folderConflict.filters.all": "semua skill",
|
||||
"sync.folderConflict.na": "n/a",
|
||||
"sync.folderConflict.hint": "Hanya baris yang berbeda yang ditampilkan. Agar keduanya tetap jalan, beri {names} pengaturan yang sama di halaman target.",
|
||||
"sync.error.showDetails": "Tampilkan diagnostik",
|
||||
"sync.error.hideDetails": "Sembunyikan diagnostik",
|
||||
"sync.last.title": "Sync skills dan agents terakhir",
|
||||
|
||||
@@ -1784,7 +1784,7 @@
|
||||
"targetDetail.mode.merge.skill": "スキルごとに 1 つの symlink。このターゲット内で作ったスキルはそのままです。",
|
||||
"targetDetail.mode.merge.agent": "Agent ファイルごとに 1 つの symlink。このターゲット内で作った Agent はそのままです。",
|
||||
"targetDetail.mode.copy": "実ファイルのコピー。symlink をたどれないツール向けです。",
|
||||
"targetDetail.mode.symlink": "フォルダー全体を 1 つの symlink にします。このモードではフィルターは適用されません。",
|
||||
"targetDetail.mode.symlink": "フォルダー全体を 1 つの symlink にします。このモードではフィルターと命名は適用されません。",
|
||||
"targetDetail.naming": "命名",
|
||||
"targetDetail.namingFlat": "ネストしたスキルは __ でつないだフラット名になります。",
|
||||
"targetDetail.namingStandard": "スキルは SKILL.md の名前を使います。",
|
||||
@@ -1792,6 +1792,11 @@
|
||||
"targetDetail.prefixedNeedsCopy": "prefixed は各コピー内の名前を書き換えるため、copy モードが必要です。",
|
||||
"targetDetail.prefixedNeedsCopyTitle": "copy モードが必要です",
|
||||
"targetDetail.pending": "未保存",
|
||||
"targetDetail.shared.mode": "{other} も {path} に Skills を同期していて、{theirs} を使っています。{mine} にすると、同期のたびに互いの結果を打ち消します。",
|
||||
"targetDetail.shared.naming": "{other} も {path} に Skills を同期していて、命名は {theirs} です。{mine} にすると、同期のたびに互いの結果を打ち消します。",
|
||||
"targetDetail.shared.use": "{other} に合わせて {value} にする",
|
||||
"targetDetail.shared.filters": "{other} も {path} に Skills を同期していて、フィルターが異なります。同期のたびに、もう一方が除外したものを追加し直したり削除したりします。",
|
||||
"targetDetail.shared.useFilters": "{other} と同じフィルターにする",
|
||||
"targetDetail.skipped.one": "{count} 件のスキルは standard 命名を使えないためスキップされます。flat を試してください。",
|
||||
"targetDetail.skipped.other": "{count} 件のスキルは standard 命名を使えないためスキップされます。flat を試してください。",
|
||||
"targetDetail.collect": "収集",
|
||||
@@ -1903,8 +1908,15 @@
|
||||
"sync.local.hint": "同期では変更されません。収集するとソースに取り込めます。",
|
||||
"sync.local.collect": "収集",
|
||||
"sync.forceHint": "ターゲット内で編集されたファイルを置き換えます",
|
||||
"sync.folderConflict.text": "{names} は同じフォルダ {path} に異なるフィルターで Skills を同期しているため、同期のたびに互いの結果を打ち消します。",
|
||||
"sync.folderConflict.text": "{names} は同じフォルダ {path} に異なる設定で Skills を同期しているため、同期のたびに互いの結果を打ち消します。",
|
||||
"sync.folderConflict.stop": "{name} の Skills の同期を停止",
|
||||
"sync.folderConflict.keeps": "{name} · 書き込みを続ける",
|
||||
"sync.folderConflict.filters": "フィルター",
|
||||
"sync.folderConflict.filters.include": "{names} を含める",
|
||||
"sync.folderConflict.filters.exclude": "{names} を除外",
|
||||
"sync.folderConflict.filters.all": "すべてのスキル",
|
||||
"sync.folderConflict.na": "対象外",
|
||||
"sync.folderConflict.hint": "異なる行だけを表示しています。両方を残すには、ターゲットのページで {names} に同じ設定を指定してください。",
|
||||
"sync.error.showDetails": "診断情報を表示",
|
||||
"sync.error.hideDetails": "診断情報を隠す",
|
||||
"sync.last.title": "前回の skills・agents 同期",
|
||||
|
||||
@@ -1784,7 +1784,7 @@
|
||||
"targetDetail.mode.merge.skill": "skill마다 symlink 하나. 이 대상 안에서 만든 skill은 그대로 둡니다.",
|
||||
"targetDetail.mode.merge.agent": "agent 파일마다 symlink 하나. 이 대상 안에서 만든 agent는 그대로 둡니다.",
|
||||
"targetDetail.mode.copy": "실제 복사본. symlink를 따라가지 못하는 도구용입니다.",
|
||||
"targetDetail.mode.symlink": "폴더 전체가 symlink 하나가 됩니다. 이 모드에서는 필터가 적용되지 않습니다.",
|
||||
"targetDetail.mode.symlink": "폴더 전체가 symlink 하나가 됩니다. 이 모드에서는 필터와 이름 규칙이 적용되지 않습니다.",
|
||||
"targetDetail.naming": "이름 지정",
|
||||
"targetDetail.namingFlat": "중첩된 skill은 __로 이은 평면 이름을 받습니다.",
|
||||
"targetDetail.namingStandard": "skill은 SKILL.md의 이름을 사용합니다.",
|
||||
@@ -1792,6 +1792,11 @@
|
||||
"targetDetail.prefixedNeedsCopy": "prefixed는 각 복사본 안의 이름을 다시 쓰기 때문에 copy 모드가 필요합니다.",
|
||||
"targetDetail.prefixedNeedsCopyTitle": "copy 모드가 필요합니다",
|
||||
"targetDetail.pending": "저장 전",
|
||||
"targetDetail.shared.mode": "{other}도 {path}에 Skills를 동기화하며 {theirs}를 사용합니다. {mine}을(를) 쓰면 동기화할 때마다 서로의 결과를 되돌립니다.",
|
||||
"targetDetail.shared.naming": "{other}도 {path}에 Skills를 동기화하며 이름 규칙은 {theirs}입니다. {mine}을(를) 쓰면 동기화할 때마다 서로의 결과를 되돌립니다.",
|
||||
"targetDetail.shared.use": "{other}처럼 {value} 사용",
|
||||
"targetDetail.shared.filters": "{other}도 {path}에 Skills를 동기화하며 필터가 다릅니다. 동기화할 때마다 다른 target이 걸러낸 항목을 다시 추가하거나 제거합니다.",
|
||||
"targetDetail.shared.useFilters": "{other}와 같은 필터 사용",
|
||||
"targetDetail.skipped.one": "skill {count}개는 standard 이름을 쓸 수 없어 건너뜁니다. flat을 사용해 보세요.",
|
||||
"targetDetail.skipped.other": "skill {count}개는 standard 이름을 쓸 수 없어 건너뜁니다. flat을 사용해 보세요.",
|
||||
"targetDetail.collect": "수집",
|
||||
@@ -1903,8 +1908,15 @@
|
||||
"sync.local.hint": "동기화는 이 항목을 건드리지 않습니다. 수집하면 소스로 가져옵니다.",
|
||||
"sync.local.collect": "수집",
|
||||
"sync.forceHint": "대상 안에서 수정된 파일을 교체합니다",
|
||||
"sync.folderConflict.text": "{names}이(가) 같은 폴더 {path}에 서로 다른 필터로 Skills를 동기화해서, 동기화할 때마다 서로의 결과를 되돌립니다.",
|
||||
"sync.folderConflict.text": "{names}이(가) 같은 폴더 {path}에 서로 다른 설정으로 Skills를 동기화해서, 동기화할 때마다 서로의 결과를 되돌립니다.",
|
||||
"sync.folderConflict.stop": "{name}의 Skills 동기화 중지",
|
||||
"sync.folderConflict.keeps": "{name} · 계속 기록",
|
||||
"sync.folderConflict.filters": "필터",
|
||||
"sync.folderConflict.filters.include": "{names} 포함",
|
||||
"sync.folderConflict.filters.exclude": "{names} 제외",
|
||||
"sync.folderConflict.filters.all": "모든 skill",
|
||||
"sync.folderConflict.na": "해당 없음",
|
||||
"sync.folderConflict.hint": "다른 항목만 표시합니다. 둘 다 유지하려면 대상 페이지에서 {names}에 같은 설정을 지정하세요.",
|
||||
"sync.error.showDetails": "진단 표시",
|
||||
"sync.error.hideDetails": "진단 숨기기",
|
||||
"sync.last.title": "마지막 skills 및 agents 동기화",
|
||||
|
||||
@@ -1784,7 +1784,7 @@
|
||||
"targetDetail.mode.merge.skill": "Um symlink por skill. As skills criadas dentro deste destino não são alteradas.",
|
||||
"targetDetail.mode.merge.agent": "Um symlink por arquivo de agent. Os agents criados dentro deste destino não são alterados.",
|
||||
"targetDetail.mode.copy": "Cópias reais. Para ferramentas que não seguem symlinks.",
|
||||
"targetDetail.mode.symlink": "A pasta inteira vira um symlink. Os filtros não se aplicam neste modo.",
|
||||
"targetDetail.mode.symlink": "A pasta inteira vira um symlink. Filtros e nomes não se aplicam neste modo.",
|
||||
"targetDetail.naming": "Nomes",
|
||||
"targetDetail.namingFlat": "Skills aninhadas recebem nomes planos unidos por __.",
|
||||
"targetDetail.namingStandard": "Skills usam o nome do SKILL.md.",
|
||||
@@ -1792,6 +1792,11 @@
|
||||
"targetDetail.prefixedNeedsCopy": "prefixed precisa do modo copy, porque reescreve o nome dentro de cada cópia.",
|
||||
"targetDetail.prefixedNeedsCopyTitle": "Precisa do modo copy",
|
||||
"targetDetail.pending": "pendente",
|
||||
"targetDetail.shared.mode": "{other} também sincroniza skills em {path}, com {theirs}. Com {mine}, cada sincronização desfaria a outra.",
|
||||
"targetDetail.shared.naming": "{other} também sincroniza skills em {path}, com nomes {theirs}. Com {mine}, cada sincronização desfaria a outra.",
|
||||
"targetDetail.shared.use": "Usar {value} como {other}",
|
||||
"targetDetail.shared.filters": "{other} também sincroniza skills em {path}, com outros filtros. Cada sincronização adicionaria de volta ou removeria o que a outra filtra.",
|
||||
"targetDetail.shared.useFilters": "Usar os mesmos filtros que {other}",
|
||||
"targetDetail.skipped.one": "{count} skill não pode usar nomes standard e é ignorada. Tente flat.",
|
||||
"targetDetail.skipped.other": "{count} skills não podem usar nomes standard e são ignoradas. Tente flat.",
|
||||
"targetDetail.collect": "Coletar",
|
||||
@@ -1903,8 +1908,15 @@
|
||||
"sync.local.hint": "A sincronização não mexe neles. Coletar traz para a sua origem.",
|
||||
"sync.local.collect": "Coletar",
|
||||
"sync.forceHint": "Substituir arquivos editados dentro de um destino",
|
||||
"sync.folderConflict.text": "{names} sincronizam skills na mesma pasta {path} com filtros diferentes, então cada sincronização desfaz a outra.",
|
||||
"sync.folderConflict.text": "{names} sincronizam skills na mesma pasta {path} com configurações diferentes, então cada sincronização desfaz a outra.",
|
||||
"sync.folderConflict.stop": "Parar de sincronizar skills com {name}",
|
||||
"sync.folderConflict.keeps": "{name} · continua gravando",
|
||||
"sync.folderConflict.filters": "Filtros",
|
||||
"sync.folderConflict.filters.include": "inclui {names}",
|
||||
"sync.folderConflict.filters.exclude": "exclui {names}",
|
||||
"sync.folderConflict.filters.all": "todos os skills",
|
||||
"sync.folderConflict.na": "n/d",
|
||||
"sync.folderConflict.hint": "Só as linhas que diferem são listadas. Para manter os dois, dê a {names} as mesmas configurações na página do destino.",
|
||||
"sync.error.showDetails": "Mostrar diagnóstico",
|
||||
"sync.error.hideDetails": "Ocultar diagnóstico",
|
||||
"sync.last.title": "Última sync de skills e agents",
|
||||
|
||||
@@ -1784,7 +1784,7 @@
|
||||
"targetDetail.mode.merge.skill": "每个 Skill 一个 symlink。在这个目标里创建的 Skill 不受影响。",
|
||||
"targetDetail.mode.merge.agent": "每个 Agent 文件一个 symlink。在这个目标里创建的 Agent 不受影响。",
|
||||
"targetDetail.mode.copy": "真实副本。适用于无法跟随 symlink 的工具。",
|
||||
"targetDetail.mode.symlink": "整个文件夹变成一个 symlink。此模式下筛选不生效。",
|
||||
"targetDetail.mode.symlink": "整个文件夹变成一个 symlink。此模式下筛选和命名不生效。",
|
||||
"targetDetail.naming": "命名",
|
||||
"targetDetail.namingFlat": "嵌套 Skill 使用以 __ 连接的扁平名称。",
|
||||
"targetDetail.namingStandard": "Skill 使用 SKILL.md 中的名称。",
|
||||
@@ -1792,6 +1792,11 @@
|
||||
"targetDetail.prefixedNeedsCopy": "prefixed 需要 copy 模式,因为它会改写每份副本里的名称。",
|
||||
"targetDetail.prefixedNeedsCopyTitle": "需要 copy 模式",
|
||||
"targetDetail.pending": "未保存",
|
||||
"targetDetail.shared.mode": "{other} 也把 Skills 同步到 {path},使用 {theirs}。改用 {mine} 后,每次同步都会抵消对方的结果。",
|
||||
"targetDetail.shared.naming": "{other} 也把 Skills 同步到 {path},命名为 {theirs}。改用 {mine} 后,每次同步都会抵消对方的结果。",
|
||||
"targetDetail.shared.use": "和 {other} 一样使用 {value}",
|
||||
"targetDetail.shared.filters": "{other} 也把 Skills 同步到 {path},但筛选不同。每次同步都会把对方筛掉的内容加回来或删掉。",
|
||||
"targetDetail.shared.useFilters": "使用和 {other} 相同的筛选",
|
||||
"targetDetail.skipped.one": "{count} 个 Skill 无法使用 standard 命名而被跳过。试试 flat。",
|
||||
"targetDetail.skipped.other": "{count} 个 Skill 无法使用 standard 命名而被跳过。试试 flat。",
|
||||
"targetDetail.collect": "收集",
|
||||
@@ -1903,8 +1908,15 @@
|
||||
"sync.local.hint": "同步不会动它们,收集可以将其纳入来源。",
|
||||
"sync.local.collect": "收集",
|
||||
"sync.forceHint": "替换在目标中修改过的文件",
|
||||
"sync.folderConflict.text": "{names} 同步到同一个文件夹 {path},但筛选不同,每次同步都会互相加回、删掉。",
|
||||
"sync.folderConflict.text": "{names} 同步到同一个文件夹 {path},但设置不同,每次同步都会互相加回、删掉。",
|
||||
"sync.folderConflict.stop": "停止同步 {name} 的 Skills",
|
||||
"sync.folderConflict.keeps": "{name} · 持续写入",
|
||||
"sync.folderConflict.filters": "筛选",
|
||||
"sync.folderConflict.filters.include": "包含 {names}",
|
||||
"sync.folderConflict.filters.exclude": "排除 {names}",
|
||||
"sync.folderConflict.filters.all": "所有 Skills",
|
||||
"sync.folderConflict.na": "不适用",
|
||||
"sync.folderConflict.hint": "只列出有差异的项。要同时保留两者,请到目标页面把 {names} 的设置改成一致。",
|
||||
"sync.error.showDetails": "显示诊断信息",
|
||||
"sync.error.hideDetails": "隐藏诊断信息",
|
||||
"sync.last.title": "上次 skills 与 agents 同步",
|
||||
|
||||
@@ -1784,7 +1784,7 @@
|
||||
"targetDetail.mode.merge.skill": "每個 Skill 一個 symlink。在這個目標裡建立的 Skills 不受影響。",
|
||||
"targetDetail.mode.merge.agent": "每個 Agent 檔案一個 symlink。在這個目標裡建立的 Agents 不受影響。",
|
||||
"targetDetail.mode.copy": "實體副本。適用於無法跟隨 symlink 的工具。",
|
||||
"targetDetail.mode.symlink": "整個資料夾變成一個 symlink。這個模式下篩選不會生效。",
|
||||
"targetDetail.mode.symlink": "整個資料夾變成一個 symlink。這個模式下篩選與命名不會生效。",
|
||||
"targetDetail.naming": "命名",
|
||||
"targetDetail.namingFlat": "巢狀 Skill 使用以 __ 串接的扁平名稱。",
|
||||
"targetDetail.namingStandard": "Skill 使用 SKILL.md 裡的名稱。",
|
||||
@@ -1792,6 +1792,11 @@
|
||||
"targetDetail.prefixedNeedsCopy": "prefixed 需要 copy 模式,因為它會改寫每份副本裡的名稱。",
|
||||
"targetDetail.prefixedNeedsCopyTitle": "需要 copy 模式",
|
||||
"targetDetail.pending": "未儲存",
|
||||
"targetDetail.shared.mode": "{other} 也把 Skills 同步到 {path},使用 {theirs}。改用 {mine} 後,每次同步都會抵銷對方的結果。",
|
||||
"targetDetail.shared.naming": "{other} 也把 Skills 同步到 {path},命名為 {theirs}。改用 {mine} 後,每次同步都會抵銷對方的結果。",
|
||||
"targetDetail.shared.use": "和 {other} 一樣使用 {value}",
|
||||
"targetDetail.shared.filters": "{other} 也把 Skills 同步到 {path},但篩選不同。每次同步都會把對方篩掉的內容加回來或刪掉。",
|
||||
"targetDetail.shared.useFilters": "使用和 {other} 相同的篩選",
|
||||
"targetDetail.skipped.one": "{count} 個 Skill 無法使用 standard 命名而被略過。試試 flat。",
|
||||
"targetDetail.skipped.other": "{count} 個 Skills 無法使用 standard 命名而被略過。試試 flat。",
|
||||
"targetDetail.collect": "收集",
|
||||
@@ -1903,8 +1908,15 @@
|
||||
"sync.local.hint": "同步不會動到它們,收集可以將其納入來源。",
|
||||
"sync.local.collect": "收集",
|
||||
"sync.forceHint": "取代在目標中修改過的檔案",
|
||||
"sync.folderConflict.text": "{names} 同步到同一個資料夾 {path},但篩選不同,每次同步都會互相加回、刪掉。",
|
||||
"sync.folderConflict.text": "{names} 同步到同一個資料夾 {path},但設定不同,每次同步都會互相加回、刪掉。",
|
||||
"sync.folderConflict.stop": "停止同步 {name} 的 Skills",
|
||||
"sync.folderConflict.keeps": "{name} · 持續寫入",
|
||||
"sync.folderConflict.filters": "篩選",
|
||||
"sync.folderConflict.filters.include": "包含 {names}",
|
||||
"sync.folderConflict.filters.exclude": "排除 {names}",
|
||||
"sync.folderConflict.filters.all": "所有 Skills",
|
||||
"sync.folderConflict.na": "不適用",
|
||||
"sync.folderConflict.hint": "只列出有差異的項目。要同時保留兩者,請到目標頁面把 {names} 的設定改成一致。",
|
||||
"sync.error.showDetails": "顯示診斷資訊",
|
||||
"sync.error.hideDetails": "隱藏診斷資訊",
|
||||
"sync.last.title": "上次 skills 與 agents 同步",
|
||||
|
||||
@@ -17,9 +17,9 @@ vi.mock('../api/client', async (load) => ({
|
||||
vi.mock('../api/mcp', async (load) => ({ ...await load<typeof import('../api/mcp')>(), mcpApi: { list: vi.fn() } }));
|
||||
vi.mock('../api/hooks', async (load) => ({ ...await load<typeof import('../api/hooks')>(), hooksApi: { list: vi.fn(() => Promise.reject(new Error('offline'))) } }));
|
||||
|
||||
const target = (name: string) => ({
|
||||
const target = (name: string, over: Partial<Target> = {}) => ({
|
||||
name, path: '/home/me/.agents/skills', mode: 'merge', targetNaming: 'flat', status: 'merged', linkedCount: 3, localCount: 0,
|
||||
include: [], exclude: [], expectedSkillCount: 3, skillsEnabled: true,
|
||||
include: [], exclude: [], expectedSkillCount: 3, skillsEnabled: true, ...over,
|
||||
}) as Target;
|
||||
|
||||
describe('Sync page folder conflicts', () => {
|
||||
@@ -44,11 +44,26 @@ describe('Sync page folder conflicts', () => {
|
||||
<QueryClientProvider client={new QueryClient()}><I18nProvider><ToastProvider><SyncPage /></ToastProvider></I18nProvider></QueryClientProvider>
|
||||
</MemoryRouter>,
|
||||
);
|
||||
expect(await screen.findByText(/codex and universal sync skills to the same folder .*\.agents\/skills with different filters, so each sync undoes the other\./)).toBeInTheDocument();
|
||||
expect(await screen.findByText(/codex and universal sync skills to the same folder .*\.agents\/skills with different settings, so each sync undoes the other\./)).toBeInTheDocument();
|
||||
await user.click(screen.getByRole('button', { name: 'Stop syncing skills for codex' }));
|
||||
await user.click(await screen.findByRole('button', { name: 'Stop syncing' }));
|
||||
await waitFor(() => expect(api.updateTarget).toHaveBeenCalledWith('codex', { skills_enabled: false }));
|
||||
});
|
||||
|
||||
it('lists only the settings that differ, keep target first, and links the one to change', async () => {
|
||||
vi.mocked(api.listTargets).mockResolvedValue({ targets: [target('codex', { mode: 'copy', exclude: ['feature-radar*'] }), target('universal')], sourceSkillCount: 3 });
|
||||
render(
|
||||
<MemoryRouter>
|
||||
<QueryClientProvider client={new QueryClient()}><I18nProvider><ToastProvider><SyncPage /></ToastProvider></I18nProvider></QueryClientProvider>
|
||||
</MemoryRouter>,
|
||||
);
|
||||
const columns = await screen.findAllByRole('columnheader');
|
||||
expect(columns.map((c) => c.textContent)).toEqual(['universal · keeps writing', 'codex']);
|
||||
expect(screen.getAllByRole('rowheader').map((r) => r.textContent)).toEqual(['Sync mode', 'Filters']);
|
||||
const cells = screen.getAllByRole('cell').map((c) => c.textContent);
|
||||
expect(cells).toEqual(['merge', 'copy', 'all skills', 'excludes feature-radar*']);
|
||||
expect(screen.getByRole('link', { name: 'codex' })).toHaveAttribute('href', '/targets/codex');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Sync page last sync', () => {
|
||||
|
||||
@@ -15,6 +15,7 @@ import { hookLabel, hookMessage, rootName } from '../components/hooks/hooksView'
|
||||
import MCPNotices from '../components/mcp/MCPNotices';
|
||||
import { describeMessage, mcpClient, targetLabel } from '../components/mcp/mcpView';
|
||||
import { changeSets, countChanges, countEdited, discardable, receivesSkill, tally, extraGroups, groupByFolder, groupInSync, HOOKS_CHANGED, hooksGroups, MCP_CHANGED, mcpGroups, otherWarnings, resourceGroups, runSync, type ChangeGroup, type Part, type RowIcon, type SyncFailure } from '../components/sync/syncView';
|
||||
import FolderConflictNotice from '../components/sync/FolderConflictNotice';
|
||||
import SyncResult from '../components/sync/SyncResult';
|
||||
import UnmatchedNotices from '../components/sync/UnmatchedNotices';
|
||||
import SyncError from '../components/sync/SyncError';
|
||||
@@ -333,17 +334,7 @@ export default function SyncPage() {
|
||||
<Link to="/doctor" className="ss-btn sm">{t('sync.openDoctor')}</Link>
|
||||
</div>
|
||||
)}
|
||||
{conflicts.map((c) => (
|
||||
<div key={c.path} className="ss-note warn !items-center">
|
||||
<TriangleAlert size={16} />
|
||||
<span className="flex-1">{t('sync.folderConflict.text', { names: joinList(c.targets, locale), path: shortenHome(c.path) })}</span>
|
||||
{c.stop.map((name) => (
|
||||
<Button key={name} variant="secondary" size="sm" onClick={() => setStopping(name)}>
|
||||
{t('sync.folderConflict.stop', { name })}
|
||||
</Button>
|
||||
))}
|
||||
</div>
|
||||
))}
|
||||
{conflicts.map((c) => <FolderConflictNotice key={c.path} conflict={c} targets={targetList} onStop={setStopping} />)}
|
||||
|
||||
{!loading && !diff.error && groups.length > 0 && (
|
||||
<div className="flex items-center gap-3">
|
||||
|
||||
@@ -3,53 +3,85 @@ import { render, screen } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { MemoryRouter, Route, Routes } from 'react-router-dom';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { api } from '../api/client';
|
||||
import type { Target } from '../api/client';
|
||||
import { api, type Target } from '../api/client';
|
||||
import { ToastProvider } from '../components/Toast';
|
||||
import { I18nProvider } from '../i18n';
|
||||
import TargetDetailPage from './TargetDetailPage';
|
||||
|
||||
vi.mock('../api/client', async (load) => {
|
||||
const actual = await load<typeof import('../api/client')>();
|
||||
return {
|
||||
...actual,
|
||||
api: {
|
||||
...actual.api,
|
||||
listTargets: vi.fn(), getTargetInstructions: vi.fn(), listTargetFiles: vi.fn(),
|
||||
previewSyncMatrix: vi.fn(), listExtraExtensions: vi.fn(),
|
||||
},
|
||||
};
|
||||
});
|
||||
vi.mock('../hooks/useSharedQueries', () => {
|
||||
const idle = () => ({ data: undefined });
|
||||
return { useAvailableTargetsQuery: idle, useHooksQuery: idle, useMcpQuery: idle };
|
||||
});
|
||||
const offline = vi.hoisted(() => () => Promise.reject(new Error('offline')));
|
||||
vi.mock('../api/client', async (load) => ({
|
||||
...await load<typeof import('../api/client')>(),
|
||||
api: {
|
||||
listTargets: vi.fn(), previewSyncMatrix: vi.fn(() => Promise.resolve({ entries: [] })), availableTargets: vi.fn(offline),
|
||||
getTargetInstructions: vi.fn(offline), listTargetFiles: vi.fn(offline), listExtraExtensions: vi.fn(offline), updateTarget: vi.fn(),
|
||||
},
|
||||
}));
|
||||
vi.mock('../api/mcp', async (load) => ({ ...await load<typeof import('../api/mcp')>(), mcpApi: { list: vi.fn(offline) } }));
|
||||
vi.mock('../api/hooks', async (load) => ({ ...await load<typeof import('../api/hooks')>(), hooksApi: { list: vi.fn(offline) } }));
|
||||
|
||||
const never = () => new Promise<never>(() => {});
|
||||
const target = (name: string, over: Partial<Target> = {}) => ({
|
||||
name, path: '/home/me/.agents/skills', mode: 'merge', targetNaming: 'flat', status: 'merged', linkedCount: 3, localCount: 0,
|
||||
include: [], exclude: [], expectedSkillCount: 3, skillsEnabled: true, ...over,
|
||||
}) as Target;
|
||||
|
||||
function renderPage(mode: string, targetNaming: string) {
|
||||
const target = { name: 'claude', path: '/home/dev/.claude/skills', mode, targetNaming, skillsEnabled: true, linkedCount: 0, localCount: 0, include: [], exclude: [] } as unknown as Target;
|
||||
vi.mocked(api.listTargets).mockResolvedValue({ targets: [target] } as Awaited<ReturnType<typeof api.listTargets>>);
|
||||
const client = new QueryClient({ defaultOptions: { queries: { retry: false } } });
|
||||
return render(
|
||||
<MemoryRouter initialEntries={['/targets/claude']}>
|
||||
<QueryClientProvider client={client}><I18nProvider><ToastProvider>
|
||||
<Routes><Route path="/targets/:name" element={<TargetDetailPage />} /></Routes>
|
||||
</ToastProvider></I18nProvider></QueryClientProvider>
|
||||
function renderPage(codex: Partial<Target>, universal: Partial<Target> = {}) {
|
||||
vi.mocked(api.listTargets).mockResolvedValue({
|
||||
targets: [target('codex', { skillsSharedWith: ['universal'], ...codex }), target('universal', { skillsSharedWith: ['codex'], ...universal })],
|
||||
sourceSkillCount: 3,
|
||||
});
|
||||
render(
|
||||
<MemoryRouter initialEntries={['/targets/codex']}>
|
||||
<QueryClientProvider client={new QueryClient({ defaultOptions: { queries: { retry: false } } })}>
|
||||
<I18nProvider><ToastProvider><Routes><Route path="/targets/:name" element={<TargetDetailPage />} /></Routes></ToastProvider></I18nProvider>
|
||||
</QueryClientProvider>
|
||||
</MemoryRouter>,
|
||||
);
|
||||
}
|
||||
|
||||
const needsCopy = 'prefixed needs copy mode, because it rewrites the name inside each copy.';
|
||||
describe('Target page shared skills folder', () => {
|
||||
beforeEach(() => vi.clearAllMocks());
|
||||
|
||||
describe('TargetDetailPage naming', () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
for (const fn of [api.getTargetInstructions, api.listTargetFiles, api.previewSyncMatrix, api.listExtraExtensions]) vi.mocked(fn).mockImplementation(never);
|
||||
it('warns under the mode picker and sets the draft to the other target\'s mode', async () => {
|
||||
const user = userEvent.setup();
|
||||
renderPage({ mode: 'copy' });
|
||||
expect(await screen.findByText(/universal also syncs skills to .*\.agents\/skills, with merge\. With copy, each sync would undo the other\./)).toBeInTheDocument();
|
||||
await user.click(screen.getByRole('button', { name: 'Use merge like universal' }));
|
||||
expect(screen.queryByText(/each sync would undo the other/)).toBeNull();
|
||||
});
|
||||
|
||||
it('warns under the naming control, and only once the modes agree', async () => {
|
||||
const user = userEvent.setup();
|
||||
renderPage({ targetNaming: 'standard' });
|
||||
expect(await screen.findByText(/universal also syncs skills to .*\.agents\/skills, with flat naming\. With standard, each sync would undo the other\./)).toBeInTheDocument();
|
||||
await user.click(screen.getByRole('button', { name: 'Use flat like universal' }));
|
||||
expect(screen.queryByText(/each sync would undo the other/)).toBeNull();
|
||||
});
|
||||
|
||||
it('warns under the filters when only they differ, and copies the other target\'s filters', async () => {
|
||||
const user = userEvent.setup();
|
||||
renderPage({ exclude: ['feature-radar*'] });
|
||||
expect(await screen.findByText(/universal also syncs skills to .*\.agents\/skills, with different filters\. Each sync would add back or remove what the other filters out\./)).toBeInTheDocument();
|
||||
await user.click(screen.getByRole('button', { name: 'Use the same filters as universal' }));
|
||||
expect(screen.queryByText(/with different filters/)).toBeNull();
|
||||
});
|
||||
|
||||
it('stays quiet when both resolve to symlink, whatever the naming', async () => {
|
||||
renderPage({ mode: 'symlink', targetNaming: 'standard' }, { mode: 'symlink' });
|
||||
await screen.findByText('Sync mode');
|
||||
expect(screen.queryByText(/each sync would undo the other/)).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
const needsCopy = 'prefixed needs copy mode, because it rewrites the name inside each copy.';
|
||||
|
||||
describe('Target page naming', () => {
|
||||
beforeEach(() => vi.clearAllMocks());
|
||||
|
||||
// Both targets share the folder with the same settings, so no shared-folder warning interferes.
|
||||
const renderAlone = (mode: string, targetNaming: string) => renderPage({ mode, targetNaming }, { mode, targetNaming });
|
||||
|
||||
it('keeps prefixed visible but disabled outside copy mode, and says why', async () => {
|
||||
renderPage('merge', 'flat');
|
||||
renderAlone('merge', 'flat');
|
||||
|
||||
const prefixed = await screen.findByRole('button', { name: 'prefixed' });
|
||||
expect(prefixed).toBeDisabled();
|
||||
@@ -59,7 +91,7 @@ describe('TargetDetailPage naming', () => {
|
||||
|
||||
it('enables prefixed in copy mode and marks the unsaved naming as pending', async () => {
|
||||
const user = userEvent.setup();
|
||||
renderPage('copy', 'flat');
|
||||
renderAlone('copy', 'flat');
|
||||
|
||||
const prefixed = await screen.findByRole('button', { name: 'prefixed' });
|
||||
expect(prefixed).toBeEnabled();
|
||||
@@ -73,7 +105,7 @@ describe('TargetDetailPage naming', () => {
|
||||
|
||||
it('puts the saved naming back when leaving copy mode with prefixed drafted', async () => {
|
||||
const user = userEvent.setup();
|
||||
renderPage('copy', 'standard');
|
||||
renderAlone('copy', 'standard');
|
||||
|
||||
await user.click(await screen.findByRole('button', { name: 'prefixed' }));
|
||||
await user.click(screen.getByRole('radio', { name: /merge/ }));
|
||||
@@ -84,11 +116,20 @@ describe('TargetDetailPage naming', () => {
|
||||
|
||||
it('falls back to flat when leaving copy mode with prefixed already saved', async () => {
|
||||
const user = userEvent.setup();
|
||||
renderPage('copy', 'prefixed');
|
||||
renderAlone('copy', 'prefixed');
|
||||
|
||||
await user.click(await screen.findByRole('radio', { name: /merge/ }));
|
||||
|
||||
expect(screen.getByRole('button', { name: 'flat' })).toHaveAttribute('aria-pressed', 'true');
|
||||
expect(screen.getByText('pending')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('drops prefixed when taking the other target\'s mode from the shared-folder warning', async () => {
|
||||
const user = userEvent.setup();
|
||||
renderPage({ mode: 'copy', targetNaming: 'prefixed' });
|
||||
|
||||
await user.click(await screen.findByRole('button', { name: 'Use merge like universal' }));
|
||||
|
||||
expect(screen.getByRole('button', { name: 'flat' })).toHaveAttribute('aria-pressed', 'true');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Link, useNavigate, useParams, useSearchParams } from 'react-router-dom';
|
||||
import { keepPreviousData, useQuery, useQueryClient } from '@tanstack/react-query';
|
||||
import { ArrowDownToLine, CirclePause, Folder, Info, Plus, Target as TargetIcon } from 'lucide-react';
|
||||
import { ArrowDownToLine, CirclePause, Folder, Info, Plus, Target as TargetIcon, TriangleAlert } from 'lucide-react';
|
||||
import { api, type Target } from '../api/client';
|
||||
import Button from '../components/Button';
|
||||
import CollectDialog from '../components/CollectDialog';
|
||||
@@ -176,6 +176,27 @@ function TargetEditor({ target, targets }: { target: Target; targets: Target[] }
|
||||
{ value: 'standard', label: 'standard' },
|
||||
{ value: 'prefixed', label: 'prefixed', disabled: prefixedOff, title: prefixedOff ? t('targetDetail.prefixedNeedsCopyTitle') : undefined },
|
||||
];
|
||||
// Another target writing this folder with other settings than the draft: each sync would undo the other's.
|
||||
const sharing = (target.skillsSharedWith ?? []).map((n) => targets.find((x) => x.name === n)).filter((x): x is Target => !!x);
|
||||
const modeClash = agent ? undefined : sharing.find((o) => o.mode !== draft.mode);
|
||||
// Symlink links the whole folder, so naming only matters once the modes agree on something else.
|
||||
const namingClash = modeClash ? undefined : sharing.find((o) => o.targetNaming !== draft.naming);
|
||||
const sameList = (a: string[], b: string[]) => a.length === b.length && [...a].sort().join('\n') === [...b].sort().join('\n');
|
||||
const filtersClash = modeClash || draft.mode === 'symlink' ? undefined : sharing.find((o) => !sameList(o.include, draft.include) || !sameList(o.exclude, draft.exclude));
|
||||
const sharedNote = (o: Target, field: 'mode' | 'naming') => {
|
||||
const theirs = field === 'mode' ? o.mode : o.targetNaming;
|
||||
return (
|
||||
<div className="ss-note warn">
|
||||
<TriangleAlert size={16} />
|
||||
<div className="flex min-w-0 flex-col gap-2">
|
||||
<span>{t(`targetDetail.shared.${field}`, { other: o.name, path: shortenHome(target.path), theirs, mine: draft[field] })}</span>
|
||||
<Button variant="secondary" size="sm" className="self-start" onClick={() => (field === 'mode' ? setSkillsMode(theirs) : setDraft({ ...draft, naming: theirs }))} disabled={saving}>
|
||||
{t('targetDetail.shared.use', { value: theirs, other: o.name })}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const tabCount = (k: (typeof tabs)[number]) =>
|
||||
k === 'skill' && !skillsOn ? null : (k === 'mcp' ? mcp.data && serverCount(mcp.data, client)
|
||||
@@ -292,6 +313,17 @@ function TargetEditor({ target, targets }: { target: Target; targets: Target[] }
|
||||
)}
|
||||
</div>
|
||||
<FilterSection kind={kind} mode={mode} name={target.name} include={include} exclude={exclude} onChange={setFiltersFor} entries={entries} loaded={Boolean(preview.data)} loading={preview.isPending} error={preview.error} disabled={saving} alsoReadBy={agent ? undefined : target.skillsAlsoReadBy} readsFrom={agent ? undefined : readsFrom} />
|
||||
{!agent && filtersClash && (
|
||||
<div className="ss-note warn">
|
||||
<TriangleAlert size={16} />
|
||||
<div className="flex min-w-0 flex-col gap-2">
|
||||
<span>{t('targetDetail.shared.filters', { other: filtersClash.name, path: shortenHome(target.path) })}</span>
|
||||
<Button variant="secondary" size="sm" className="self-start" onClick={() => setDraft({ ...draft, include: filtersClash.include, exclude: filtersClash.exclude })} disabled={saving}>
|
||||
{t('targetDetail.shared.useFilters', { other: filtersClash.name })}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
|
||||
<aside className="flex flex-col gap-7">
|
||||
@@ -324,6 +356,7 @@ function TargetEditor({ target, targets }: { target: Target; targets: Target[] }
|
||||
<div className="flex flex-col gap-3">
|
||||
<h2 className="ss-h2">{t('targetDetail.syncMode')}</h2>
|
||||
<ModePicker kind={kind} mode={mode} onChange={(m) => (agent ? setDraft({ ...draft, agentMode: m }) : setSkillsMode(m))} disabled={saving || (agent && draft.agentExtension !== '')} />
|
||||
{modeClash && sharedNote(modeClash, 'mode')}
|
||||
</div>
|
||||
|
||||
{!agent && draft.mode !== 'symlink' && (
|
||||
@@ -341,6 +374,7 @@ function TargetEditor({ target, targets }: { target: Target; targets: Target[] }
|
||||
{prefixedOff && (
|
||||
<span className="flex items-center gap-1.5 text-[13px] text-ink-3"><Info size={14} className="shrink-0" />{t('targetDetail.prefixedNeedsCopy')}</span>
|
||||
)}
|
||||
{namingClash && sharedNote(namingClash, 'naming')}
|
||||
{saved.naming !== 'flat' && (target.skippedSkillCount ?? 0) > 0 && (
|
||||
<span className="text-[13px] text-warn">{t(plural('targetDetail.skipped', target.skippedSkillCount), { count: target.skippedSkillCount })}</span>
|
||||
)}
|
||||
|
||||
@@ -148,10 +148,10 @@ Doctor flags two classes of duplicate-skill risk before they reach the runtime p
|
||||
|
||||
Resolution: disable one of the overlapping targets, or set a distinct path with `skillshare target <name> --path <dir>`.
|
||||
|
||||
When the targets sharing a path have different `include` or `exclude` filters, each sync adds what one target wants and prunes what another filters out, so the folder never settles and `sync` keeps showing the same pending changes. Doctor marks these and suggests turning skills off for all but one target (`universal` when it is one of them) instead of removing a target:
|
||||
When the targets sharing a path have different `include` or `exclude` filters, `mode`, or `target_naming` (filters and naming don't matter when both targets use `symlink` mode, which links the whole folder), each sync redoes the folder the way one target wants and undoes the other's work, so the folder never settles and `sync` keeps showing the same pending changes. Doctor marks these and suggests turning skills off for all but one target (`universal` when it is one of them) instead of removing a target:
|
||||
|
||||
```text
|
||||
! Shared path ~/.agents/skills ← codex, universal (different filters, so they undo each other on every sync)
|
||||
! Shared path ~/.agents/skills ← codex, universal (different settings, so they undo each other on every sync)
|
||||
suggestion: Keep universal syncing skills to ~/.agents/skills and stop the rest with `skillshare target codex --skills=false`.
|
||||
```
|
||||
|
||||
|
||||
@@ -353,7 +353,7 @@ targets:
|
||||
- In symlink mode, filters are ignored
|
||||
- In copy mode, filters work the same way as merge mode
|
||||
- `sync` removes existing source-linked or managed entries that are now excluded
|
||||
- Targets that share one folder need the same filters; otherwise each sync undoes the other and `sync` warns (see [`sync` keeps showing the same changes](/docs/troubleshooting/common-errors#sync-keeps-showing-the-same-changes))
|
||||
- Targets that share one folder need the same filters, mode and target naming (filters and naming don't matter when both use `symlink` mode); otherwise each sync undoes the other and `sync` warns (see [`sync` keeps showing the same changes](/docs/troubleshooting/common-errors#sync-keeps-showing-the-same-changes))
|
||||
|
||||
See [Configuration](/docs/reference/targets/configuration#include--exclude-target-filters) for full details.
|
||||
|
||||
|
||||
@@ -123,10 +123,10 @@ skillshare restore <target>
|
||||
|
||||
### `sync` keeps showing the same changes {#sync-keeps-showing-the-same-changes}
|
||||
|
||||
**Cause:** Two targets sync skills into the same folder with different `include` or `exclude` filters. Each sync adds what one target wants and removes what the other filters out, so the folder never settles. `sync` names them:
|
||||
**Cause:** Two targets sync skills into the same folder with different `include` or `exclude` filters, `mode`, or `target_naming` (filters and naming don't matter when both targets use `symlink` mode, which links the whole folder). Each sync redoes the folder the way one target wants and undoes the other's work (adding or removing filtered skills, renaming entries, or switching links and copies), so the folder never settles. `sync` names them:
|
||||
|
||||
```
|
||||
! codex and universal sync skills to ~/.agents/skills with different filters, so each sync undoes the other
|
||||
! codex and universal sync skills to ~/.agents/skills with different settings, so each sync undoes the other
|
||||
keep one: skillshare target codex --skills=false
|
||||
```
|
||||
|
||||
@@ -137,7 +137,7 @@ skillshare target codex --skills=false --dry-run
|
||||
skillshare target codex --skills=false
|
||||
```
|
||||
|
||||
In the dashboard, the **Sync** page shows the same warning with a button that stops syncing skills for that target. Giving both targets the same filters also works.
|
||||
In the dashboard, the **Sync** page shows the same warning with a button that stops syncing skills for that target. Giving both targets the same filters, mode and target naming also works.
|
||||
|
||||
### `sync seems stuck or slow`
|
||||
|
||||
|
||||
@@ -148,10 +148,10 @@ Doctor は、ランタイムのピッカーに到達する前に、Skill 重複
|
||||
|
||||
解決方法: 重複している Target のいずれかを無効化するか、`skillshare target <name> --path <dir>` で別のパスを設定してください。
|
||||
|
||||
パスを共有する Target 同士で `include`、`exclude` のフィルターが異なる場合、同期のたびに一方の Target が必要とするものが追加され、もう一方がフィルターで除外したものが削除されます。そのためフォルダが落ち着かず、`sync` には同じ保留中の変更が表示され続けます。Doctor はこのケースを示し、Target を削除する代わりに 1 つ(`universal` が含まれていればそれ)を残して残りの Skills 同期をオフにするよう提案します:
|
||||
パスを共有する Target 同士で `include`、`exclude` のフィルター、`mode`、`target_naming` のいずれかが異なる場合(両方の Target が `symlink` モードの場合はフォルダ全体をリンクするため、フィルターと命名は影響しません)、同期のたびに一方の Target の設定どおりにフォルダが書き直され、もう一方の結果が打ち消されます。そのためフォルダが落ち着かず、`sync` には同じ保留中の変更が表示され続けます。Doctor はこのケースを示し、Target を削除する代わりに 1 つ(`universal` が含まれていればそれ)を残して残りの Skills 同期をオフにするよう提案します:
|
||||
|
||||
```text
|
||||
! Shared path ~/.agents/skills ← codex, universal (different filters, so they undo each other on every sync)
|
||||
! Shared path ~/.agents/skills ← codex, universal (different settings, so they undo each other on every sync)
|
||||
suggestion: Keep universal syncing skills to ~/.agents/skills and stop the rest with `skillshare target codex --skills=false`.
|
||||
```
|
||||
|
||||
|
||||
@@ -345,7 +345,7 @@ targets:
|
||||
- symlink mode では、フィルターは無視されます
|
||||
- copy mode では、フィルターは merge mode と同じように動作します
|
||||
- `sync` は、除外されるようになった既存の source-linked または管理対象のエントリを削除します
|
||||
- 同じフォルダを共有する target には同じフィルターが必要です。そうでないと、各 sync が互いの結果を打ち消し合い、`sync` が警告を表示します([`sync` が同じ変更を表示し続ける](/docs/troubleshooting/common-errors#sync-keeps-showing-the-same-changes) を参照)
|
||||
- 同じフォルダを共有する target には同じフィルター、mode、target naming が必要です(両方が `symlink` モードの場合、フィルターと命名は影響しません)。そうでないと、各 sync が互いの結果を打ち消し合い、`sync` が警告を表示します([`sync` が同じ変更を表示し続ける](/docs/troubleshooting/common-errors#sync-keeps-showing-the-same-changes) を参照)
|
||||
|
||||
詳細は [Configuration](/docs/reference/targets/configuration#include--exclude-target-filters) を参照してください。
|
||||
|
||||
|
||||
+3
-3
@@ -132,10 +132,10 @@ skillshare restore <target>
|
||||
|
||||
### `sync` が同じ変更を表示し続ける {#sync-keeps-showing-the-same-changes}
|
||||
|
||||
**原因:** 2 つの Target が、異なる `include` または `exclude` フィルターで同じフォルダに Skill を Sync している。各 Sync が一方の Target の必要な Skill を追加し、もう一方のフィルターで除外される Skill を削除するため、フォルダの状態が安定しません。`sync` は該当する Target を表示します:
|
||||
**原因:** 2 つの Target が、`include` / `exclude` フィルター、`mode`、`target_naming` のいずれかが異なる状態で(両方の Target が `symlink` モードの場合はフォルダ全体をリンクするため、フィルターと命名は影響しません)同じフォルダに Skill を Sync している。各 Sync が一方の Target の設定どおりにフォルダを書き直し、もう一方の結果を打ち消す(フィルター対象の Skill の追加や削除、名前の変更、リンクとコピーの切り替え)ため、フォルダの状態が安定しません。`sync` は該当する Target を表示します:
|
||||
|
||||
```
|
||||
! codex and universal sync skills to ~/.agents/skills with different filters, so each sync undoes the other
|
||||
! codex and universal sync skills to ~/.agents/skills with different settings, so each sync undoes the other
|
||||
keep one: skillshare target codex --skills=false
|
||||
```
|
||||
|
||||
@@ -146,7 +146,7 @@ skillshare target codex --skills=false --dry-run
|
||||
skillshare target codex --skills=false
|
||||
```
|
||||
|
||||
ダッシュボードの **Sync** ページにも同じ警告が表示され、その Target の Skill の Sync を停止するボタンがあります。両方の Target に同じフィルターを設定する方法でも解決できます。
|
||||
ダッシュボードの **Sync** ページにも同じ警告が表示され、その Target の Skill の Sync を停止するボタンがあります。両方の Target に同じフィルター、mode、target naming を設定する方法でも解決できます。
|
||||
|
||||
### `sync seems stuck or slow`
|
||||
|
||||
|
||||
@@ -148,10 +148,10 @@ Doctor는 런타임 피커에 도달하기 전에 두 가지 종류의 중복 sk
|
||||
|
||||
해결 방법: 중복된 target 중 하나를 비활성화하거나, `skillshare target <name> --path <dir>`로 별도의 경로를 설정하십시오.
|
||||
|
||||
경로를 공유하는 target들의 `include`, `exclude` 필터가 서로 다르면, 동기화할 때마다 한 target이 원하는 항목이 추가되고 다른 target이 필터로 제외한 항목이 삭제됩니다. 그래서 폴더가 안정되지 않고 `sync`에 같은 대기 중 변경이 계속 표시됩니다. Doctor는 이 경우를 표시하고, target을 제거하는 대신 하나(`universal`이 포함되어 있으면 그것)만 남기고 나머지는 Skills 동기화를 끄도록 제안합니다:
|
||||
경로를 공유하는 target들의 `include`, `exclude` 필터, `mode`, `target_naming`이 서로 다르면 (두 target 모두 `symlink` 모드이면 폴더 전체를 링크하므로 필터와 이름 규칙은 영향을 주지 않습니다), 동기화할 때마다 한 target의 설정대로 폴더를 다시 쓰고 다른 target의 결과를 되돌립니다. 그래서 폴더가 안정되지 않고 `sync`에 같은 대기 중 변경이 계속 표시됩니다. Doctor는 이 경우를 표시하고, target을 제거하는 대신 하나(`universal`이 포함되어 있으면 그것)만 남기고 나머지는 Skills 동기화를 끄도록 제안합니다:
|
||||
|
||||
```text
|
||||
! Shared path ~/.agents/skills ← codex, universal (different filters, so they undo each other on every sync)
|
||||
! Shared path ~/.agents/skills ← codex, universal (different settings, so they undo each other on every sync)
|
||||
suggestion: Keep universal syncing skills to ~/.agents/skills and stop the rest with `skillshare target codex --skills=false`.
|
||||
```
|
||||
|
||||
|
||||
@@ -346,7 +346,7 @@ targets:
|
||||
- symlink mode에서는 filter가 무시됩니다
|
||||
- copy mode에서 filter는 merge mode와 동일하게 동작합니다
|
||||
- `sync`는 이제 제외된 기존 source-linked 또는 managed entry를 제거합니다
|
||||
- 하나의 폴더를 공유하는 target들은 같은 filter를 사용해야 합니다. 그렇지 않으면 매번 sync가 서로의 결과를 되돌리며, `sync`가 경고를 표시합니다([`sync` keeps showing the same changes](/docs/troubleshooting/common-errors#sync-keeps-showing-the-same-changes) 참고)
|
||||
- 하나의 폴더를 공유하는 target들은 같은 filter, mode, target naming을 사용해야 합니다 (둘 다 `symlink` 모드이면 필터와 이름 규칙은 영향을 주지 않습니다). 그렇지 않으면 매번 sync가 서로의 결과를 되돌리며, `sync`가 경고를 표시합니다([`sync` keeps showing the same changes](/docs/troubleshooting/common-errors#sync-keeps-showing-the-same-changes) 참고)
|
||||
|
||||
자세한 내용은 [Configuration](/docs/reference/targets/configuration#include--exclude-target-filters)을 참고하세요.
|
||||
|
||||
|
||||
+3
-3
@@ -123,10 +123,10 @@ skillshare restore <target>
|
||||
|
||||
### `sync` keeps showing the same changes {#sync-keeps-showing-the-same-changes}
|
||||
|
||||
**Cause:** 두 target이 서로 다른 `include` 또는 `exclude` filter로 같은 폴더에 skill을 sync합니다. 매번 sync할 때마다 한 target이 원하는 것은 추가되고 다른 target이 걸러내는 것은 제거되므로, 폴더가 안정되지 않습니다. `sync`가 해당 target을 알려줍니다:
|
||||
**Cause:** 두 target이 서로 다른 `include`/`exclude` filter, `mode` 또는 `target_naming`으로 (두 target 모두 `symlink` 모드이면 폴더 전체를 링크하므로 필터와 이름 규칙은 영향을 주지 않습니다) 같은 폴더에 skill을 sync합니다. 매번 sync할 때마다 한 target의 설정대로 폴더를 다시 쓰고 다른 target의 결과를 되돌리므로(필터된 skill 추가나 제거, 이름 변경, 링크와 복사본 전환), 폴더가 안정되지 않습니다. `sync`가 해당 target을 알려줍니다:
|
||||
|
||||
```
|
||||
! codex and universal sync skills to ~/.agents/skills with different filters, so each sync undoes the other
|
||||
! codex and universal sync skills to ~/.agents/skills with different settings, so each sync undoes the other
|
||||
keep one: skillshare target codex --skills=false
|
||||
```
|
||||
|
||||
@@ -137,7 +137,7 @@ skillshare target codex --skills=false --dry-run
|
||||
skillshare target codex --skills=false
|
||||
```
|
||||
|
||||
대시보드의 **Sync** 페이지에도 같은 경고가 표시되며, 해당 target의 skill 동기화를 중지하는 버튼이 함께 제공됩니다. 두 target에 같은 filter를 지정해도 해결됩니다.
|
||||
대시보드의 **Sync** 페이지에도 같은 경고가 표시되며, 해당 target의 skill 동기화를 중지하는 버튼이 함께 제공됩니다. 두 target에 같은 filter, mode, target naming을 지정해도 해결됩니다.
|
||||
|
||||
### `sync seems stuck or slow`
|
||||
|
||||
|
||||
+2
-2
@@ -149,10 +149,10 @@ Doctor 会在两类重复 skill 风险到达运行时选择器之前将其标记
|
||||
|
||||
解决方法:禁用其中一个重叠的 target,或用 `skillshare target <name> --path <dir>` 设置一个独立的路径。
|
||||
|
||||
如果共用路径的 targets 的 `include` 或 `exclude` 筛选不同,每次同步都会加入一个 target 需要的内容、再删掉另一个 target 过滤掉的内容,文件夹永远不会稳定,`sync` 也会一直显示同样的待同步变更。Doctor 会标出这种情况,并建议只保留一个 target(如果其中有 `universal` 就保留它)、其余的关闭 skills 同步,而不是移除 target:
|
||||
如果共用路径的 targets 的 `include` 或 `exclude` 筛选、`mode` 或 `target_naming` 不同(两个 target 都用 `symlink` 模式时,会直接链接整个文件夹,筛选与命名都不影响),每次同步都会按其中一个 target 的设置重写文件夹、抵消另一个 target 的结果,文件夹永远不会稳定,`sync` 也会一直显示同样的待同步变更。Doctor 会标出这种情况,并建议只保留一个 target(如果其中有 `universal` 就保留它)、其余的关闭 skills 同步,而不是移除 target:
|
||||
|
||||
```text
|
||||
! Shared path ~/.agents/skills ← codex, universal (different filters, so they undo each other on every sync)
|
||||
! Shared path ~/.agents/skills ← codex, universal (different settings, so they undo each other on every sync)
|
||||
suggestion: Keep universal syncing skills to ~/.agents/skills and stop the rest with `skillshare target codex --skills=false`.
|
||||
```
|
||||
|
||||
|
||||
+1
-1
@@ -367,7 +367,7 @@ targets:
|
||||
- 在 symlink 模式下,filters 会被忽略
|
||||
- 在 copy 模式下,filters 的行为方式与 merge 模式相同
|
||||
- `sync` 会移除已被排除、但之前是 source-linked 或受管理的条目
|
||||
- 共用同一个文件夹的多个 target 需要相同的 filters;否则每次 sync 都会撤销另一个 target 的结果,`sync` 会发出警告(参见 [`sync` keeps showing the same changes](/docs/troubleshooting/common-errors#sync-keeps-showing-the-same-changes))
|
||||
- 共用同一个文件夹的多个 target 需要相同的 filters、mode 和 target naming(两者都用 `symlink` 模式时,筛选与命名都不影响);否则每次 sync 都会撤销另一个 target 的结果,`sync` 会发出警告(参见 [`sync` keeps showing the same changes](/docs/troubleshooting/common-errors#sync-keeps-showing-the-same-changes))
|
||||
|
||||
完整细节参见 [Configuration](/docs/reference/targets/configuration#include--exclude-target-filters)。
|
||||
|
||||
|
||||
+3
-3
@@ -123,10 +123,10 @@ skillshare restore <target>
|
||||
|
||||
### `sync` keeps showing the same changes {#sync-keeps-showing-the-same-changes}
|
||||
|
||||
**原因:** 两个 Target 以不同的 `include` 或 `exclude` 过滤器把 skills 同步到同一个文件夹。每次 sync 都会加入其中一个 Target 需要的内容,又移除另一个 Target 过滤掉的内容,所以这个文件夹永远无法稳定下来。`sync` 会指出是哪两个 Target:
|
||||
**原因:** 两个 Target 以不同的 `include`/`exclude` 过滤器、`mode` 或 `target_naming` 设置(两个 target 都用 `symlink` 模式时,会直接链接整个文件夹,筛选与命名都不影响)把 skills 同步到同一个文件夹。每次 sync 都会按其中一个 Target 的设置重写文件夹,抵消另一个 Target 的结果(加入或移除被过滤的 skills、改名,或在链接与副本之间切换),所以这个文件夹永远无法稳定下来。`sync` 会指出是哪两个 Target:
|
||||
|
||||
```
|
||||
! codex and universal sync skills to ~/.agents/skills with different filters, so each sync undoes the other
|
||||
! codex and universal sync skills to ~/.agents/skills with different settings, so each sync undoes the other
|
||||
keep one: skillshare target codex --skills=false
|
||||
```
|
||||
|
||||
@@ -137,7 +137,7 @@ skillshare target codex --skills=false --dry-run
|
||||
skillshare target codex --skills=false
|
||||
```
|
||||
|
||||
在仪表板中,**Sync** 页面会显示同样的警告,并提供一个按钮,用来停止为该 Target 同步 skills。让两个 Target 使用相同的过滤器也同样可行。
|
||||
在仪表板中,**Sync** 页面会显示同样的警告,并提供一个按钮,用来停止为该 Target 同步 skills。让两个 Target 使用相同的过滤器、mode 和 target naming 也同样可行。
|
||||
|
||||
### `sync seems stuck or slow`
|
||||
|
||||
|
||||
+2
-2
@@ -148,10 +148,10 @@ Doctor 會在兩類重複 skill 風險到達 runtime picker 之前先標示出
|
||||
|
||||
解決方式:停用其中一個重疊的 target,或使用 `skillshare target <name> --path <dir>` 設定不同的路徑。
|
||||
|
||||
若共用路徑的 targets 其 `include` 或 `exclude` 篩選不同,每次同步都會加入一個 target 要的內容、再刪掉另一個 target 過濾掉的內容,資料夾永遠不會穩定,`sync` 也會一直顯示同樣的待同步變更。Doctor 會標出這種情況,並建議只保留一個 target(若其中有 `universal` 就保留它)、其他的關閉 skills 同步,而不是移除 target:
|
||||
若共用路徑的 targets 其 `include` 或 `exclude` 篩選、`mode` 或 `target_naming` 不同(兩個 target 都用 `symlink` 模式時,會直接連結整個資料夾,篩選與命名都不影響),每次同步都會照其中一個 target 的設定重寫資料夾、抵銷另一個 target 的結果,資料夾永遠不會穩定,`sync` 也會一直顯示同樣的待同步變更。Doctor 會標出這種情況,並建議只保留一個 target(若其中有 `universal` 就保留它)、其他的關閉 skills 同步,而不是移除 target:
|
||||
|
||||
```text
|
||||
! Shared path ~/.agents/skills ← codex, universal (different filters, so they undo each other on every sync)
|
||||
! Shared path ~/.agents/skills ← codex, universal (different settings, so they undo each other on every sync)
|
||||
suggestion: Keep universal syncing skills to ~/.agents/skills and stop the rest with `skillshare target codex --skills=false`.
|
||||
```
|
||||
|
||||
|
||||
+1
-1
@@ -345,7 +345,7 @@ targets:
|
||||
- 在 symlink mode 中,filters 會被忽略
|
||||
- 在 copy mode 中,filters 的運作方式與 merge mode 相同
|
||||
- `sync` 會移除現在已被排除、但先前是 source-linked 或受管理的條目
|
||||
- 共用同一個資料夾的 targets 需要相同的 filters;否則每次同步都會抵銷另一個 target 的結果,`sync` 會發出警告(見 [`sync` 一直顯示相同的變更](/docs/troubleshooting/common-errors#sync-keeps-showing-the-same-changes))
|
||||
- 共用同一個資料夾的 targets 需要相同的 filters、mode 與 target naming(兩者都用 `symlink` 模式時,篩選與命名都不影響);否則每次同步都會抵銷另一個 target 的結果,`sync` 會發出警告(見 [`sync` 一直顯示相同的變更](/docs/troubleshooting/common-errors#sync-keeps-showing-the-same-changes))
|
||||
|
||||
完整細節見 [Configuration](/docs/reference/targets/configuration#include--exclude-target-filters)。
|
||||
|
||||
|
||||
+3
-3
@@ -123,10 +123,10 @@ skillshare restore <target>
|
||||
|
||||
### `sync` 一直顯示相同的變更 {#sync-keeps-showing-the-same-changes}
|
||||
|
||||
**原因:** 兩個 Target 把 Skill 同步到同一個資料夾,但 `include` 或 `exclude` filters 不同。每次同步都會加入其中一個 Target 要的 Skill,同時移除另一個 Target 過濾掉的 Skill,所以資料夾永遠不會穩定下來。`sync` 會指出是哪兩個 Target:
|
||||
**原因:** 兩個 Target 把 Skill 同步到同一個資料夾,但 `include` 或 `exclude` filters、`mode` 或 `target_naming` 不同(兩個 target 都用 `symlink` 模式時,會直接連結整個資料夾,篩選與命名都不影響)。每次同步都會照其中一個 Target 的設定重寫資料夾,抵銷另一個 Target 的結果(加入或移除被過濾的 Skill、改名,或在連結與複本之間切換),所以資料夾永遠不會穩定下來。`sync` 會指出是哪兩個 Target:
|
||||
|
||||
```
|
||||
! codex and universal sync skills to ~/.agents/skills with different filters, so each sync undoes the other
|
||||
! codex and universal sync skills to ~/.agents/skills with different settings, so each sync undoes the other
|
||||
keep one: skillshare target codex --skills=false
|
||||
```
|
||||
|
||||
@@ -137,7 +137,7 @@ skillshare target codex --skills=false --dry-run
|
||||
skillshare target codex --skills=false
|
||||
```
|
||||
|
||||
在 dashboard 中,**Sync** 頁面會顯示相同的警告,並附上一個按鈕,可停止該 Target 的 Skill 同步。讓兩個 Target 使用相同的 filters 也可以解決。
|
||||
在 dashboard 中,**Sync** 頁面會顯示相同的警告,並附上一個按鈕,可停止該 Target 的 Skill 同步。讓兩個 Target 使用相同的 filters、mode 與 target naming 也可以解決。
|
||||
|
||||
### `sync seems stuck or slow`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user