dsh-plugin-github-issues 0.8.0 → 0.8.1

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.
Files changed (2) hide show
  1. package/lib/client.js +19 -3
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -5359,6 +5359,8 @@ function PendingOverlayHost({ store, t, sessionId, useInput, inputActions }) {
5359
5359
  const [pending, setPending] = (0, import_react5.useState)(void 0);
5360
5360
  const sending = (0, import_react5.useRef)(false);
5361
5361
  const stagedFor = (0, import_react5.useRef)(void 0);
5362
+ const repairedFor = (0, import_react5.useRef)(void 0);
5363
+ const sawSentinel = (0, import_react5.useRef)(false);
5362
5364
  const input = useInput === void 0 ? void 0 : useInput((state) => state);
5363
5365
  const latestInput = (0, import_react5.useRef)(input);
5364
5366
  latestInput.current = input;
@@ -5384,8 +5386,19 @@ function PendingOverlayHost({ store, t, sessionId, useInput, inputActions }) {
5384
5386
  }
5385
5387
  }, [card, draft, inputActions, pending?.id, sessionId, snapshot.pendingHandoffSession]);
5386
5388
  (0, import_react5.useEffect)(() => {
5387
- if (pending === void 0) return;
5388
- if (!draft.includes(PENDING_DRAFT_SENTINEL)) setPending(void 0);
5389
+ if (draft.includes(PENDING_DRAFT_SENTINEL)) {
5390
+ sawSentinel.current = true;
5391
+ return;
5392
+ }
5393
+ if (pending === void 0 || inputActions === void 0 || sending.current) return;
5394
+ if (draft === "") return;
5395
+ if (repairedFor.current === draft) return;
5396
+ repairedFor.current = draft;
5397
+ inputActions.setDraft(`${PENDING_DRAFT_SENTINEL}${draft}`);
5398
+ }, [draft, inputActions, pending]);
5399
+ (0, import_react5.useEffect)(() => {
5400
+ if (pending === void 0 || draft !== "" || !sawSentinel.current || sending.current) return;
5401
+ setPending(void 0);
5389
5402
  }, [draft, pending]);
5390
5403
  (0, import_react5.useEffect)(() => {
5391
5404
  if (pending === void 0) return;
@@ -6543,7 +6556,10 @@ var GitHubStore = class {
6543
6556
  try {
6544
6557
  const sessionId = await uiWorkspace.connectWorkspace(workspaceId);
6545
6558
  this.update({ pendingHandoff: card, pendingHandoffSession: sessionId });
6546
- uiWorkspace.startSession(workspaceId, { whenDraftExists: "replace" });
6559
+ uiWorkspace.startSession(workspaceId, {
6560
+ prompt: PENDING_DRAFT_SENTINEL,
6561
+ whenDraftExists: "replace"
6562
+ });
6547
6563
  } catch (error) {
6548
6564
  this.update({ error: asPanelError(error) });
6549
6565
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-github-issues",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Browse GitHub issues, milestones, labels, priority, and linked PR status inside DeepSeek Harness, and hand an issue to the agent by dragging it into the composer.",
5
5
  "keywords": [
6
6
  "dsh-plugin",