@civilization/dsh-git-workbench 0.0.0-stage → 0.4.0
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/LICENSE +201 -0
- package/README.md +119 -2
- package/cordis.patch.yml +3 -0
- package/icon.svg +26 -0
- package/lib/client.js +2943 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +1274 -0
- package/package.json +91 -4
- package/src/client/GitBody.module.css +1283 -0
- package/src/client/GitBody.tsx +1496 -0
- package/src/client/GitBranchPill.module.css +292 -0
- package/src/client/GitBranchPill.tsx +368 -0
- package/src/client/GitTitle.tsx +27 -0
- package/src/client/definition.tsx +63 -0
- package/src/client/git-helpers.ts +351 -0
- package/src/client/index.ts +221 -0
- package/src/client/locales.ts +183 -0
- package/src/css.d.ts +4 -0
- package/src/git-executor.ts +1025 -0
- package/src/index.ts +220 -0
- package/src/tool.ts +299 -0
- package/src/types.ts +187 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Localized copy for the Git right-sidebar viewer and commands.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export const NS = 'gitView'
|
|
6
|
+
|
|
7
|
+
export const zh = {
|
|
8
|
+
'type.label': 'Git',
|
|
9
|
+
'guide.title': 'Git 版本控制',
|
|
10
|
+
'guide.description': '查看项目代码变更、分支、提交历史与差异对比',
|
|
11
|
+
'shortcut.noSession': '没有激活的会话',
|
|
12
|
+
'tabs.changes': '更改',
|
|
13
|
+
'tabs.history': '提交历史',
|
|
14
|
+
'tabs.tree': '提交图谱树',
|
|
15
|
+
'tabs.branches': '分支管理',
|
|
16
|
+
'tabs.tags': '标签管理',
|
|
17
|
+
'actions.refresh': '刷新状态',
|
|
18
|
+
'actions.viewDiff': '查看差异',
|
|
19
|
+
'actions.closeDiff': '收起差异',
|
|
20
|
+
'actions.stage': '暂存',
|
|
21
|
+
'actions.unstage': '取消暂存',
|
|
22
|
+
'actions.stageAll': '全部暂存',
|
|
23
|
+
'actions.unstageAll': '全部取消暂存',
|
|
24
|
+
'actions.discard': '放弃更改',
|
|
25
|
+
'actions.commit': '提交',
|
|
26
|
+
'actions.commitAndPush': '提交并推送',
|
|
27
|
+
'actions.checkout': '检出分支',
|
|
28
|
+
'actions.newBranch': '新建分支',
|
|
29
|
+
'actions.fetch': '获取远程',
|
|
30
|
+
'actions.pull': '拉取',
|
|
31
|
+
'actions.push': '推送',
|
|
32
|
+
'commit.placeholder': '输入提交信息 (Ctrl+Enter 提交)...',
|
|
33
|
+
'commit.emptyWarning': '请输入提交说明',
|
|
34
|
+
'commit.success': '提交成功',
|
|
35
|
+
'branch.filter': '搜索过滤分支...',
|
|
36
|
+
'branch.local': '本地分支',
|
|
37
|
+
'branch.remote': '远程分支',
|
|
38
|
+
'branch.current': '当前分支',
|
|
39
|
+
'branch.newPrompt': '输入新分支名称...',
|
|
40
|
+
'branch.createAndCheckout': '创建并检出',
|
|
41
|
+
'tree.author': '作者',
|
|
42
|
+
'tree.date': '时间',
|
|
43
|
+
'tree.hash': '哈希',
|
|
44
|
+
'tree.changedFiles': '变更文件',
|
|
45
|
+
'tree.selectCommit': '点击任意提交查看详情与代码差异',
|
|
46
|
+
'status.clean': '工作树干净,无任何未提交更改',
|
|
47
|
+
'status.notRepo': '当前工作区不是 Git 仓库',
|
|
48
|
+
'status.staged': '已暂存更改',
|
|
49
|
+
'status.unstaged': '工作区修改',
|
|
50
|
+
'status.untracked': '未跟踪文件',
|
|
51
|
+
'status.ahead': '领先 {count} 个提交',
|
|
52
|
+
'status.behind': '落后 {count} 个提交',
|
|
53
|
+
'diff.additions': '+{count}',
|
|
54
|
+
'diff.deletions': '-{count}',
|
|
55
|
+
'diff.empty': '无内容变动',
|
|
56
|
+
'tag.filter': '搜索过滤标签 (名称、Hash、提交说明)...',
|
|
57
|
+
'tag.newPrompt': '新建标签 (Tag)',
|
|
58
|
+
'tag.nameLabel': '标签名称',
|
|
59
|
+
'tag.namePlaceholder': '输入标签名称 (例如 v1.0.0)...',
|
|
60
|
+
'tag.targetCommitLabel': '目标 Commit Hash (可选,留空为 HEAD)',
|
|
61
|
+
'tag.messageLabel': '说明信息 (可选附注内容)',
|
|
62
|
+
'tag.messagePrompt': '输入附注说明信息 (可选)...',
|
|
63
|
+
'tag.createBtn': '创建标签',
|
|
64
|
+
'tag.cancelBtn': '取消',
|
|
65
|
+
'tag.locateBtn': '在图谱中定位',
|
|
66
|
+
'tag.copyName': '复制标签名',
|
|
67
|
+
'tag.deleteBtn': '删除',
|
|
68
|
+
'tag.deleteConfirm': '确定要删除标签 "{name}" 吗?',
|
|
69
|
+
'tag.empty': '暂无任何 Git 标签',
|
|
70
|
+
'tag.annotated': '附注',
|
|
71
|
+
'tag.locatedNotice': '已定位到标签 "{name}" 所在的提交',
|
|
72
|
+
'actions.locate': '定位',
|
|
73
|
+
'tree.colGraph': '图谱',
|
|
74
|
+
'tree.colSubject': '提交说明与分支标记',
|
|
75
|
+
'tree.colAuthor': '作者',
|
|
76
|
+
'tree.colTime': '时间',
|
|
77
|
+
'tree.colSha': 'Commit SHA',
|
|
78
|
+
'tree.searchPlaceholder': '搜索提交说明、SHA 或作者...',
|
|
79
|
+
'tree.filterAll': '全部',
|
|
80
|
+
'tree.filterMainline': '仅主线',
|
|
81
|
+
'detail.title': '提交详情 (COMMIT DETAILS)',
|
|
82
|
+
'detail.references': '包含引用 (REFERENCES)',
|
|
83
|
+
'detail.author': '作者 (Author)',
|
|
84
|
+
'detail.date': '提交时间 (Date)',
|
|
85
|
+
'detail.parent': '父级提交 (Parent)',
|
|
86
|
+
'detail.checkout': '检出分支 (Checkout)',
|
|
87
|
+
'detail.createBranchOrTag': '创建分支 / 标签',
|
|
88
|
+
'footer.showingCount': '已显示 {count} 条提交 (共 {total} 条)',
|
|
89
|
+
'footer.loadMore': '加载更多',
|
|
90
|
+
'footer.syncNormal': '分支同步正常',
|
|
91
|
+
'footer.ahead': '本地领先 {count} 个提交',
|
|
92
|
+
'footer.behind': '落后远程 {count} 个提交',
|
|
93
|
+
} satisfies Record<string, string>
|
|
94
|
+
|
|
95
|
+
export type GitViewKey = keyof typeof zh
|
|
96
|
+
|
|
97
|
+
export const en = {
|
|
98
|
+
'type.label': 'Git',
|
|
99
|
+
'guide.title': 'Git Source Control',
|
|
100
|
+
'guide.description': 'View project code changes, branches, commit log, and unified diffs',
|
|
101
|
+
'shortcut.noSession': 'No active session',
|
|
102
|
+
'tabs.changes': 'Changes',
|
|
103
|
+
'tabs.history': 'History',
|
|
104
|
+
'tabs.tree': 'Git Tree & Log',
|
|
105
|
+
'tabs.branches': 'Branches',
|
|
106
|
+
'tabs.tags': 'Tags',
|
|
107
|
+
'actions.refresh': 'Refresh status',
|
|
108
|
+
'actions.viewDiff': 'View Diff',
|
|
109
|
+
'actions.closeDiff': 'Collapse Diff',
|
|
110
|
+
'actions.stage': 'Stage',
|
|
111
|
+
'actions.unstage': 'Unstage',
|
|
112
|
+
'actions.stageAll': 'Stage All',
|
|
113
|
+
'actions.unstageAll': 'Unstage All',
|
|
114
|
+
'actions.discard': 'Discard',
|
|
115
|
+
'actions.commit': 'Commit',
|
|
116
|
+
'actions.commitAndPush': 'Commit and Push',
|
|
117
|
+
'actions.checkout': 'Checkout',
|
|
118
|
+
'actions.newBranch': 'New Branch',
|
|
119
|
+
'actions.fetch': 'Fetch',
|
|
120
|
+
'actions.pull': 'Pull',
|
|
121
|
+
'actions.push': 'Push',
|
|
122
|
+
'commit.placeholder': 'Commit message (Ctrl+Enter to commit)...',
|
|
123
|
+
'commit.emptyWarning': 'Please enter a commit message',
|
|
124
|
+
'commit.success': 'Committed successfully',
|
|
125
|
+
'branch.filter': 'Filter branches...',
|
|
126
|
+
'branch.local': 'Local Branches',
|
|
127
|
+
'branch.remote': 'Remote Branches',
|
|
128
|
+
'branch.current': 'Current Branch',
|
|
129
|
+
'branch.newPrompt': 'Enter new branch name...',
|
|
130
|
+
'branch.createAndCheckout': 'Create & Checkout',
|
|
131
|
+
'tree.author': 'Author',
|
|
132
|
+
'tree.date': 'Date',
|
|
133
|
+
'tree.hash': 'Hash',
|
|
134
|
+
'tree.changedFiles': 'Changed Files',
|
|
135
|
+
'tree.selectCommit': 'Select a commit to view details and code diff',
|
|
136
|
+
'status.clean': 'Working tree clean, no uncommitted changes',
|
|
137
|
+
'status.notRepo': 'Current workspace is not a Git repository',
|
|
138
|
+
'status.staged': 'Staged Changes',
|
|
139
|
+
'status.unstaged': 'Unstaged Changes',
|
|
140
|
+
'status.untracked': 'Untracked Files',
|
|
141
|
+
'status.ahead': '{count} ahead',
|
|
142
|
+
'status.behind': '{count} behind',
|
|
143
|
+
'diff.additions': '+{count}',
|
|
144
|
+
'diff.deletions': '-{count}',
|
|
145
|
+
'diff.empty': 'No content changes',
|
|
146
|
+
'tag.filter': 'Filter tags (name, hash, message)...',
|
|
147
|
+
'tag.newPrompt': 'New Tag',
|
|
148
|
+
'tag.nameLabel': 'Tag Name',
|
|
149
|
+
'tag.namePlaceholder': 'Enter tag name (e.g. v1.0.0)...',
|
|
150
|
+
'tag.targetCommitLabel': 'Target Commit Hash (optional, defaults to HEAD)',
|
|
151
|
+
'tag.messageLabel': 'Message (optional annotation)',
|
|
152
|
+
'tag.messagePrompt': 'Enter annotation message (optional)...',
|
|
153
|
+
'tag.createBtn': 'Create Tag',
|
|
154
|
+
'tag.cancelBtn': 'Cancel',
|
|
155
|
+
'tag.locateBtn': 'Locate in Graph',
|
|
156
|
+
'tag.copyName': 'Copy Tag Name',
|
|
157
|
+
'tag.deleteBtn': 'Delete',
|
|
158
|
+
'tag.deleteConfirm': 'Are you sure you want to delete tag "{name}"?',
|
|
159
|
+
'tag.empty': 'No Git tags found',
|
|
160
|
+
'tag.annotated': 'Annotated',
|
|
161
|
+
'tag.locatedNotice': 'Located commit for tag "{name}"',
|
|
162
|
+
'actions.locate': 'Locate',
|
|
163
|
+
'tree.colGraph': 'Graph',
|
|
164
|
+
'tree.colSubject': 'Commit Subject & References',
|
|
165
|
+
'tree.colAuthor': 'Author',
|
|
166
|
+
'tree.colTime': 'Time',
|
|
167
|
+
'tree.colSha': 'Commit SHA',
|
|
168
|
+
'tree.searchPlaceholder': 'Search subject, SHA or author...',
|
|
169
|
+
'tree.filterAll': 'All',
|
|
170
|
+
'tree.filterMainline': 'Mainline',
|
|
171
|
+
'detail.title': 'COMMIT DETAILS',
|
|
172
|
+
'detail.references': 'REFERENCES',
|
|
173
|
+
'detail.author': 'Author',
|
|
174
|
+
'detail.date': 'Date',
|
|
175
|
+
'detail.parent': 'Parent',
|
|
176
|
+
'detail.checkout': 'Checkout',
|
|
177
|
+
'detail.createBranchOrTag': 'Create Branch / Tag',
|
|
178
|
+
'footer.showingCount': 'Showing {count} commits (total {total})',
|
|
179
|
+
'footer.loadMore': 'Load more',
|
|
180
|
+
'footer.syncNormal': 'Branch in sync',
|
|
181
|
+
'footer.ahead': '{count} ahead of remote',
|
|
182
|
+
'footer.behind': '{count} behind remote',
|
|
183
|
+
} satisfies Record<GitViewKey, string>
|
package/src/css.d.ts
ADDED