dsh-plugin-github-issues 0.0.0-stage → 0.4.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/LICENSE +21 -0
- package/README.md +147 -2
- package/cordis.patch.yml +20 -0
- package/docs/README.zh.md +134 -0
- package/icon.svg +9 -0
- package/lib/client.js +3243 -0
- package/lib/controller.js +289 -0
- package/lib/controller.js.map +1 -0
- package/lib/github/auth.js +249 -0
- package/lib/github/auth.js.map +1 -0
- package/lib/github/client.js +767 -0
- package/lib/github/client.js.map +1 -0
- package/lib/github/queries.js +479 -0
- package/lib/github/queries.js.map +1 -0
- package/lib/github/state.js +186 -0
- package/lib/github/state.js.map +1 -0
- package/lib/github/types.js +29 -0
- package/lib/github/types.js.map +1 -0
- package/lib/github/vm.js +362 -0
- package/lib/github/vm.js.map +1 -0
- package/lib/index.js +65 -0
- package/lib/index.js.map +1 -0
- package/lib/prompt.js +87 -0
- package/lib/prompt.js.map +1 -0
- package/lib/remote-methods.js +32 -0
- package/lib/remote-methods.js.map +1 -0
- package/lib/types/controller.d.ts +105 -0
- package/lib/types/controller.d.ts.map +1 -0
- package/lib/types/github/auth.d.ts +52 -0
- package/lib/types/github/auth.d.ts.map +1 -0
- package/lib/types/github/client.d.ts +40 -0
- package/lib/types/github/client.d.ts.map +1 -0
- package/lib/types/github/queries.d.ts +172 -0
- package/lib/types/github/queries.d.ts.map +1 -0
- package/lib/types/github/state.d.ts +51 -0
- package/lib/types/github/state.d.ts.map +1 -0
- package/lib/types/github/types.d.ts +79 -0
- package/lib/types/github/types.d.ts.map +1 -0
- package/lib/types/github/vm.d.ts +260 -0
- package/lib/types/github/vm.d.ts.map +1 -0
- package/lib/types/index.d.ts +46 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/prompt.d.ts +30 -0
- package/lib/types/prompt.d.ts.map +1 -0
- package/lib/types/remote-methods.d.ts +32 -0
- package/lib/types/remote-methods.d.ts.map +1 -0
- package/lib/types/vm.d.ts +264 -0
- package/lib/types/vm.d.ts.map +1 -0
- package/lib/types/workspace.d.ts +43 -0
- package/lib/types/workspace.d.ts.map +1 -0
- package/lib/vm.js +42 -0
- package/lib/vm.js.map +1 -0
- package/lib/workspace.js +57 -0
- package/lib/workspace.js.map +1 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +97 -4
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared view-model types for both halves of the plugin.
|
|
3
|
+
*
|
|
4
|
+
* The Host assembles these from GitHub's GraphQL responses; the browser renders
|
|
5
|
+
* them without knowing anything about GraphQL. Keeping them in one module is what
|
|
6
|
+
* lets the two halves be built and tested separately.
|
|
7
|
+
*
|
|
8
|
+
* @module dsh-plugin-github-issues/vm
|
|
9
|
+
*/
|
|
10
|
+
/** One issue's state as GitHub reports it. */
|
|
11
|
+
export type IssueState = 'OPEN' | 'CLOSED';
|
|
12
|
+
/** Why an issue is closed; `null` while open. */
|
|
13
|
+
export type StateReason = 'COMPLETED' | 'NOT_PLANNED' | 'DUPLICATE' | 'REOPENED' | null;
|
|
14
|
+
/** Where a rendered priority came from, so the UI can say why it shows that value. */
|
|
15
|
+
export type PrioritySource = 'project' | 'issue-field' | 'label';
|
|
16
|
+
/** Rolled-up check state of a linked pull request. */
|
|
17
|
+
export type CheckState = 'SUCCESS' | 'FAILURE' | 'ERROR' | 'PENDING' | 'EXPECTED' | 'NEUTRAL' | 'SKIPPED' | null;
|
|
18
|
+
/** Review decision of a linked pull request; `null` when reviews are not required. */
|
|
19
|
+
export type ReviewDecision = 'APPROVED' | 'CHANGES_REQUESTED' | 'REVIEW_REQUIRED' | null;
|
|
20
|
+
/** State of a pull request as GitHub reports it. */
|
|
21
|
+
export type PullRequestState = 'OPEN' | 'CLOSED' | 'MERGED';
|
|
22
|
+
/** One label with GitHub's bare hex color (no leading `#`). */
|
|
23
|
+
export interface LabelVM {
|
|
24
|
+
name: string;
|
|
25
|
+
color: string;
|
|
26
|
+
}
|
|
27
|
+
/** One assignee. */
|
|
28
|
+
export interface AssigneeVM {
|
|
29
|
+
login: string;
|
|
30
|
+
avatarUrl?: string;
|
|
31
|
+
}
|
|
32
|
+
/** One milestone with its completion percentage. */
|
|
33
|
+
export interface MilestoneVM {
|
|
34
|
+
title: string;
|
|
35
|
+
dueOn: string | null;
|
|
36
|
+
state: 'OPEN' | 'CLOSED';
|
|
37
|
+
progress: number | null;
|
|
38
|
+
}
|
|
39
|
+
/** GitHub's issue type (org-defined, may be absent). */
|
|
40
|
+
export interface IssueTypeVM {
|
|
41
|
+
name: string;
|
|
42
|
+
color?: string;
|
|
43
|
+
}
|
|
44
|
+
/** The rendered priority and its source. */
|
|
45
|
+
export interface PriorityVM {
|
|
46
|
+
source: PrioritySource;
|
|
47
|
+
name: string;
|
|
48
|
+
color?: string;
|
|
49
|
+
}
|
|
50
|
+
/** One Projects v2 single-select field value (Status and friends). */
|
|
51
|
+
export interface ProjectFieldValueVM {
|
|
52
|
+
name: string;
|
|
53
|
+
color?: string;
|
|
54
|
+
}
|
|
55
|
+
/** One pull request linked to an issue. */
|
|
56
|
+
export interface LinkedPRVM {
|
|
57
|
+
number: number;
|
|
58
|
+
title: string;
|
|
59
|
+
url: string;
|
|
60
|
+
state: PullRequestState;
|
|
61
|
+
isDraft: boolean;
|
|
62
|
+
merged: boolean;
|
|
63
|
+
reviewDecision: ReviewDecision;
|
|
64
|
+
checks: CheckState;
|
|
65
|
+
failingChecks?: string[];
|
|
66
|
+
author?: string;
|
|
67
|
+
}
|
|
68
|
+
/** One issue as a list row renders it. */
|
|
69
|
+
export interface IssueCardVM {
|
|
70
|
+
/** GitHub node id, used as a stable React key and for merge/dedupe. */
|
|
71
|
+
id: string;
|
|
72
|
+
/** `owner/name`. */
|
|
73
|
+
repo: string;
|
|
74
|
+
number: number;
|
|
75
|
+
title: string;
|
|
76
|
+
url: string;
|
|
77
|
+
state: IssueState;
|
|
78
|
+
stateReason: StateReason;
|
|
79
|
+
isPrivate: boolean;
|
|
80
|
+
issueType?: IssueTypeVM;
|
|
81
|
+
labels: LabelVM[];
|
|
82
|
+
milestone?: MilestoneVM;
|
|
83
|
+
assignees: AssigneeVM[];
|
|
84
|
+
/** ISO 8601. */
|
|
85
|
+
updatedAt: string;
|
|
86
|
+
commentCount: number;
|
|
87
|
+
bodyExcerpt?: string;
|
|
88
|
+
priority?: PriorityVM;
|
|
89
|
+
/** PRs closed by this issue (best effort, cheap nested connection). */
|
|
90
|
+
linkedPRs: LinkedPRVM[];
|
|
91
|
+
/** Projects v2 Status value, when the card came from a project view. */
|
|
92
|
+
projectStatus?: ProjectFieldValueVM;
|
|
93
|
+
/** Sessions this issue has been handed to (newest last). */
|
|
94
|
+
sessionLinks?: IssueSessionLinkVM[];
|
|
95
|
+
}
|
|
96
|
+
/** The fast part of an issue detail: the body only. */
|
|
97
|
+
export interface IssueBodyVM {
|
|
98
|
+
body: string;
|
|
99
|
+
}
|
|
100
|
+
/** One issue's full detail. */
|
|
101
|
+
export interface IssueDetailVM extends IssueCardVM {
|
|
102
|
+
body: string;
|
|
103
|
+
/** PRs that mention this issue without closing it (`timelineItems` cross-references). */
|
|
104
|
+
mentionedPRs: LinkedPRVM[];
|
|
105
|
+
}
|
|
106
|
+
/** One Session this issue has been handed to. */
|
|
107
|
+
export interface IssueSessionLinkVM {
|
|
108
|
+
sessionId: string;
|
|
109
|
+
/** Milliseconds since epoch when the handoff was recorded. */
|
|
110
|
+
at: number;
|
|
111
|
+
}
|
|
112
|
+
/** One persisted issue → session link. */
|
|
113
|
+
export interface IssueLinkRecord {
|
|
114
|
+
repo: string;
|
|
115
|
+
number: number;
|
|
116
|
+
sessionId: string;
|
|
117
|
+
at: number;
|
|
118
|
+
}
|
|
119
|
+
/** One page of the list. */
|
|
120
|
+
export interface IssueListPage {
|
|
121
|
+
items: IssueCardVM[];
|
|
122
|
+
totalCount?: number;
|
|
123
|
+
pageInfo: {
|
|
124
|
+
hasNextPage: boolean;
|
|
125
|
+
endCursor: string | null;
|
|
126
|
+
};
|
|
127
|
+
rateLimit?: {
|
|
128
|
+
cost?: number;
|
|
129
|
+
remaining?: number;
|
|
130
|
+
};
|
|
131
|
+
/** A non-fatal note, e.g. Projects v2 unavailable because of a missing scope. */
|
|
132
|
+
notice?: string;
|
|
133
|
+
}
|
|
134
|
+
/** The list views the panel offers. */
|
|
135
|
+
export type ListView = 'assigned' | 'created' | 'open' | 'repo' | 'project';
|
|
136
|
+
/**
|
|
137
|
+
* One list request from the browser.
|
|
138
|
+
*
|
|
139
|
+
* The scope is a cascade, not a view enum: an organization narrows the search to
|
|
140
|
+
* `org:<login>`, a project switches to Projects v2 items, and a repository adds a
|
|
141
|
+
* `repo:` qualifier (or filters the project's items by content repository). Any
|
|
142
|
+
* combination is legal; an empty scope means "everything the token can read".
|
|
143
|
+
*/
|
|
144
|
+
export interface IssueListRequest {
|
|
145
|
+
/** Legacy single-purpose view; the cascade UI sends the fields below instead. */
|
|
146
|
+
view?: ListView;
|
|
147
|
+
/** Organization scope (`org:<login>` in search, owner for project/repo lookups). */
|
|
148
|
+
org?: string;
|
|
149
|
+
/** Repository scope: `owner/name` values. */
|
|
150
|
+
repos?: string[];
|
|
151
|
+
/** Projects v2 node id. */
|
|
152
|
+
projectId?: string;
|
|
153
|
+
/** Assignee qualifier: `@me`, `all` (no qualifier), or a GitHub login. */
|
|
154
|
+
assignee?: string;
|
|
155
|
+
/** Author qualifier (legacy "created by me"). */
|
|
156
|
+
author?: string;
|
|
157
|
+
/** Open/closed/all filter. */
|
|
158
|
+
state?: 'open' | 'closed' | 'all';
|
|
159
|
+
first?: number;
|
|
160
|
+
after?: string | null;
|
|
161
|
+
}
|
|
162
|
+
/** One organization (or the viewer's personal account) in the scope picker. */
|
|
163
|
+
export interface OrgRefVM {
|
|
164
|
+
login: string;
|
|
165
|
+
/** Display name, when GitHub reports one. */
|
|
166
|
+
name?: string;
|
|
167
|
+
}
|
|
168
|
+
/** One repository in the scope picker. */
|
|
169
|
+
export interface RepoRefVM {
|
|
170
|
+
nameWithOwner: string;
|
|
171
|
+
isPrivate: boolean;
|
|
172
|
+
pushedAt?: string;
|
|
173
|
+
/** Whether this repository is a fork (kept in the list, marked in the UI). */
|
|
174
|
+
isFork?: boolean;
|
|
175
|
+
}
|
|
176
|
+
/** One page of a repository listing. */
|
|
177
|
+
export interface RepoPageVM {
|
|
178
|
+
items: RepoRefVM[];
|
|
179
|
+
totalCount: number;
|
|
180
|
+
hasNextPage: boolean;
|
|
181
|
+
endCursor: string | null;
|
|
182
|
+
}
|
|
183
|
+
/** One Projects v2 project in the scope picker. */
|
|
184
|
+
export interface ProjectRefVM {
|
|
185
|
+
id: string;
|
|
186
|
+
number: number;
|
|
187
|
+
title: string;
|
|
188
|
+
url: string;
|
|
189
|
+
owner: string;
|
|
190
|
+
}
|
|
191
|
+
/** Everything the scope pickers need. */
|
|
192
|
+
export interface ScopeCatalog {
|
|
193
|
+
viewer: {
|
|
194
|
+
login: string;
|
|
195
|
+
avatarUrl?: string;
|
|
196
|
+
} | null;
|
|
197
|
+
/** Organizations the token can see, including private memberships. */
|
|
198
|
+
orgs: OrgRefVM[];
|
|
199
|
+
/** The viewer's repositories (forks included); org repositories load on demand. */
|
|
200
|
+
repos: RepoRefVM[];
|
|
201
|
+
/** True when projects could not be read because the token lacks `read:project`. */
|
|
202
|
+
projectsBlocked: boolean;
|
|
203
|
+
projectsError?: string;
|
|
204
|
+
}
|
|
205
|
+
/** What the settings page renders about auth. */
|
|
206
|
+
export interface GitHubStatus {
|
|
207
|
+
mode: 'gh';
|
|
208
|
+
ghInstalled: boolean;
|
|
209
|
+
ghPath?: string;
|
|
210
|
+
signedIn: boolean;
|
|
211
|
+
login?: string;
|
|
212
|
+
host: string;
|
|
213
|
+
tokenSource?: string;
|
|
214
|
+
scopes: string[];
|
|
215
|
+
missingProjectScope: boolean;
|
|
216
|
+
config: {
|
|
217
|
+
authMode: string;
|
|
218
|
+
host: string;
|
|
219
|
+
handoffMode: string;
|
|
220
|
+
pollSeconds: number;
|
|
221
|
+
};
|
|
222
|
+
error?: string;
|
|
223
|
+
}
|
|
224
|
+
/** Preferences owned by the Host (persisted in the plugin's state file). */
|
|
225
|
+
export interface Prefs {
|
|
226
|
+
/** Legacy view key, migrated to the cascade fields on load. */
|
|
227
|
+
view?: ListView | undefined;
|
|
228
|
+
/** Selected organization (`undefined` means all organizations). */
|
|
229
|
+
org?: string | undefined;
|
|
230
|
+
/** Selected Projects v2 node id. */
|
|
231
|
+
projectId?: string | undefined;
|
|
232
|
+
/** Selected repository `owner/name` (filter within the org or the project). */
|
|
233
|
+
repo?: string | undefined;
|
|
234
|
+
/** Assignee filter: `@me`, `all`, or a GitHub login. */
|
|
235
|
+
assignee: string;
|
|
236
|
+
/** Issue state filter. */
|
|
237
|
+
state: 'open' | 'closed' | 'all';
|
|
238
|
+
/** What a handoff does by default: fill the draft, or send it. */
|
|
239
|
+
handoffMode: 'draft' | 'send';
|
|
240
|
+
/** Template used to turn an issue into an agent prompt. */
|
|
241
|
+
promptTemplate: string;
|
|
242
|
+
/** The issue the composer dock shows. */
|
|
243
|
+
pinned?: {
|
|
244
|
+
repo: string;
|
|
245
|
+
number: number;
|
|
246
|
+
} | undefined;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* A preference patch as it crosses the Remote wire.
|
|
250
|
+
*
|
|
251
|
+
* `undefined` properties disappear in JSON, so "clear the selection" is sent as
|
|
252
|
+
* `null`; the Host validates it into `undefined`. Every clearing control must use
|
|
253
|
+
* `null`, never an undefined value.
|
|
254
|
+
*/
|
|
255
|
+
export type PrefsPatch = {
|
|
256
|
+
[K in keyof Prefs]?: Prefs[K] | null;
|
|
257
|
+
};
|
|
258
|
+
/** The prompt a handoff writes into the composer. */
|
|
259
|
+
export declare const DEFAULT_PROMPT_TEMPLATE: string;
|
|
260
|
+
/** Default preferences for a fresh install: everything assigned to me that is open. */
|
|
261
|
+
export declare const DEFAULT_PREFS: Prefs;
|
|
262
|
+
/** Build preferences from the deployment config and whatever was saved. */
|
|
263
|
+
export declare function mergePrefs(saved: Partial<Prefs> | undefined, configHandoffMode: string | undefined, configTemplate: string | undefined): Prefs;
|
|
264
|
+
//# sourceMappingURL=vm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vm.d.ts","sourceRoot":"","sources":["../../src/vm.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,8CAA8C;AAC9C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAA;AAE1C,iDAAiD;AACjD,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,IAAI,CAAA;AAEvF,sFAAsF;AACtF,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,aAAa,GAAG,OAAO,CAAA;AAEhE,sDAAsD;AACtD,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,SAAS,GACT,OAAO,GACP,SAAS,GACT,UAAU,GACV,SAAS,GACT,SAAS,GACT,IAAI,CAAA;AAER,sFAAsF;AACtF,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,IAAI,CAAA;AAExF,oDAAoD;AACpD,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE3D,+DAA+D;AAC/D,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd;AAED,oBAAoB;AACpB,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,oDAAoD;AACpD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAA;IACxB,QAAQ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ChB,0BAA0B;IAC1B,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAA;IAChC,kEAAkE;IAClE,WAAW,EAAE,OAAO,GAAG,MAAM,CAAA;IAC7B,2DAA2D;IAC3D,cAAc,EAAE,MAAM,CAAA;IACtB,yCAAyC;IACzC,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAA;CACtD;AAED;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG;KAAG,CAAC,IAAI,MAAM,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI;CAAE,CAAA;AAEjE,qDAAqD;AACrD,eAAO,MAAM,uBAAuB,QAOxB,CAAA;AAEZ,uFAAuF;AACvF,eAAO,MAAM,aAAa,EAAE,KAS3B,CAAA;AAED,2EAA2E;AAC3E,wBAAgB,UAAU,CACxB,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,SAAS,EACjC,iBAAiB,EAAE,MAAM,GAAG,SAAS,EACrC,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,KAAK,CAUP"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace resolution for a one-click handoff.
|
|
3
|
+
*
|
|
4
|
+
* A handoff from the GitHub panel opens a fresh Session so the issue gets its
|
|
5
|
+
* own context. The new Session needs a Workspace, with this priority:
|
|
6
|
+
*
|
|
7
|
+
* 1. the Workspace of the Session the handoff came from,
|
|
8
|
+
* 2. the Workspace of a Session already linked to the same repository,
|
|
9
|
+
* 3. a Workspace whose directory basename or title matches the repository name,
|
|
10
|
+
* 4. no choice at all — the Host's "current or most recent Workspace" default.
|
|
11
|
+
*
|
|
12
|
+
* Pure so the rules are unit-tested without a browser.
|
|
13
|
+
*
|
|
14
|
+
* @module dsh-plugin-github-issues/workspace
|
|
15
|
+
*/
|
|
16
|
+
/** One Workspace candidate, narrowed from the client's workspace catalog. */
|
|
17
|
+
export interface WorkspaceCandidate {
|
|
18
|
+
workspaceId: string;
|
|
19
|
+
/** Absolute directory path of the Workspace, when the catalog carries it. */
|
|
20
|
+
path?: string;
|
|
21
|
+
/** Display title of the Workspace (usually the directory basename). */
|
|
22
|
+
title?: string;
|
|
23
|
+
/** Sessions currently grouped under this Workspace. */
|
|
24
|
+
sessionIds: readonly string[];
|
|
25
|
+
}
|
|
26
|
+
/** The inputs of one resolution. */
|
|
27
|
+
export interface ResolveWorkspaceInput {
|
|
28
|
+
/** `owner/name` of the issue's repository. */
|
|
29
|
+
repo: string;
|
|
30
|
+
/** The Session the handoff was triggered from, when one is on screen. */
|
|
31
|
+
currentSessionId?: string;
|
|
32
|
+
/** Sessions already linked to this repository, newest first. */
|
|
33
|
+
linkedSessionIds?: readonly string[];
|
|
34
|
+
/** The Workspace catalog, in display order. */
|
|
35
|
+
workspaces: readonly WorkspaceCandidate[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Pick the Workspace for a handoff's new Session.
|
|
39
|
+
* @param input - repository, source Sessions, and the Workspace catalog.
|
|
40
|
+
* @returns the chosen Workspace id, or `undefined` to use the Host default.
|
|
41
|
+
*/
|
|
42
|
+
export declare function resolveHandoffWorkspace(input: ResolveWorkspaceInput): string | undefined;
|
|
43
|
+
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,6EAA6E;AAC7E,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAA;IACnB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,uDAAuD;IACvD,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;CAC9B;AAED,oCAAoC;AACpC,MAAM,WAAW,qBAAqB;IACpC,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gEAAgE;IAChE,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,+CAA+C;IAC/C,UAAU,EAAE,SAAS,kBAAkB,EAAE,CAAA;CAC1C;AASD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,qBAAqB,GAAG,MAAM,GAAG,SAAS,CA+BxF"}
|
package/lib/vm.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared view-model types for both halves of the plugin.
|
|
3
|
+
*
|
|
4
|
+
* The Host assembles these from GitHub's GraphQL responses; the browser renders
|
|
5
|
+
* them without knowing anything about GraphQL. Keeping them in one module is what
|
|
6
|
+
* lets the two halves be built and tested separately.
|
|
7
|
+
*
|
|
8
|
+
* @module dsh-plugin-github-issues/vm
|
|
9
|
+
*/
|
|
10
|
+
/** The prompt a handoff writes into the composer. */
|
|
11
|
+
export const DEFAULT_PROMPT_TEMPLATE = [
|
|
12
|
+
'处理 GitHub Issue:{{repo}}#{{number}} {{title}}',
|
|
13
|
+
'链接:{{url}}',
|
|
14
|
+
'状态:{{state}} | 里程碑:{{milestone}} | 优先级:{{priority}} | 指派:{{assignees}}',
|
|
15
|
+
'标签:{{labels}}',
|
|
16
|
+
'关联 PR:{{prs}}',
|
|
17
|
+
'要求:先读 Issue 正文与关联 PR,确认验收标准后再动手;用 subagent_codex 执行具体改动,完成后跑相关测试并回报。',
|
|
18
|
+
].join('\n');
|
|
19
|
+
/** Default preferences for a fresh install: everything assigned to me that is open. */
|
|
20
|
+
export const DEFAULT_PREFS = {
|
|
21
|
+
org: undefined,
|
|
22
|
+
projectId: undefined,
|
|
23
|
+
repo: undefined,
|
|
24
|
+
assignee: '@me',
|
|
25
|
+
state: 'open',
|
|
26
|
+
handoffMode: 'draft',
|
|
27
|
+
promptTemplate: DEFAULT_PROMPT_TEMPLATE,
|
|
28
|
+
pinned: undefined,
|
|
29
|
+
};
|
|
30
|
+
/** Build preferences from the deployment config and whatever was saved. */
|
|
31
|
+
export function mergePrefs(saved, configHandoffMode, configTemplate) {
|
|
32
|
+
const handoff = saved?.handoffMode
|
|
33
|
+
?? (configHandoffMode === 'send' ? 'send' : 'draft');
|
|
34
|
+
return {
|
|
35
|
+
...DEFAULT_PREFS,
|
|
36
|
+
...saved,
|
|
37
|
+
handoffMode: handoff,
|
|
38
|
+
promptTemplate: saved?.promptTemplate
|
|
39
|
+
?? (configTemplate === undefined || configTemplate === '' ? DEFAULT_PROMPT_TEMPLATE : configTemplate),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=vm.js.map
|
package/lib/vm.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vm.js","sourceRoot":"","sources":["../src/vm.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAiRH,qDAAqD;AACrD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,+CAA+C;IAC/C,YAAY;IACZ,wEAAwE;IACxE,eAAe;IACf,eAAe;IACf,sEAAsE;CACvE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAEZ,uFAAuF;AACvF,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,GAAG,EAAE,SAAS;IACd,SAAS,EAAE,SAAS;IACpB,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,OAAO;IACpB,cAAc,EAAE,uBAAuB;IACvC,MAAM,EAAE,SAAS;CAClB,CAAA;AAED,2EAA2E;AAC3E,MAAM,UAAU,UAAU,CACxB,KAAiC,EACjC,iBAAqC,EACrC,cAAkC;IAElC,MAAM,OAAO,GAAG,KAAK,EAAE,WAAW;WAC7B,CAAC,iBAAiB,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;IACtD,OAAO;QACL,GAAG,aAAa;QAChB,GAAG,KAAK;QACR,WAAW,EAAE,OAAO;QACpB,cAAc,EAAE,KAAK,EAAE,cAAc;eAChC,CAAC,cAAc,KAAK,SAAS,IAAI,cAAc,KAAK,EAAE,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,cAAc,CAAC;KACxG,CAAA;AACH,CAAC"}
|
package/lib/workspace.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace resolution for a one-click handoff.
|
|
3
|
+
*
|
|
4
|
+
* A handoff from the GitHub panel opens a fresh Session so the issue gets its
|
|
5
|
+
* own context. The new Session needs a Workspace, with this priority:
|
|
6
|
+
*
|
|
7
|
+
* 1. the Workspace of the Session the handoff came from,
|
|
8
|
+
* 2. the Workspace of a Session already linked to the same repository,
|
|
9
|
+
* 3. a Workspace whose directory basename or title matches the repository name,
|
|
10
|
+
* 4. no choice at all — the Host's "current or most recent Workspace" default.
|
|
11
|
+
*
|
|
12
|
+
* Pure so the rules are unit-tested without a browser.
|
|
13
|
+
*
|
|
14
|
+
* @module dsh-plugin-github-issues/workspace
|
|
15
|
+
*/
|
|
16
|
+
/** The last path segment, used for the directory-name rule. */
|
|
17
|
+
function basename(path) {
|
|
18
|
+
const trimmed = path.replace(/[/\\]+$/, '');
|
|
19
|
+
const index = Math.max(trimmed.lastIndexOf('/'), trimmed.lastIndexOf('\\'));
|
|
20
|
+
return (index === -1 ? trimmed : trimmed.slice(index + 1)).toLowerCase();
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Pick the Workspace for a handoff's new Session.
|
|
24
|
+
* @param input - repository, source Sessions, and the Workspace catalog.
|
|
25
|
+
* @returns the chosen Workspace id, or `undefined` to use the Host default.
|
|
26
|
+
*/
|
|
27
|
+
export function resolveHandoffWorkspace(input) {
|
|
28
|
+
const workspaces = input.workspaces;
|
|
29
|
+
if (workspaces.length === 0)
|
|
30
|
+
return undefined;
|
|
31
|
+
/** The first Workspace whose `sessionIds` contains one of the candidates. */
|
|
32
|
+
const bySession = (sessionIds) => {
|
|
33
|
+
for (const sessionId of sessionIds) {
|
|
34
|
+
const hit = workspaces.find(workspace => workspace.sessionIds.includes(sessionId));
|
|
35
|
+
if (hit !== undefined)
|
|
36
|
+
return hit.workspaceId;
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
};
|
|
40
|
+
if (input.currentSessionId !== undefined) {
|
|
41
|
+
const source = bySession([input.currentSessionId]);
|
|
42
|
+
if (source !== undefined)
|
|
43
|
+
return source;
|
|
44
|
+
}
|
|
45
|
+
if (input.linkedSessionIds !== undefined && input.linkedSessionIds.length !== 0) {
|
|
46
|
+
const linked = bySession(input.linkedSessionIds);
|
|
47
|
+
if (linked !== undefined)
|
|
48
|
+
return linked;
|
|
49
|
+
}
|
|
50
|
+
const repoName = basename(input.repo);
|
|
51
|
+
const directory = workspaces.find(workspace => ((workspace.path !== undefined && basename(workspace.path) === repoName)
|
|
52
|
+
|| (workspace.title !== undefined && workspace.title.toLowerCase() === repoName)));
|
|
53
|
+
if (directory !== undefined)
|
|
54
|
+
return directory.workspaceId;
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../src/workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAyBH,+DAA+D;AAC/D,SAAS,QAAQ,CAAC,IAAY;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAA;IAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,WAA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,CAAC,IAAI,CAAC,CAAA;IACrC,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAC7C,CAAC,SAAS,CAAC,IAAI,KAAK,SAAS,IAAI,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,QAAQ,CAAC;WACpE,CAAC,SAAS,CAAC,KAAK,KAAK,SAAS,IAAI,SAAS,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,QAAQ,CAAC,CACjF,CAAC,CAAA;IACF,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC,WAAW,CAAA;IAEzD,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,99 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-github-issues",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.4.7",
|
|
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
|
+
"keywords": [
|
|
6
|
+
"dsh-plugin",
|
|
7
|
+
"deepseek-harness",
|
|
8
|
+
"dsh",
|
|
9
|
+
"cordis",
|
|
10
|
+
"github",
|
|
11
|
+
"issues",
|
|
12
|
+
"milestones",
|
|
13
|
+
"projects"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Kanner",
|
|
18
|
+
"email": "kanner.chen@gmail.com"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/ckanner/dsh-plugin-github-issues#readme",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/ckanner/dsh-plugin-github-issues.git"
|
|
24
|
+
},
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/ckanner/dsh-plugin-github-issues/issues"
|
|
27
|
+
},
|
|
28
|
+
"type": "module",
|
|
29
|
+
"main": "lib/index.js",
|
|
30
|
+
"types": "lib/types/index.d.ts",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./lib/types/index.d.ts",
|
|
34
|
+
"default": "./lib/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./client": {
|
|
37
|
+
"default": "./lib/client.js"
|
|
38
|
+
},
|
|
39
|
+
"./locale/*.json": "./locale/*.json",
|
|
40
|
+
"./icon": "./icon.svg",
|
|
41
|
+
"./package.json": "./package.json"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"lib",
|
|
45
|
+
"cordis.patch.yml",
|
|
46
|
+
"locale",
|
|
47
|
+
"icon.svg",
|
|
48
|
+
"docs/README.zh.md"
|
|
49
|
+
],
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
52
|
+
},
|
|
53
|
+
"publishConfig": {
|
|
54
|
+
"access": "public"
|
|
55
|
+
},
|
|
56
|
+
"dsh": {
|
|
57
|
+
"bundle": {
|
|
58
|
+
"patch": "./cordis.patch.yml"
|
|
59
|
+
},
|
|
60
|
+
"client": {
|
|
61
|
+
"platform": "web"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build": "tsc -p tsconfig.build.json && node scripts/build-client.mjs",
|
|
66
|
+
"typecheck": "tsc -p tsconfig.typecheck.json",
|
|
67
|
+
"test": "node --test \"tests/*.test.ts\"",
|
|
68
|
+
"test:render": "node scripts/render-smoke.mjs",
|
|
69
|
+
"build:client": "node scripts/build-client.mjs",
|
|
70
|
+
"verify:client": "node scripts/verify-client-bundle.mjs",
|
|
71
|
+
"prepare": "npm run build",
|
|
72
|
+
"verify:package": "node scripts/verify-package-contents.mjs",
|
|
73
|
+
"check": "npm run typecheck && npm test && npm run test:render && npm run build && npm run verify:client && npm run verify:package"
|
|
74
|
+
},
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"@deepseek-ai/cordis": ">=0.0.1-rc.1 <0.1.0 || >=0.1.0-rc.1 <0.2.0 || >=0.2.0-rc.1 <0.3.0",
|
|
77
|
+
"@deepseek-ai/dsh-typert-protocol": ">=0.0.1-rc.1 <0.1.0 || >=0.1.0-rc.1 <0.2.0 || >=0.2.0-rc.1 <0.3.0",
|
|
78
|
+
"@deepseek-ai/schemastery": ">=0.0.1-rc.1 <0.1.0 || >=0.1.0-rc.1 <0.2.0 || >=0.2.0-rc.1 <0.3.0"
|
|
79
|
+
},
|
|
80
|
+
"peerDependenciesMeta": {
|
|
81
|
+
"@deepseek-ai/cordis": {
|
|
82
|
+
"optional": true
|
|
83
|
+
},
|
|
84
|
+
"@deepseek-ai/dsh-typert-protocol": {
|
|
85
|
+
"optional": true
|
|
86
|
+
},
|
|
87
|
+
"@deepseek-ai/schemastery": {
|
|
88
|
+
"optional": true
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"devDependencies": {
|
|
92
|
+
"@types/node": "^22.20.5",
|
|
93
|
+
"@types/react": "^18.3.31",
|
|
94
|
+
"esbuild": "^0.25.12",
|
|
95
|
+
"react": "^18.3.1",
|
|
96
|
+
"react-dom": "^18.3.1",
|
|
97
|
+
"typescript": "^5.9.0"
|
|
98
|
+
}
|
|
99
|
+
}
|