dsh-config-manager 0.1.22 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/README.zh-CN.md +12 -0
- package/lib/client.d.ts +15 -8
- package/lib/client.js +328 -185
- package/lib/client.js.map +1 -1
- package/lib/core/messages.d.ts +2 -0
- package/lib/core/messages.js +4 -0
- package/lib/core/messages.js.map +1 -1
- package/lib/index.js +32 -11
- package/lib/index.js.map +1 -1
- package/lib/sync/sync-engine.d.ts +15 -0
- package/lib/sync/sync-engine.js +45 -0
- package/lib/sync/sync-engine.js.map +1 -1
- package/package.json +1 -1
- package/src/client/config-manager.module.css +78 -0
- package/src/client/import/ConflictList.tsx +33 -1
- package/src/client/locales.ts +4 -0
- package/src/client/sync/SyncConfirmView.tsx +99 -55
- package/src/client/sync/SyncSettingsView.tsx +29 -14
- package/src/client/sync/sync-api.ts +5 -2
- package/src/client/sync/sync-locales.ts +17 -13
- package/src/client/sync/sync-view-v2.test.ts +56 -3
- package/src/client/sync/sync-view.ts +54 -3
- package/src/core/messages.ts +4 -0
- package/src/index.ts +35 -12
- package/src/sync/git/git-transport.test.ts +39 -0
- package/src/sync/sync-engine.test.ts +121 -1
- package/src/sync/sync-engine.ts +43 -0
- package/src/ui/conflict-view.test.ts +16 -0
package/README.md
CHANGED
|
@@ -41,6 +41,18 @@ DSH is your AI assistant workbench — it holds your settings: model configs, pl
|
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
44
|
+
## 📸 Screenshots
|
|
45
|
+
|
|
46
|
+
| Export | Import Preview |
|
|
47
|
+
|:---:|:---:|
|
|
48
|
+
|  |  |
|
|
49
|
+
|
|
50
|
+
| Snapshot Restore | Remote Sync |
|
|
51
|
+
|:---:|:---:|
|
|
52
|
+
|  |  |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
44
56
|
## 🔄 How it works?
|
|
45
57
|
|
|
46
58
|
### Export (pack it up)
|
package/README.zh-CN.md
CHANGED
|
@@ -40,6 +40,18 @@ DSH 是你的 AI 助手工作台,里面存着你的各种设置:模型配置
|
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
43
|
+
## 📸 功能截图
|
|
44
|
+
|
|
45
|
+
| 导出备份 | 导入预览 |
|
|
46
|
+
|:---:|:---:|
|
|
47
|
+
|  |  |
|
|
48
|
+
|
|
49
|
+
| 快照恢复 | 远程同步 |
|
|
50
|
+
|:---:|:---:|
|
|
51
|
+
|  |  |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
43
55
|
## 🔄 它是怎么工作的?
|
|
44
56
|
|
|
45
57
|
### 导出(打包带走)
|
package/lib/client.d.ts
CHANGED
|
@@ -695,6 +695,8 @@ interface SyncConfirmItem {
|
|
|
695
695
|
adapter: SectionId;
|
|
696
696
|
kind: PlanItemKind;
|
|
697
697
|
description: string;
|
|
698
|
+
/** 变更详情(如插件「当前 1.1 vs 导入 1.6」),与导入恢复向导展示一致 */
|
|
699
|
+
detail?: string;
|
|
698
700
|
severity: 'info' | 'warning' | 'error';
|
|
699
701
|
/** 默认采纳方向;Conflict/MissingSecret 等人工项默认 false */
|
|
700
702
|
defaultAdopt: boolean;
|
|
@@ -727,8 +729,9 @@ interface ApplyItemsPayload {
|
|
|
727
729
|
interface SyncItemAdoption {
|
|
728
730
|
itemId: string;
|
|
729
731
|
adopt: boolean;
|
|
730
|
-
/** 冲突项解决方案(仅当该项是 Conflict 且 adopt=true
|
|
731
|
-
|
|
732
|
+
/** 冲突项解决方案(仅当该项是 Conflict 且 adopt=true 时必须)。
|
|
733
|
+
* 与导入恢复向导一致:keepLocal=保留当前 / useRemote=使用导入;跳过 = adopt=false。 */
|
|
734
|
+
resolution?: 'useRemote' | 'keepLocal';
|
|
732
735
|
}
|
|
733
736
|
/** POST /sync/apply-items 响应。 */
|
|
734
737
|
interface ApplyItemsResponse {
|
|
@@ -959,6 +962,8 @@ declare const zh$1: {
|
|
|
959
962
|
readonly 'import.conflicts.useImported': "使用备份";
|
|
960
963
|
readonly 'import.conflicts.review': "稍后决定";
|
|
961
964
|
readonly 'import.conflicts.unresolved': "还有 {count} 项未决策";
|
|
965
|
+
readonly 'import.conflicts.keepCurrentAll': "全部保留当前配置";
|
|
966
|
+
readonly 'import.conflicts.useImportedAll': "全部使用备份配置";
|
|
962
967
|
readonly 'import.paths.title': "路径映射";
|
|
963
968
|
readonly 'import.paths.hint': "备份中的绝对路径在目标机器可能不存在,请为每条路径指定新位置(留空将跳过该路径)。";
|
|
964
969
|
readonly 'import.paths.old': "原路径";
|
|
@@ -1058,14 +1063,16 @@ declare const zh: {
|
|
|
1058
1063
|
readonly 'syncflow.needsReviewBadge': "需人工决策";
|
|
1059
1064
|
readonly 'syncflow.empty': "远端快照与本地一致(无变更)";
|
|
1060
1065
|
readonly 'syncflow.diffCount': "共 {count} 项差异";
|
|
1066
|
+
readonly 'syncflow.keepLocalAll': "全部保留当前配置";
|
|
1067
|
+
readonly 'syncflow.useRemoteAll': "全部使用备份配置";
|
|
1068
|
+
readonly 'syncflow.bulkHint': "批量决策仅作用于冲突项;其余差异默认自动采用。";
|
|
1061
1069
|
readonly 'syncflow.conflictTitle': "冲突解决";
|
|
1062
|
-
readonly 'syncflow.conflictUseLocal': "
|
|
1063
|
-
readonly 'syncflow.conflictUseRemote': "
|
|
1064
|
-
readonly 'syncflow.
|
|
1065
|
-
readonly 'syncflow.
|
|
1066
|
-
readonly 'syncflow.conflictRemoteLabel': "远端";
|
|
1070
|
+
readonly 'syncflow.conflictUseLocal': "保留当前";
|
|
1071
|
+
readonly 'syncflow.conflictUseRemote': "使用备份";
|
|
1072
|
+
readonly 'syncflow.conflictLocalLabel': "当前";
|
|
1073
|
+
readonly 'syncflow.conflictRemoteLabel': "备份";
|
|
1067
1074
|
readonly 'syncflow.conflictAncestorLabel': "共同祖先";
|
|
1068
|
-
readonly 'syncflow.conflictUnresolved': "冲突项 {itemId}
|
|
1075
|
+
readonly 'syncflow.conflictUnresolved': "冲突项 {itemId} 尚未选择解决方式(保留当前 / 使用备份)";
|
|
1069
1076
|
readonly 'syncflow.diff': "差异";
|
|
1070
1077
|
readonly 'syncflow.importDone': "已导入 {n} 个分区";
|
|
1071
1078
|
readonly 'syncflow.importFailed': "导入失败(已整体回滚)";
|