@dungsil/dsh-plugin-ui-vcs 0.4.2 → 0.4.3
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 +24 -11
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -13293,8 +13293,8 @@ const styles = `
|
|
|
13293
13293
|
.dsh-pr-loading svg{width:100%;height:100%;animation:dsh-pr-spin .8s linear infinite}
|
|
13294
13294
|
.dsh-pr-initial-loading{display:flex;justify-content:center;padding:24px 16px}
|
|
13295
13295
|
.dsh-vcs-check-status{display:inline-flex;flex:none;width:14px;height:14px;align-items:center;justify-content:center;vertical-align:middle;color:var(--dsw-alias-label-tertiary)}
|
|
13296
|
-
.dsh-vcs-check-status>span{display:
|
|
13297
|
-
.dsh-vcs-check-status svg{width:100%;height:100
|
|
13296
|
+
.dsh-vcs-check-status>span{display:inline-flex;width:100%;height:100%;align-items:center;justify-content:center}
|
|
13297
|
+
.dsh-vcs-check-status svg{display:block;flex:none;width:100%;height:100%;transform-origin:center}
|
|
13298
13298
|
.dsh-vcs-check-status[data-state=done]{color:var(--dsw-alias-state-success-primary)}
|
|
13299
13299
|
.dsh-vcs-check-status[data-state=error]{color:var(--dsw-alias-state-error-primary)}
|
|
13300
13300
|
.dsh-vcs-check-status:is([data-state=ongoing],[data-state=warning]){color:var(--dsw-alias-state-warn-primary)}
|
|
@@ -13468,7 +13468,7 @@ function CheckStatusIcon({ state }) {
|
|
|
13468
13468
|
className: "dsh-vcs-check-status",
|
|
13469
13469
|
"data-state": state,
|
|
13470
13470
|
"aria-hidden": "true",
|
|
13471
|
-
children: state === "done" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCheckCircleOutlineRegular, {}) : state === "ongoing" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconLoadingOutlineRegular, {}) : state === "warning" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconQuestionOutlineRegular, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { dangerouslySetInnerHTML: { __html: state === "error" ? circle_x_default : circle_minus_default } })
|
|
13471
|
+
children: state === "done" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCheckCircleOutlineRegular, { size: 14 }) : state === "ongoing" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconLoadingOutlineRegular, { size: 14 }) : state === "warning" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconQuestionOutlineRegular, { size: 14 }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { dangerouslySetInnerHTML: { __html: state === "error" ? circle_x_default : circle_minus_default } })
|
|
13472
13472
|
});
|
|
13473
13473
|
}
|
|
13474
13474
|
function Loading({ label }) {
|
|
@@ -13508,6 +13508,12 @@ function apply$2(ctx) {
|
|
|
13508
13508
|
const sessions = ctx.get("sessions");
|
|
13509
13509
|
const views = /* @__PURE__ */ new Map();
|
|
13510
13510
|
ctx.effect(() => () => views.clear());
|
|
13511
|
+
ctx.effect(() => {
|
|
13512
|
+
const style = document.createElement("style");
|
|
13513
|
+
style.textContent = styles;
|
|
13514
|
+
document.head.append(style);
|
|
13515
|
+
return () => style.remove();
|
|
13516
|
+
}, "ui-vcs: pull request styles");
|
|
13511
13517
|
const subscribe = (listener) => ctx.locale.subscribe(listener);
|
|
13512
13518
|
const text = () => {
|
|
13513
13519
|
const language = ctx.locale.getSnapshot().active;
|
|
@@ -13853,7 +13859,6 @@ function apply$2(ctx) {
|
|
|
13853
13859
|
className: "dsh-pr-panel",
|
|
13854
13860
|
"aria-label": copy.title,
|
|
13855
13861
|
children: [
|
|
13856
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", { children: styles }),
|
|
13857
13862
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: view ? providerNames[view.provider] : copy.title }), view && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
13858
13863
|
className: "dsh-pr-repository",
|
|
13859
13864
|
title: view.repository,
|
|
@@ -14702,7 +14707,7 @@ function apply(ctx) {
|
|
|
14702
14707
|
mounted.current = false;
|
|
14703
14708
|
};
|
|
14704
14709
|
}, []);
|
|
14705
|
-
const disabled = !canPrompt || unavailable || sending || typeof cwd !== "string";
|
|
14710
|
+
const disabled = !canPrompt || unavailable || sending || typeof cwd !== "string" || lookup !== "ready";
|
|
14706
14711
|
const viewOnly = hasRequest && !needsUpdate;
|
|
14707
14712
|
const ciState = ciRequest ? checksState(ciRequest) : "warning";
|
|
14708
14713
|
const ciLabel = {
|
|
@@ -14712,6 +14717,13 @@ function apply(ctx) {
|
|
|
14712
14717
|
ongoing: labels.pending_check,
|
|
14713
14718
|
idle: labels.checks_complete
|
|
14714
14719
|
}[ciState];
|
|
14720
|
+
(0, react.useEffect)(() => {
|
|
14721
|
+
setLookup("loading");
|
|
14722
|
+
setOperation(void 0);
|
|
14723
|
+
setHasRequest(false);
|
|
14724
|
+
setCiRequest(null);
|
|
14725
|
+
setNeedsUpdate(false);
|
|
14726
|
+
}, [sessionId, cwd]);
|
|
14715
14727
|
(0, react.useEffect)(() => {
|
|
14716
14728
|
if (!hasChanges || hidden || unavailable) return;
|
|
14717
14729
|
let controller;
|
|
@@ -14720,17 +14732,12 @@ function apply(ctx) {
|
|
|
14720
14732
|
controller = new AbortController();
|
|
14721
14733
|
const signal = controller.signal;
|
|
14722
14734
|
setLookup("loading");
|
|
14723
|
-
setOperation(void 0);
|
|
14724
|
-
setHasRequest(false);
|
|
14725
|
-
setCiRequest(null);
|
|
14726
|
-
setNeedsUpdate(false);
|
|
14727
14735
|
try {
|
|
14728
14736
|
const result = await connection.rpc.call(channel, describeMethod, { sessionId }, signal);
|
|
14729
14737
|
if (signal.aborted) return;
|
|
14730
14738
|
if (!result.ok) throw new Error("Git context unavailable");
|
|
14731
14739
|
const context = result.value;
|
|
14732
14740
|
if (context.operation !== "push" && context.operation !== "pr") throw new Error("Git context unavailable");
|
|
14733
|
-
setOperation(context.operation);
|
|
14734
14741
|
if (context.operation === "pr") try {
|
|
14735
14742
|
const requests = await connection.rpc.call(channel, method, { sessionId }, signal);
|
|
14736
14743
|
if (signal.aborted) return;
|
|
@@ -14743,6 +14750,12 @@ function apply(ctx) {
|
|
|
14743
14750
|
} catch {
|
|
14744
14751
|
if (signal.aborted) return;
|
|
14745
14752
|
}
|
|
14753
|
+
else {
|
|
14754
|
+
setHasRequest(false);
|
|
14755
|
+
setCiRequest(null);
|
|
14756
|
+
setNeedsUpdate(false);
|
|
14757
|
+
}
|
|
14758
|
+
setOperation(context.operation);
|
|
14746
14759
|
setLookup("ready");
|
|
14747
14760
|
} catch {
|
|
14748
14761
|
if (!signal.aborted) setLookup("error");
|
|
@@ -14806,7 +14819,7 @@ function apply(ctx) {
|
|
|
14806
14819
|
if (mounted.current) setSending(false);
|
|
14807
14820
|
}
|
|
14808
14821
|
};
|
|
14809
|
-
if (hidden || !hasChanges || lookup
|
|
14822
|
+
if (hidden || !hasChanges || !operation || lookup === "error" && !hasRequest) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
14810
14823
|
ref: anchor,
|
|
14811
14824
|
hidden: true
|
|
14812
14825
|
});
|