@lukstei/dsh-client-review-git 0.2.2-rc.5.5 → 0.2.2-rc.5.7
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/client.js +45 -45
- package/dist/host.js +51 -9
- package/package.json +3 -3
package/dist/client.js
CHANGED
|
@@ -1319,64 +1319,64 @@ window.__ModuleLoader__.load({
|
|
|
1319
1319
|
// \0git-diff-pane-css
|
|
1320
1320
|
const cssText = ".PVpF4W_root {\n min-width: 0;\n height: 100%;\n min-height: 0;\n color: var(--dsw-alias-label-primary);\n font-family: var(--dsw-font-family);\n font-size: var(--dsh-content-font-size-secondary);\n flex-direction: column;\n line-height: 1.5;\n display: flex;\n container: PVpF4W_git-diff / size;\n}\n\n.PVpF4W_header {\n box-sizing: border-box;\n background: var(--dsw-alias-bg-module-platform);\n border-bottom: .5px solid var(--dsw-alias-border-l2);\n flex: none;\n align-items: center;\n gap: 6px;\n min-width: 0;\n height: 35px;\n min-height: 35px;\n padding: 0 10px;\n display: flex;\n}\n\n.PVpF4W_repositoryName {\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n color: var(--dsw-alias-label-secondary);\n flex: 1;\n font-size: 13px;\n font-weight: 500;\n display: block;\n overflow: hidden;\n}\n\n.PVpF4W_scopePicker {\n flex: 0 auto;\n min-width: 0;\n max-width: 240px;\n display: block;\n}\n\n.PVpF4W_scopeSelector {\n margin-inline-start: auto;\n}\n\n.PVpF4W_baselinePicker {\n border-radius: var(--dsw-radius-sm);\n min-width: 0;\n max-width: 120px;\n height: 26px;\n color: inherit;\n font: inherit;\n font-size: 13px;\n line-height: 26px;\n}\n\n.PVpF4W_body {\n flex-direction: column;\n flex: 1;\n gap: 8px;\n min-width: 0;\n min-height: 0;\n display: flex;\n overflow: hidden;\n}\n\n.PVpF4W_body > p {\n padding: 12px;\n}\n\n.PVpF4W_note, .PVpF4W_baseline {\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n margin: 0;\n}\n\n.PVpF4W_error {\n color: var(--dsw-alias-state-error-primary);\n overflow-wrap: anywhere;\n margin: 0;\n}\n\n.PVpF4W_branchButton {\n border-radius: var(--dsw-radius-sm);\n justify-content: flex-start;\n width: auto;\n min-width: 0;\n max-width: 100%;\n height: 26px;\n padding-inline: 6px;\n font-size: 13px;\n}\n\n.PVpF4W_truncate, .PVpF4W_filename {\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n overflow: hidden;\n}\n\n.PVpF4W_filename {\n flex: 0 auto;\n line-height: 20px;\n}\n\n.PVpF4W_baseline {\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: none;\n align-items: center;\n min-width: 0;\n max-width: 45%;\n height: 26px;\n font-size: 13px;\n line-height: 26px;\n display: inline-flex;\n overflow: hidden;\n}\n\n.PVpF4W_commitLabel {\n flex-direction: column;\n min-width: 0;\n display: flex;\n}\n\n.PVpF4W_branchMenuLabel {\n flex: 1;\n justify-content: space-between;\n align-items: center;\n gap: 20px;\n min-width: 0;\n display: flex;\n}\n\n.PVpF4W_branchMenuLabel time {\n white-space: nowrap;\n flex: none;\n}\n\n.PVpF4W_fileTreeScroll {\n overscroll-behavior: contain;\n flex: 1;\n min-width: 0;\n min-height: 0;\n overflow: auto;\n}\n\n.PVpF4W_directory {\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--dsw-alias-label-tertiary);\n cursor: pointer;\n padding: 5px 12px;\n overflow: hidden;\n}\n\n.PVpF4W_fileTree {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.PVpF4W_row {\n text-align: left;\n border-radius: 0;\n flex: 1;\n justify-content: flex-start;\n align-items: center;\n gap: 8px;\n min-width: 0;\n height: auto;\n min-height: 34px;\n padding: 4px 8px;\n}\n\n.PVpF4W_row time {\n white-space: nowrap;\n flex: none;\n line-height: 20px;\n}\n\n.PVpF4W_fileToolbar .PVpF4W_row:hover:not(:disabled), .PVpF4W_fileToolbar .PVpF4W_row:active:not(:disabled) {\n background: none;\n}\n\n.PVpF4W_disclosureOpen, .PVpF4W_disclosureClosed {\n transform-origin: center;\n flex: none;\n align-self: center;\n width: 14px;\n height: 14px;\n}\n\n.PVpF4W_disclosureClosed {\n transform: rotate(-90deg);\n}\n\n.PVpF4W_fileEntry {\n border-bottom: .5px solid var(--dsw-alias-border-l1);\n}\n\n.PVpF4W_fileBody {\n min-width: 0;\n}\n\n.PVpF4W_fileBody > p {\n padding: 8px 12px;\n}\n\n.PVpF4W_status {\n width: 1em;\n color: var(--dsw-alias-label-tertiary);\n flex: none;\n align-items: center;\n font-size: .9em;\n line-height: 20px;\n display: inline-flex;\n}\n\n.PVpF4W_lineCounts {\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n flex: none;\n align-items: center;\n gap: 6px;\n font-size: .9em;\n line-height: 20px;\n display: flex;\n}\n\n.PVpF4W_added {\n color: var(--dsw-alias-file-diff-added-marker);\n}\n\n.PVpF4W_visuallyHidden {\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n width: 1px;\n height: 1px;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n\n.PVpF4W_deleted {\n color: var(--dsw-alias-file-diff-deleted-marker);\n}\n\n.PVpF4W_diffContent {\n --diffs-font-family: var(--dsh-font-family-code, monospace);\n --diffs-font-size: var(--dsh-code-font-size, 12px);\n min-width: 0;\n display: block;\n}\n\n.PVpF4W_icon {\n flex: none;\n width: 16px;\n height: 16px;\n}\n\n.PVpF4W_fileToolbar {\n box-sizing: border-box;\n min-height: 36px;\n transition: background var(--ds-transition-duration-fast, .1s)\n var(--ds-ease-in-out, ease);\n background: none;\n flex: none;\n justify-content: space-between;\n align-items: center;\n gap: 8px;\n margin: 0;\n padding: 0 6px 0 0;\n display: flex;\n}\n\n.PVpF4W_fileToolbar:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.PVpF4W_fileToolbar .PVpF4W_fileAction {\n width: 28px;\n min-width: 28px;\n color: var(--dsw-alias-label-secondary);\n padding: 0;\n}\n\n.PVpF4W_fileAction[aria-pressed=\"true\"] {\n color: var(--dsw-alias-label-primary);\n}\n\n.PVpF4W_fileAction .PVpF4W_icon {\n width: 14px;\n height: 14px;\n}\n\n.PVpF4W_reviewDock {\n flex-direction: column;\n flex: none;\n min-height: 0;\n display: flex;\n}\n\n.PVpF4W_reviewBar {\n box-sizing: border-box;\n background: var(--dsw-alias-bg-base);\n border-top: .5px solid var(--dsw-alias-border-l3);\n flex: none;\n justify-content: space-between;\n align-items: center;\n gap: 8px;\n height: 40px;\n min-height: 40px;\n padding: 4px 10px;\n display: flex;\n}\n\n.PVpF4W_reviewDrawer {\n box-sizing: border-box;\n overscroll-behavior: contain;\n border-top: .5px solid var(--dsw-alias-border-l3);\n max-height: min(280px, 35cqh);\n padding: 4px 8px;\n overflow: auto;\n}\n\n.PVpF4W_reviewRow {\n text-align: left;\n flex: 1;\n justify-content: flex-start;\n width: 100%;\n min-width: 0;\n height: auto;\n}\n\n.PVpF4W_reviewPreview {\n flex-direction: column;\n min-width: 0;\n padding-block: 4px;\n display: flex;\n}\n\n.PVpF4W_reviewItem {\n align-items: center;\n gap: 4px;\n display: flex;\n}\n\n.PVpF4W_chevronOpen {\n width: 16px;\n height: 16px;\n transform: rotate(180deg);\n}\n\n.PVpF4W_comment {\n box-sizing: border-box;\n color: var(--dsw-alias-label-primary);\n background: var(--dsw-alias-markdown-code-block);\n border: .5px solid var(--dsw-alias-border-l3);\n border-radius: var(--dsw-radius-lg);\n font: var(--dsh-content-font-size-secondary) / 1.5 var(--dsw-font-family);\n max-width: 860px;\n margin: 8px 12px;\n padding: 8px 12px;\n}\n\n.PVpF4W_commentHeader {\n justify-content: space-between;\n align-items: center;\n gap: 8px;\n display: flex;\n}\n\n.PVpF4W_commentActions {\n align-items: center;\n gap: 4px;\n display: flex;\n}\n\n.PVpF4W_commentText {\n text-align: left;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n justify-content: flex-start;\n width: 100%;\n height: auto;\n}\n\n.PVpF4W_comment textarea {\n box-sizing: border-box;\n resize: vertical;\n width: 100%;\n color: inherit;\n border: 1px solid var(--dsw-alias-border-l3);\n font: inherit;\n background: none;\n border-radius: 4px;\n margin: 4px 0;\n padding: 6px;\n display: block;\n}\n\n@media (pointer: coarse) {\n .PVpF4W_fileToolbar {\n padding-block: 0;\n }\n\n .PVpF4W_row, .PVpF4W_directory {\n min-height: 44px;\n }\n\n .PVpF4W_directory {\n box-sizing: border-box;\n padding-block: 12px;\n }\n}\n\n@container PVpF4W_git-diff (width <= 600px) {\n .PVpF4W_header > .PVpF4W_baseline {\n display: none;\n }\n\n .PVpF4W_scopePicker {\n max-width: 180px;\n }\n}\n\n.PVpF4W_fileHeading {\n font: var(--dsh-content-font-size-secondary) / 1.5 var(--dsw-font-family);\n background: var(--dsw-alias-bg-module-platform);\n}\n\n.PVpF4W_fileHeading[data-expanded=\"true\"] {\n border-bottom: .5px solid var(--dsw-alias-border-l2);\n}\n\n.PVpF4W_reviewCardList {\n --deliverable-fill: var(--dsw-static-neutral-50);\n --deliverable-hover: var(--dsw-static-neutral-100);\n flex-direction: column;\n gap: 6px;\n width: 100%;\n margin-block: 6px;\n display: flex;\n}\n\nbody[data-ds-dark-theme] .PVpF4W_reviewCardList {\n --deliverable-fill: var(--dsw-static-neutral-850);\n --deliverable-hover: var(--dsw-static-neutral-800);\n}\n\n.PVpF4W_reviewCard {\n box-sizing: border-box;\n border: .5px solid var(--dsw-alias-border-l1);\n border-radius: var(--dsw-radius-lg);\n background: var(--deliverable-fill, var(--dsw-static-neutral-50));\n width: 100%;\n min-width: 0;\n height: 60px;\n color: var(--dsw-alias-label-primary);\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n transition: background-color .12s;\n display: flex;\n position: relative;\n overflow: hidden;\n}\n\nbody[data-ds-dark-theme] .PVpF4W_reviewCard {\n background: var(--deliverable-fill, var(--dsw-static-neutral-850));\n}\n\n@media (hover: hover) {\n .PVpF4W_reviewCard:hover {\n background: var(--deliverable-hover, var(--dsw-static-neutral-100));\n }\n\n body[data-ds-dark-theme] .PVpF4W_reviewCard:hover {\n background: var(--deliverable-hover, var(--dsw-static-neutral-800));\n }\n}\n\n.PVpF4W_reviewCard[data-clickable=\"true\"] {\n cursor: pointer;\n}\n\n.PVpF4W_reviewCard:focus-visible {\n box-shadow: inset 0 0 0 2px\n var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));\n outline: none;\n}\n\n.PVpF4W_reviewIcon {\n z-index: 2;\n box-sizing: border-box;\n pointer-events: none;\n border: .5px solid var(--dsw-alias-border-l1);\n background: color-mix(in srgb, var(--dsw-static-neutral-00) 50%, transparent);\n width: 40px;\n height: 40px;\n color: var(--dsw-alias-link);\n border-radius: 10px;\n flex: none;\n place-items: center;\n display: grid;\n position: relative;\n overflow: hidden;\n}\n\nbody[data-ds-dark-theme] .PVpF4W_reviewIcon {\n background: color-mix(in srgb, var(--dsw-static-neutral-00) 5%, transparent);\n}\n\n.PVpF4W_reviewDetails {\n z-index: 2;\n flex-direction: column;\n flex: 1;\n justify-content: center;\n gap: 2px;\n min-width: 0;\n display: flex;\n position: relative;\n}\n\n.PVpF4W_reviewTitle {\n min-width: 0;\n color: var(--dsw-alias-label-primary);\n align-items: center;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n display: inline-flex;\n}\n\n.PVpF4W_reviewBranchCopy {\n cursor: pointer;\n border-radius: var(--dsw-radius-xs, 4px);\n -webkit-user-select: text;\n user-select: text;\n align-items: center;\n gap: 6px;\n min-width: 0;\n max-width: 100%;\n margin-left: -4px;\n padding: 1px 4px;\n transition: background-color .1s;\n display: inline-flex;\n}\n\n@media (hover: hover) {\n .PVpF4W_reviewBranchCopy:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.PVpF4W_reviewBranchCopy:focus-visible {\n box-shadow: 0 0 0 1.5px\n var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));\n outline: none;\n}\n\n.PVpF4W_reviewBranchName {\n text-overflow: ellipsis;\n white-space: nowrap;\n -webkit-user-select: text;\n user-select: text;\n overflow: hidden;\n}\n\n.PVpF4W_reviewCopyIcon {\n opacity: .6;\n color: var(--dsw-alias-label-secondary);\n flex: none;\n align-items: center;\n transition: opacity .1s, color .1s;\n display: inline-flex;\n}\n\n.PVpF4W_reviewBranchCopy:hover .PVpF4W_reviewCopyIcon, .PVpF4W_reviewBranchCopy[data-copied=\"true\"] .PVpF4W_reviewCopyIcon {\n opacity: 1;\n color: var(--dsw-alias-link);\n}\n\n.PVpF4W_reviewCopyFeedback {\n color: var(--dsw-alias-link);\n flex: none;\n font-size: 11px;\n font-weight: 400;\n line-height: 16px;\n}\n\n.PVpF4W_reviewDescription {\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--dsw-alias-label-tertiary);\n font-size: 10px;\n font-weight: 400;\n line-height: 16px;\n overflow: hidden;\n}\n\n.PVpF4W_codeViewWrapper {\n min-width: 0;\n position: relative;\n}\n\n.PVpF4W_codeViewWrapper .md-code-block[data-line-numbers] {\n margin: 0;\n}\n\n.PVpF4W_codeViewWrapper .md-code-block[data-line-numbers] :where(pre) code > .line {\n padding-inline-start: calc(var(--dsl-code-block-line-number-width) + 20px);\n}\n\n.PVpF4W_codeViewWrapper .md-code-block[data-line-numbers] :where(pre) code > .line:before {\n width: var(--dsl-code-block-line-number-width);\n font-family: var(--dsh-font-family-code, monospace);\n font-variant-numeric: tabular-nums;\n inset-inline-start: 8px;\n}\n\n.PVpF4W_floatingQuote {\n z-index: 25;\n pointer-events: auto;\n position: absolute;\n}\n\n.PVpF4W_floatingQuoteButton {\n height: 24px;\n font-size: 11px;\n font-weight: 500;\n font-family: var(--dsw-font-family);\n color: #fff;\n background: var(--dsw-alias-interactive-bg-primary, #3b82f6);\n cursor: pointer;\n user-select: none;\n white-space: nowrap;\n border: none;\n border-radius: 12px;\n justify-content: center;\n align-items: center;\n padding: 0 10px;\n display: inline-flex;\n box-shadow: 0 2px 8px #00000040;\n}\n\n.PVpF4W_floatingQuoteButton:hover {\n filter: brightness(1.1);\n}\n";
|
|
1321
1321
|
var _git_diff_pane_css_default = {
|
|
1322
|
-
"reviewCopyFeedback": "PVpF4W_reviewCopyFeedback",
|
|
1323
|
-
"reviewCopyIcon": "PVpF4W_reviewCopyIcon",
|
|
1324
|
-
"reviewCard": "PVpF4W_reviewCard",
|
|
1325
|
-
"reviewCardList": "PVpF4W_reviewCardList",
|
|
1326
|
-
"reviewIcon": "PVpF4W_reviewIcon",
|
|
1327
|
-
"error": "PVpF4W_error",
|
|
1328
|
-
"deleted": "PVpF4W_deleted",
|
|
1329
|
-
"fileHeading": "PVpF4W_fileHeading",
|
|
1330
|
-
"fileToolbar": "PVpF4W_fileToolbar",
|
|
1331
|
-
"fileEntry": "PVpF4W_fileEntry",
|
|
1332
|
-
"directory": "PVpF4W_directory",
|
|
1333
|
-
"commentHeader": "PVpF4W_commentHeader",
|
|
1334
|
-
"commentText": "PVpF4W_commentText",
|
|
1335
|
-
"codeViewWrapper": "PVpF4W_codeViewWrapper",
|
|
1336
1322
|
"fileBody": "PVpF4W_fileBody",
|
|
1337
|
-
"
|
|
1338
|
-
"
|
|
1339
|
-
"
|
|
1340
|
-
"git-diff": "PVpF4W_git-diff",
|
|
1341
|
-
"diffContent": "PVpF4W_diffContent",
|
|
1342
|
-
"reviewDrawer": "PVpF4W_reviewDrawer",
|
|
1343
|
-
"floatingQuote": "PVpF4W_floatingQuote",
|
|
1323
|
+
"fileHeading": "PVpF4W_fileHeading",
|
|
1324
|
+
"status": "PVpF4W_status",
|
|
1325
|
+
"branchButton": "PVpF4W_branchButton",
|
|
1344
1326
|
"body": "PVpF4W_body",
|
|
1345
|
-
"reviewDescription": "PVpF4W_reviewDescription",
|
|
1346
|
-
"scopeSelector": "PVpF4W_scopeSelector",
|
|
1347
1327
|
"added": "PVpF4W_added",
|
|
1328
|
+
"icon": "PVpF4W_icon",
|
|
1329
|
+
"lineCounts": "PVpF4W_lineCounts",
|
|
1330
|
+
"reviewCopyIcon": "PVpF4W_reviewCopyIcon",
|
|
1331
|
+
"note": "PVpF4W_note",
|
|
1332
|
+
"reviewBranchName": "PVpF4W_reviewBranchName",
|
|
1333
|
+
"reviewIcon": "PVpF4W_reviewIcon",
|
|
1334
|
+
"disclosureClosed": "PVpF4W_disclosureClosed",
|
|
1348
1335
|
"baseline": "PVpF4W_baseline",
|
|
1349
|
-
"
|
|
1336
|
+
"filename": "PVpF4W_filename",
|
|
1337
|
+
"fileTree": "PVpF4W_fileTree",
|
|
1338
|
+
"branchMenuLabel": "PVpF4W_branchMenuLabel",
|
|
1339
|
+
"truncate": "PVpF4W_truncate",
|
|
1340
|
+
"chevronOpen": "PVpF4W_chevronOpen",
|
|
1341
|
+
"reviewCard": "PVpF4W_reviewCard",
|
|
1350
1342
|
"scopePicker": "PVpF4W_scopePicker",
|
|
1351
|
-
"
|
|
1352
|
-
"reviewPreview": "PVpF4W_reviewPreview",
|
|
1343
|
+
"deleted": "PVpF4W_deleted",
|
|
1353
1344
|
"reviewDetails": "PVpF4W_reviewDetails",
|
|
1354
|
-
"
|
|
1355
|
-
"reviewRow": "PVpF4W_reviewRow",
|
|
1356
|
-
"reviewItem": "PVpF4W_reviewItem",
|
|
1345
|
+
"fileTreeScroll": "PVpF4W_fileTreeScroll",
|
|
1357
1346
|
"reviewTitle": "PVpF4W_reviewTitle",
|
|
1358
1347
|
"repositoryName": "PVpF4W_repositoryName",
|
|
1359
|
-
"reviewDock": "PVpF4W_reviewDock",
|
|
1360
|
-
"visuallyHidden": "PVpF4W_visuallyHidden",
|
|
1361
|
-
"lineCounts": "PVpF4W_lineCounts",
|
|
1362
|
-
"comment": "PVpF4W_comment",
|
|
1363
|
-
"chevronOpen": "PVpF4W_chevronOpen",
|
|
1364
1348
|
"commitLabel": "PVpF4W_commitLabel",
|
|
1365
|
-
"
|
|
1349
|
+
"reviewRow": "PVpF4W_reviewRow",
|
|
1350
|
+
"diffContent": "PVpF4W_diffContent",
|
|
1351
|
+
"codeViewWrapper": "PVpF4W_codeViewWrapper",
|
|
1352
|
+
"error": "PVpF4W_error",
|
|
1353
|
+
"reviewItem": "PVpF4W_reviewItem",
|
|
1366
1354
|
"reviewBranchCopy": "PVpF4W_reviewBranchCopy",
|
|
1367
|
-
"
|
|
1368
|
-
"
|
|
1369
|
-
"
|
|
1370
|
-
"
|
|
1371
|
-
"
|
|
1355
|
+
"header": "PVpF4W_header",
|
|
1356
|
+
"reviewCopyFeedback": "PVpF4W_reviewCopyFeedback",
|
|
1357
|
+
"commentText": "PVpF4W_commentText",
|
|
1358
|
+
"directory": "PVpF4W_directory",
|
|
1359
|
+
"fileAction": "PVpF4W_fileAction",
|
|
1360
|
+
"commentHeader": "PVpF4W_commentHeader",
|
|
1361
|
+
"reviewDescription": "PVpF4W_reviewDescription",
|
|
1362
|
+
"baselinePicker": "PVpF4W_baselinePicker",
|
|
1363
|
+
"comment": "PVpF4W_comment",
|
|
1364
|
+
"git-diff": "PVpF4W_git-diff",
|
|
1365
|
+
"visuallyHidden": "PVpF4W_visuallyHidden",
|
|
1366
|
+
"reviewPreview": "PVpF4W_reviewPreview",
|
|
1367
|
+
"scopeSelector": "PVpF4W_scopeSelector",
|
|
1372
1368
|
"disclosureOpen": "PVpF4W_disclosureOpen",
|
|
1373
|
-
"
|
|
1374
|
-
"
|
|
1369
|
+
"root": "PVpF4W_root",
|
|
1370
|
+
"floatingQuote": "PVpF4W_floatingQuote",
|
|
1371
|
+
"fileEntry": "PVpF4W_fileEntry",
|
|
1372
|
+
"reviewCardList": "PVpF4W_reviewCardList",
|
|
1375
1373
|
"floatingQuoteButton": "PVpF4W_floatingQuoteButton",
|
|
1374
|
+
"row": "PVpF4W_row",
|
|
1375
|
+
"reviewDrawer": "PVpF4W_reviewDrawer",
|
|
1376
|
+
"fileToolbar": "PVpF4W_fileToolbar",
|
|
1376
1377
|
"reviewBar": "PVpF4W_reviewBar",
|
|
1377
|
-
"
|
|
1378
|
-
"
|
|
1379
|
-
"icon": "PVpF4W_icon"
|
|
1378
|
+
"commentActions": "PVpF4W_commentActions",
|
|
1379
|
+
"reviewDock": "PVpF4W_reviewDock"
|
|
1380
1380
|
};
|
|
1381
1381
|
// ../util-review-ui/src/client/useSelectionQuote.ts
|
|
1382
1382
|
/**
|
package/dist/host.js
CHANGED
|
@@ -1,16 +1,58 @@
|
|
|
1
1
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
2
2
|
import { workspaceTitleOf } from "@deepseek-ai/dsh-util-workspace-path";
|
|
3
|
-
import {
|
|
3
|
+
import { z } from "zod";
|
|
4
4
|
import assert from "node:assert/strict";
|
|
5
5
|
import { lstat, readFile, readlink, realpath, stat } from "node:fs/promises";
|
|
6
6
|
import { dirname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
7
7
|
import { SessionId } from "@deepseek-ai/dsh-session/types";
|
|
8
8
|
import { Remote, TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
|
|
9
|
-
import { z } from "zod";
|
|
10
9
|
import { execFile } from "node:child_process";
|
|
11
10
|
import { createHash } from "node:crypto";
|
|
12
11
|
import { promisify } from "node:util";
|
|
13
|
-
|
|
12
|
+
// ../util-review-ui/src/review.ts
|
|
13
|
+
const commit = z.string().regex(/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/);
|
|
14
|
+
const commitRecord = z.object({
|
|
15
|
+
sha: commit,
|
|
16
|
+
subject: z.string(),
|
|
17
|
+
author: z.string(),
|
|
18
|
+
date: z.string()
|
|
19
|
+
});
|
|
20
|
+
const reviewTargetSchema = z.object({
|
|
21
|
+
repository: z.string().default(""),
|
|
22
|
+
branch: z.string().min(1),
|
|
23
|
+
commit: z.string().min(1).optional()
|
|
24
|
+
});
|
|
25
|
+
/** Wire name of the presentation tool whose calls publish a review card. */
|
|
26
|
+
const GIT_REVIEW_TOOL = "git_review_present";
|
|
27
|
+
z.object({
|
|
28
|
+
kind: z.literal("branch"),
|
|
29
|
+
repository: z.string().min(1),
|
|
30
|
+
ref: z.string().min(1),
|
|
31
|
+
base: z.discriminatedUnion("kind", [z.object({ kind: z.literal("automatic") }), z.object({
|
|
32
|
+
kind: z.literal("manual"),
|
|
33
|
+
ref: z.string().min(1)
|
|
34
|
+
})]),
|
|
35
|
+
revision: z.discriminatedUnion("kind", [z.object({ kind: z.literal("all-commits") }), z.object({
|
|
36
|
+
kind: z.literal("commit"),
|
|
37
|
+
commit: commitRecord
|
|
38
|
+
})])
|
|
39
|
+
});
|
|
40
|
+
function branchLabel(ref) {
|
|
41
|
+
return ref.startsWith("refs/heads/") ? ref.slice(11) : ref;
|
|
42
|
+
}
|
|
43
|
+
function shortSha(sha) {
|
|
44
|
+
return sha.slice(0, 7);
|
|
45
|
+
}
|
|
46
|
+
const snapshotSchema = z.object({
|
|
47
|
+
kind: z.enum([
|
|
48
|
+
"revision",
|
|
49
|
+
"staged",
|
|
50
|
+
"unstaged"
|
|
51
|
+
]),
|
|
52
|
+
repository: z.string().min(1),
|
|
53
|
+
before: commit.nullable(),
|
|
54
|
+
after: commit
|
|
55
|
+
});
|
|
14
56
|
// src/review-tool.ts
|
|
15
57
|
/**
|
|
16
58
|
* Build the presentation tool for Git reviews.
|
|
@@ -238,7 +280,7 @@ async function readRepository(cwd, signal) {
|
|
|
238
280
|
cwd,
|
|
239
281
|
target,
|
|
240
282
|
baselines,
|
|
241
|
-
branches: entries.filter((item) => item.ref.startsWith("refs/heads/") && item.symbolic === "" && Date.now() - item.modifiedAt <=
|
|
283
|
+
branches: entries.filter((item) => item.ref.startsWith("refs/heads/") && item.symbolic === "" && Date.now() - item.modifiedAt <= 6048e5 && (butler.kind !== "ready" || ![
|
|
242
284
|
"refs/heads/gitbutler/workspace",
|
|
243
285
|
"refs/heads/gitbutler/target",
|
|
244
286
|
"refs/heads/main"
|
|
@@ -352,13 +394,13 @@ async function listCommits(cwd, branch, base, offset, signal) {
|
|
|
352
394
|
if (butler.kind === "ready") {
|
|
353
395
|
const owned = butler.stacks.flatMap((stack) => stack.branches).find((item) => item.name === name);
|
|
354
396
|
if (owned !== void 0) return {
|
|
355
|
-
commits: owned.commits.slice(offset, offset +
|
|
397
|
+
commits: owned.commits.slice(offset, offset + 50).map((commit) => ({
|
|
356
398
|
sha: commit.commitId,
|
|
357
399
|
subject: commit.message.split("\n")[0],
|
|
358
400
|
author: commit.authorName,
|
|
359
401
|
date: commit.createdAt
|
|
360
402
|
})),
|
|
361
|
-
hasMore: owned.commits.length > offset +
|
|
403
|
+
hasMore: owned.commits.length > offset + 50
|
|
362
404
|
};
|
|
363
405
|
}
|
|
364
406
|
const [sha, baseline] = await Promise.all([resolveCommit(cwd, branch, signal), resolveCommit(cwd, base, signal)]);
|
|
@@ -366,13 +408,13 @@ async function listCommits(cwd, branch, base, offset, signal) {
|
|
|
366
408
|
"log",
|
|
367
409
|
`--format=${commitFormat}`,
|
|
368
410
|
`--skip=${offset}`,
|
|
369
|
-
`--max-count
|
|
411
|
+
`--max-count=51`,
|
|
370
412
|
`${baseline}..${sha}`,
|
|
371
413
|
"--"
|
|
372
414
|
], signal)).trimEnd().split("\n").filter(Boolean);
|
|
373
415
|
return {
|
|
374
|
-
commits: entries.slice(0,
|
|
375
|
-
hasMore: entries.length >
|
|
416
|
+
commits: entries.slice(0, 50).map(parseCommitRecord),
|
|
417
|
+
hasMore: entries.length > 50
|
|
376
418
|
};
|
|
377
419
|
}
|
|
378
420
|
function revisionArgs(snapshot) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lukstei/dsh-client-review-git",
|
|
3
|
-
"version": "0.2.2-rc.5.
|
|
3
|
+
"version": "0.2.2-rc.5.7",
|
|
4
4
|
"description": "Git diff and GitButler change view client plugin for DeepSeek Harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/host.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@lukstei/util-review-ui": "0.2.2-rc.5.
|
|
62
|
+
"@lukstei/util-review-ui": "0.2.2-rc.5.7",
|
|
63
63
|
"zod": "4.6.6"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@deepseek-ai/dsh-util-workspace-path": "0.2.2-rc.5",
|
|
91
91
|
"@deepseek-ai/dsh-working-directory": "0.2.2-rc.5",
|
|
92
92
|
"@ladle/react": "^5.1.1",
|
|
93
|
-
"@lukstei/dsh-client-split-view": "0.2.2-rc.5.
|
|
93
|
+
"@lukstei/dsh-client-split-view": "0.2.2-rc.5.7",
|
|
94
94
|
"@types/node": "^26.0.0",
|
|
95
95
|
"@types/react": "^19.3.0",
|
|
96
96
|
"@types/react-dom": "^19.3.0",
|