@norman-else/dsh-claude 0.1.27 → 0.1.28

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/lib/client.d.ts CHANGED
@@ -218,10 +218,12 @@ declare const en: {
218
218
  readonly diffMergeCompleted: "Merged PR #{number}";
219
219
  readonly diffUpdateBranch: "Update branch…";
220
220
  readonly repositoryUpdateBranch: "Update branch";
221
- readonly diffUpdateBranchDescription: "Merge origin/{base} into the current branch and push; hand any conflicts to Claude.";
221
+ readonly diffUpdateBranchDescription: "Update the current branch from origin/{base} and push; hand any conflicts to Claude.";
222
+ readonly diffUpdateBranch_rebase: "Rebase onto origin/{base} (rewrites history, pushes with --force-with-lease)";
223
+ readonly diffUpdateBranch_merge: "Merge origin/{base} into the current branch";
222
224
  readonly diffUpdateBranchBehind: "{count} commit(s) behind origin/{base}";
223
- readonly diffUpdateBranchCompleted: "Merged and pushed commit {commit}";
224
- readonly diffUpdateBranchConflicts: "The merge left conflicts in these files:";
225
+ readonly diffUpdateBranchCompleted: "Updated and pushed commit {commit}";
226
+ readonly diffUpdateBranchConflicts: "The update left conflicts in these files:";
225
227
  readonly diffUpdateBranchResolve: "Have Claude resolve the conflicts";
226
228
  readonly repositoryChecksOpen: "Show failing checks";
227
229
  readonly checksCardTitle: "Failing checks";
package/lib/client.js CHANGED
@@ -2834,19 +2834,21 @@ window.__ModuleLoader__.load({
2834
2834
  background: var(--dsw-alias-bg-layer-2);
2835
2835
  }
2836
2836
  .dshClaudeRepositoryActionModalContent h2 {
2837
- font-size: 24px;
2838
- line-height: 32px;
2837
+ font-size: 18px;
2838
+ line-height: 26px;
2839
2839
  }
2840
2840
  .dshClaudeRepositoryActionModalContent > p {
2841
- font-size: 18px;
2842
- line-height: 28px;
2841
+ font-size: 14px;
2842
+ line-height: 22px;
2843
2843
  }
2844
- .dshClaudeRepositoryActionModal input[type='checkbox'] {
2845
- width: 18px;
2846
- height: 18px;
2844
+ .dshClaudeRepositoryActionModal input:is([type='checkbox'], [type='radio']) {
2845
+ width: 16px;
2846
+ height: 16px;
2847
+ margin: 0;
2848
+ accent-color: var(--dsw-static-blue-450);
2847
2849
  }
2848
2850
  .dshClaudeRepositoryActionModal textarea:focus,
2849
- .dshClaudeRepositoryActionModal input:not([type='checkbox']):focus {
2851
+ .dshClaudeRepositoryActionModal input:not([type='checkbox'], [type='radio']):focus {
2850
2852
  outline: none;
2851
2853
  box-shadow: inset 0 0 0 1px var(--dsw-static-blue-450);
2852
2854
  }
@@ -2865,8 +2867,8 @@ window.__ModuleLoader__.load({
2865
2867
  gap: 16,
2866
2868
  minWidth: 0,
2867
2869
  color: "var(--dsw-alias-label-secondary)",
2868
- fontSize: 16,
2869
- lineHeight: "24px"
2870
+ fontSize: 14,
2871
+ lineHeight: "22px"
2870
2872
  };
2871
2873
  const diffModalMetaText = {
2872
2874
  minWidth: 0,
@@ -2890,8 +2892,8 @@ window.__ModuleLoader__.load({
2890
2892
  padding: "10px 14px",
2891
2893
  borderBottom: "1px solid var(--dsw-alias-border-l2, color-mix(in srgb, currentColor 16%, transparent))",
2892
2894
  color: "var(--dsw-alias-label-secondary)",
2893
- fontSize: 15,
2894
- lineHeight: "22px"
2895
+ fontSize: 13,
2896
+ lineHeight: "20px"
2895
2897
  };
2896
2898
  const diffModalFilePath = {
2897
2899
  minWidth: 0,
@@ -2905,32 +2907,32 @@ window.__ModuleLoader__.load({
2905
2907
  flexDirection: "column",
2906
2908
  gap: 8,
2907
2909
  color: "var(--dsw-alias-label-secondary)",
2908
- fontSize: 16,
2909
- lineHeight: "24px",
2910
+ fontSize: 14,
2911
+ lineHeight: "22px",
2910
2912
  fontWeight: 550
2911
2913
  };
2912
2914
  const diffModalTextarea = {
2913
2915
  ...settingTextInput,
2914
2916
  minHeight: 140,
2915
2917
  padding: "10px 14px",
2916
- fontSize: 16,
2917
- lineHeight: "24px",
2918
+ fontSize: 14,
2919
+ lineHeight: "22px",
2918
2920
  resize: "vertical"
2919
2921
  };
2920
2922
  const diffModalTextInput = {
2921
2923
  ...settingTextInput,
2922
2924
  minHeight: 44,
2923
2925
  padding: "9px 14px",
2924
- fontSize: 16,
2925
- lineHeight: "24px"
2926
+ fontSize: 14,
2927
+ lineHeight: "22px"
2926
2928
  };
2927
2929
  const diffModalCheckbox = {
2928
2930
  display: "flex",
2929
2931
  alignItems: "center",
2930
2932
  gap: 10,
2931
2933
  color: "var(--dsw-alias-label-secondary)",
2932
- fontSize: 16,
2933
- lineHeight: "24px"
2934
+ fontSize: 14,
2935
+ lineHeight: "22px"
2934
2936
  };
2935
2937
  const diffModalFooter = {
2936
2938
  display: "flex",
@@ -2938,28 +2940,28 @@ window.__ModuleLoader__.load({
2938
2940
  gap: 12
2939
2941
  };
2940
2942
  const diffModalButton = {
2941
- minHeight: 42,
2943
+ minHeight: 36,
2942
2944
  padding: "8px 18px",
2943
- fontSize: 16,
2944
- lineHeight: "24px"
2945
+ fontSize: 14,
2946
+ lineHeight: "22px"
2945
2947
  };
2946
2948
  const diffModalStatus = {
2947
2949
  margin: 0,
2948
2950
  color: "var(--dsw-alias-label-secondary)",
2949
- fontSize: 16,
2950
- lineHeight: "24px"
2951
+ fontSize: 14,
2952
+ lineHeight: "22px"
2951
2953
  };
2952
2954
  const diffModalError = {
2953
2955
  margin: "10px 0 0",
2954
2956
  color: "var(--dsw-alias-state-error-primary)",
2955
- fontSize: 16,
2956
- lineHeight: "24px"
2957
+ fontSize: 14,
2958
+ lineHeight: "22px"
2957
2959
  };
2958
2960
  const diffModalSuccess = {
2959
2961
  margin: 0,
2960
2962
  color: "var(--dsw-alias-state-success-primary)",
2961
- fontSize: 16,
2962
- lineHeight: "24px"
2963
+ fontSize: 14,
2964
+ lineHeight: "22px"
2963
2965
  };
2964
2966
  //#endregion
2965
2967
  //#region src/client/token-format.ts
@@ -5412,8 +5414,10 @@ window.__ModuleLoader__.load({
5412
5414
  }).join("\n\n")}`;
5413
5415
  }
5414
5416
  /** Draft handed to Claude after an update-branch merge left conflicts behind. */
5415
- function composeConflictsPrompt(baseBranch, conflicts) {
5416
- return `Merging origin/${baseBranch} into the current branch left merge conflicts in the files below. Resolve each conflict preserving the intent of both sides, then commit the merge.\n\n${conflicts.map((file) => `- ${file}`).join("\n")}`;
5417
+ function composeConflictsPrompt(baseBranch, conflicts, method = "merge") {
5418
+ const list = conflicts.map((file) => `- ${file}`).join("\n");
5419
+ if (method === "rebase") return `Rebasing the current branch onto origin/${baseBranch} stopped on conflicts in the files below. Resolve each conflict preserving the intent of both sides, stage the files, run \`git rebase --continue\` until the rebase finishes, then push with \`git push --force-with-lease\`.\n\n${list}`;
5420
+ return `Merging origin/${baseBranch} into the current branch left merge conflicts in the files below. Resolve each conflict preserving the intent of both sides, then commit the merge.\n\n${list}`;
5417
5421
  }
5418
5422
  //#endregion
5419
5423
  //#region src/client/auto-fix.ts
@@ -5908,6 +5912,7 @@ window.__ModuleLoader__.load({
5908
5912
  }
5909
5913
  function UpdateBranchControl({ sessionId, repository, t, submitPrompt }) {
5910
5914
  const [dialog, setDialog] = useState();
5915
+ const [method, setMethod] = useState("rebase");
5911
5916
  const controller = useRef();
5912
5917
  const pullRequest = repository.pullRequest;
5913
5918
  const base = pullRequest?.baseBranch;
@@ -5959,7 +5964,8 @@ window.__ModuleLoader__.load({
5959
5964
  fingerprint: dialog.fingerprint,
5960
5965
  message: "",
5961
5966
  includeUnstaged: false,
5962
- baseBranch: base
5967
+ baseBranch: base,
5968
+ mergeMethod: method
5963
5969
  }).then((result) => {
5964
5970
  setDialog({
5965
5971
  ...pending,
@@ -6042,6 +6048,17 @@ window.__ModuleLoader__.load({
6042
6048
  })
6043
6049
  })]
6044
6050
  }),
6051
+ ["rebase", "merge"].map((option) => /* @__PURE__ */ jsxs("label", {
6052
+ style: diffModalCheckbox,
6053
+ children: [/* @__PURE__ */ jsx("input", {
6054
+ type: "radio",
6055
+ name: "dsh-claude-update-branch-method",
6056
+ value: option,
6057
+ checked: method === option,
6058
+ disabled: settled || dialog.submitting,
6059
+ onChange: () => setMethod(option)
6060
+ }), t(`diffUpdateBranch_${option}`, { base })]
6061
+ }, option)),
6045
6062
  dialog.pushed === void 0 ? null : /* @__PURE__ */ jsx("p", {
6046
6063
  style: diffModalSuccess,
6047
6064
  children: t("diffUpdateBranchCompleted", { commit: dialog.pushed.slice(0, 8) })
@@ -6059,7 +6076,7 @@ window.__ModuleLoader__.load({
6059
6076
  type: "button",
6060
6077
  style: diffModalConflictResolve,
6061
6078
  onClick: () => {
6062
- submitPrompt(composeConflictsPrompt(base, dialog.conflicts ?? []));
6079
+ submitPrompt(composeConflictsPrompt(base, dialog.conflicts ?? [], method));
6063
6080
  closeDialog();
6064
6081
  },
6065
6082
  children: t("diffUpdateBranchResolve")
@@ -10008,10 +10025,12 @@ window.__ModuleLoader__.load({
10008
10025
  diffMergeCompleted: "已合并 PR #{number}",
10009
10026
  diffUpdateBranch: "Update branch…",
10010
10027
  repositoryUpdateBranch: "Update branch",
10011
- diffUpdateBranchDescription: " origin/{base} 合并进当前分支并推送;出现冲突时可交给 Claude 解决。",
10028
+ diffUpdateBranchDescription: " origin/{base} 更新当前分支并推送;出现冲突时可交给 Claude 解决。",
10029
+ diffUpdateBranch_rebase: "Rebase 到 origin/{base}(改写历史,以 --force-with-lease 推送)",
10030
+ diffUpdateBranch_merge: "将 origin/{base} 合并进当前分支",
10012
10031
  diffUpdateBranchBehind: "落后 origin/{base} {count} 个 commit",
10013
- diffUpdateBranchCompleted: "已合并并推送 commit {commit}",
10014
- diffUpdateBranchConflicts: "合并产生冲突,以下文件需要解决:",
10032
+ diffUpdateBranchCompleted: "已更新并推送 commit {commit}",
10033
+ diffUpdateBranchConflicts: "更新产生冲突,以下文件需要解决:",
10015
10034
  diffUpdateBranchResolve: "让 Claude 解决冲突",
10016
10035
  repositoryChecksOpen: "查看失败的检查",
10017
10036
  checksCardTitle: "失败的检查",
@@ -10322,10 +10341,12 @@ window.__ModuleLoader__.load({
10322
10341
  diffMergeCompleted: "Merged PR #{number}",
10323
10342
  diffUpdateBranch: "Update branch…",
10324
10343
  repositoryUpdateBranch: "Update branch",
10325
- diffUpdateBranchDescription: "Merge origin/{base} into the current branch and push; hand any conflicts to Claude.",
10344
+ diffUpdateBranchDescription: "Update the current branch from origin/{base} and push; hand any conflicts to Claude.",
10345
+ diffUpdateBranch_rebase: "Rebase onto origin/{base} (rewrites history, pushes with --force-with-lease)",
10346
+ diffUpdateBranch_merge: "Merge origin/{base} into the current branch",
10326
10347
  diffUpdateBranchBehind: "{count} commit(s) behind origin/{base}",
10327
- diffUpdateBranchCompleted: "Merged and pushed commit {commit}",
10328
- diffUpdateBranchConflicts: "The merge left conflicts in these files:",
10348
+ diffUpdateBranchCompleted: "Updated and pushed commit {commit}",
10349
+ diffUpdateBranchConflicts: "The update left conflicts in these files:",
10329
10350
  diffUpdateBranchResolve: "Have Claude resolve the conflicts",
10330
10351
  repositoryChecksOpen: "Show failing checks",
10331
10352
  checksCardTitle: "Failing checks",