clawt 3.4.5 → 3.4.6
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/dist/index.js +5 -1
- package/package.json +1 -1
- package/src/commands/init.ts +6 -2
package/dist/index.js
CHANGED
|
@@ -5356,7 +5356,11 @@ async function handleInit(options) {
|
|
|
5356
5356
|
}
|
|
5357
5357
|
const branchName = options.branch || getCurrentBranch();
|
|
5358
5358
|
logger.info(`init \u547D\u4EE4\u6267\u884C\uFF0C\u4E3B\u5DE5\u4F5C\u5206\u652F: ${branchName}`);
|
|
5359
|
-
|
|
5359
|
+
const updatedConfig = {
|
|
5360
|
+
...existingConfig,
|
|
5361
|
+
clawtMainWorkBranch: branchName
|
|
5362
|
+
};
|
|
5363
|
+
saveProjectConfig(updatedConfig);
|
|
5360
5364
|
if (existingConfig) {
|
|
5361
5365
|
printSuccess(MESSAGES.INIT_UPDATED(existingConfig.clawtMainWorkBranch, branchName));
|
|
5362
5366
|
} else {
|
package/package.json
CHANGED
package/src/commands/init.ts
CHANGED
|
@@ -79,8 +79,12 @@ async function handleInit(options: InitOptions): Promise<void> {
|
|
|
79
79
|
|
|
80
80
|
logger.info(`init 命令执行,主工作分支: ${branchName}`);
|
|
81
81
|
|
|
82
|
-
//
|
|
83
|
-
|
|
82
|
+
// 合并现有配置,仅更新 clawtMainWorkBranch
|
|
83
|
+
const updatedConfig: ProjectConfig = {
|
|
84
|
+
...existingConfig,
|
|
85
|
+
clawtMainWorkBranch: branchName,
|
|
86
|
+
};
|
|
87
|
+
saveProjectConfig(updatedConfig);
|
|
84
88
|
|
|
85
89
|
if (existingConfig) {
|
|
86
90
|
printSuccess(MESSAGES.INIT_UPDATED(existingConfig.clawtMainWorkBranch, branchName));
|