@staff0rd/assist 0.1197.0 → 0.1198.0
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/agent/commands/github.md +3 -1
- package/dist/.build-files +25 -24
- package/dist/built-version +1 -1
- package/dist/{chunk-SZNARW4L.js → chunk-6ZM4ATP3.js} +1 -1
- package/dist/{chunk-Y74CGS5C.js → chunk-7N2JBVAY.js} +6 -4
- package/dist/{chunk-N7MKYWPX.js → chunk-7VMO2MAS.js} +1 -1
- package/dist/{chunk-CSOKDY43.js → chunk-D56OSOJ2.js} +1 -1
- package/dist/{chunk-IEDFQBJI.js → chunk-EPVBZE3T.js} +13 -30
- package/dist/{chunk-3EGHC5DC.js → chunk-IVUDQ2OK.js} +1 -1
- package/dist/{chunk-ABLDOQ4B.js → chunk-JAZX2JSS.js} +22 -1
- package/dist/chunk-O7L27TQP.js +14 -0
- package/dist/{chunk-DPCFT55U.js → chunk-P5LQVJWN.js} +0 -8
- package/dist/{chunk-Q4TGGE5L.js → chunk-VHRROHRC.js} +1 -1
- package/dist/chunk-ZI5YL7N7.js +26 -0
- package/dist/{chunk-RBR2DXCS.js → chunk-ZXPVGNA4.js} +1 -1
- package/dist/commands/sessions/web/bundle.js +1 -1
- package/dist/{commentIssue-JQCEL3GH.js → commentIssue-HQD5SBCE.js} +29 -11
- package/dist/{createIssue-ZEZ4APQ7.js → createIssue-32NTLGUU.js} +7 -6
- package/dist/{doctorNodes-R5LSHBSG.js → doctorNodes-3L5FSA4N.js} +3 -3
- package/dist/{edit-CGFJYKXA.js → edit-2JDSWRN6.js} +7 -5
- package/dist/{editIssue-X4C4ULTM.js → editIssue-S34V2LAV.js} +7 -6
- package/dist/{editIssueComment-L6RLH4GX.js → editIssueComment-BJZEYQWI.js} +22 -11
- package/dist/index.js +31 -23
- package/dist/{raise-SJ5JLPBS.js → raise-NUAO6IFZ.js} +7 -5
- package/dist/{restartNode-JKNJHOBN.js → restartNode-HUKF5IZX.js} +5 -5
- package/dist/{runDaemon-H26DPNF2.js → runDaemon-QY3IAE3R.js} +5 -4
- package/dist/{signExtension-HFA73PC5.js → signExtension-FV54Z4RI.js} +1 -1
- package/dist/{updateNode-YY3552ZX.js → updateNode-U5AJUZV6.js} +5 -5
- package/dist/{web-LO36XJET.js → web-2UL2PQCT.js} +7 -6
- package/dist/{web-UIJZ6XQT.js → web-KVYP6IS2.js} +7 -6
- package/package.json +1 -1
- package/dist/chunk-JJKRUHWS.js +0 -22
package/agent/commands/github.md
CHANGED
|
@@ -147,9 +147,11 @@ Do not mention `assist`, the assist backlog, or any backlog item number in the c
|
|
|
147
147
|
**Post it** through the assist wrapper, which validates the body and, in a web session, opens the preview pane for approve/reject before anything lands:
|
|
148
148
|
|
|
149
149
|
```
|
|
150
|
-
assist github issue comment <number> -R <owner>/<repo> --body "<comment>" 2>&1
|
|
150
|
+
assist github issue comment <number> -R <owner>/<repo> --body "<comment>" [--screenshot '[Group/]Caption=path']... 2>&1
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
+
When you already have an image or video to include (e.g. a file the user pointed at on disk), pass it with `--screenshot '[Group/]Caption=path'`, once per file, rather than asking the user to drop it into the preview. It is attached under `## Screenshots` for you; never author that section yourself.
|
|
154
|
+
|
|
153
155
|
Display the result so the user can see it landed. If the command exits non-zero, relay the rejection reason and any inline comments, revise the draft accordingly, and run it again — nothing was posted.
|
|
154
156
|
|
|
155
157
|
## Action: started
|
package/dist/.build-files
CHANGED
|
@@ -39,7 +39,6 @@ chunk-2RUGZQUD.js
|
|
|
39
39
|
chunk-2RYBRXTJ.js
|
|
40
40
|
chunk-2T5HRFWP.js
|
|
41
41
|
chunk-2ZUJA3R6.js
|
|
42
|
-
chunk-3EGHC5DC.js
|
|
43
42
|
chunk-3HNTLFII.js
|
|
44
43
|
chunk-3JXMQFUS.js
|
|
45
44
|
chunk-3KLTYFPV.js
|
|
@@ -77,15 +76,17 @@ chunk-6QO66MJ4.js
|
|
|
77
76
|
chunk-6SKKK2RR.js
|
|
78
77
|
chunk-6T53CG7D.js
|
|
79
78
|
chunk-6Z7XJJNZ.js
|
|
79
|
+
chunk-6ZM4ATP3.js
|
|
80
80
|
chunk-7F22C6MC.js
|
|
81
81
|
chunk-7HNRCA3N.js
|
|
82
82
|
chunk-7KDF6H4R.js
|
|
83
83
|
chunk-7KVL2L7Z.js
|
|
84
|
+
chunk-7N2JBVAY.js
|
|
84
85
|
chunk-7NZOH4LN.js
|
|
85
86
|
chunk-7SMQSAXT.js
|
|
87
|
+
chunk-7VMO2MAS.js
|
|
86
88
|
chunk-A2XSU5K6.js
|
|
87
89
|
chunk-A7ONLVZD.js
|
|
88
|
-
chunk-ABLDOQ4B.js
|
|
89
90
|
chunk-ACEJSQDN.js
|
|
90
91
|
chunk-ADIYP3KC.js
|
|
91
92
|
chunk-ADLCDG2V.js
|
|
@@ -115,15 +116,14 @@ chunk-CDD4ZTG7.js
|
|
|
115
116
|
chunk-CDDJAXEJ.js
|
|
116
117
|
chunk-CDU6M5IX.js
|
|
117
118
|
chunk-CGYVYHMM.js
|
|
118
|
-
chunk-CSOKDY43.js
|
|
119
119
|
chunk-CUOHHT2F.js
|
|
120
120
|
chunk-D24GLTCK.js
|
|
121
121
|
chunk-D33NLT35.js
|
|
122
|
+
chunk-D56OSOJ2.js
|
|
122
123
|
chunk-D6WBUFXT.js
|
|
123
124
|
chunk-D7UZLH36.js
|
|
124
125
|
chunk-DGQ7KOW4.js
|
|
125
126
|
chunk-DP5YM3WJ.js
|
|
126
|
-
chunk-DPCFT55U.js
|
|
127
127
|
chunk-DPHNPX75.js
|
|
128
128
|
chunk-DQUUWYB3.js
|
|
129
129
|
chunk-DS2YJZZY.js
|
|
@@ -136,6 +136,7 @@ chunk-EM5TGZYD.js
|
|
|
136
136
|
chunk-ENBVLWTC.js
|
|
137
137
|
chunk-ENTJ2N5Y.js
|
|
138
138
|
chunk-EOUZVOHM.js
|
|
139
|
+
chunk-EPVBZE3T.js
|
|
139
140
|
chunk-EQZXAFIP.js
|
|
140
141
|
chunk-ERG23IG5.js
|
|
141
142
|
chunk-ES5IPLDM.js
|
|
@@ -182,7 +183,6 @@ chunk-I3TEQBTO.js
|
|
|
182
183
|
chunk-IBPSXDUB.js
|
|
183
184
|
chunk-IBVCCKC3.js
|
|
184
185
|
chunk-IDRVSAV5.js
|
|
185
|
-
chunk-IEDFQBJI.js
|
|
186
186
|
chunk-IFMJH2XY.js
|
|
187
187
|
chunk-IHZGFTOB.js
|
|
188
188
|
chunk-IISY3AMC.js
|
|
@@ -194,16 +194,17 @@ chunk-IS5SG2SN.js
|
|
|
194
194
|
chunk-ISIVSUR5.js
|
|
195
195
|
chunk-IULYBBGP.js
|
|
196
196
|
chunk-IVBWOIGE.js
|
|
197
|
+
chunk-IVUDQ2OK.js
|
|
197
198
|
chunk-IXDML4IQ.js
|
|
198
199
|
chunk-IXVSWYW2.js
|
|
199
200
|
chunk-J2PPCMCR.js
|
|
200
201
|
chunk-J6ULAU7G.js
|
|
201
202
|
chunk-J7SNTS4M.js
|
|
203
|
+
chunk-JAZX2JSS.js
|
|
202
204
|
chunk-JDYC4JZQ.js
|
|
203
205
|
chunk-JFBD33EV.js
|
|
204
206
|
chunk-JHBA5IZR.js
|
|
205
207
|
chunk-JJKKIBF5.js
|
|
206
|
-
chunk-JJKRUHWS.js
|
|
207
208
|
chunk-JM57BCD6.js
|
|
208
209
|
chunk-JMEYVW4M.js
|
|
209
210
|
chunk-JNCFHWBK.js
|
|
@@ -245,7 +246,6 @@ chunk-MT2LAO3P.js
|
|
|
245
246
|
chunk-MYH4MQX2.js
|
|
246
247
|
chunk-N65VOEFI.js
|
|
247
248
|
chunk-N755UYFK.js
|
|
248
|
-
chunk-N7MKYWPX.js
|
|
249
249
|
chunk-NBADZOXB.js
|
|
250
250
|
chunk-NFD2LJ2B.js
|
|
251
251
|
chunk-NGTSPXSJ.js
|
|
@@ -259,6 +259,7 @@ chunk-O3SCSMQJ.js
|
|
|
259
259
|
chunk-O3YZV2FA.js
|
|
260
260
|
chunk-O6HFT23O.js
|
|
261
261
|
chunk-O6RBWPG2.js
|
|
262
|
+
chunk-O7L27TQP.js
|
|
262
263
|
chunk-ODLSWRTS.js
|
|
263
264
|
chunk-OLE7XSNB.js
|
|
264
265
|
chunk-OQ6AYXHB.js
|
|
@@ -268,6 +269,7 @@ chunk-P23ZWXGY.js
|
|
|
268
269
|
chunk-P253KAVC.js
|
|
269
270
|
chunk-P26XSDFU.js
|
|
270
271
|
chunk-P56S7RYB.js
|
|
272
|
+
chunk-P5LQVJWN.js
|
|
271
273
|
chunk-P7FVAGFQ.js
|
|
272
274
|
chunk-P7SERZI6.js
|
|
273
275
|
chunk-PB3F4XB3.js
|
|
@@ -278,7 +280,6 @@ chunk-PS3TSUFD.js
|
|
|
278
280
|
chunk-PURNABFX.js
|
|
279
281
|
chunk-PVJZDW3D.js
|
|
280
282
|
chunk-PZAEU7LL.js
|
|
281
|
-
chunk-Q4TGGE5L.js
|
|
282
283
|
chunk-Q6PZLPK4.js
|
|
283
284
|
chunk-Q7YVMIA3.js
|
|
284
285
|
chunk-QADVHG7P.js
|
|
@@ -292,7 +293,6 @@ chunk-QS2S63AF.js
|
|
|
292
293
|
chunk-QU6OQZJ2.js
|
|
293
294
|
chunk-R62CNGZO.js
|
|
294
295
|
chunk-R72E45HQ.js
|
|
295
|
-
chunk-RBR2DXCS.js
|
|
296
296
|
chunk-RFMBA6WA.js
|
|
297
297
|
chunk-RNFWWESE.js
|
|
298
298
|
chunk-RP227DNL.js
|
|
@@ -311,7 +311,6 @@ chunk-SSKHLBQB.js
|
|
|
311
311
|
chunk-SURCYYQ6.js
|
|
312
312
|
chunk-SVCR2A7L.js
|
|
313
313
|
chunk-SW7FSLHP.js
|
|
314
|
-
chunk-SZNARW4L.js
|
|
315
314
|
chunk-T2DY3T55.js
|
|
316
315
|
chunk-T4TPIDXO.js
|
|
317
316
|
chunk-T7ZPGAB5.js
|
|
@@ -342,6 +341,7 @@ chunk-VDE2QVT4.js
|
|
|
342
341
|
chunk-VDKJH36N.js
|
|
343
342
|
chunk-VDXS55BC.js
|
|
344
343
|
chunk-VEZ3FL5H.js
|
|
344
|
+
chunk-VHRROHRC.js
|
|
345
345
|
chunk-VLJWAMAH.js
|
|
346
346
|
chunk-VPMI4LV2.js
|
|
347
347
|
chunk-VVUYBY6D.js
|
|
@@ -372,7 +372,6 @@ chunk-XV2STPP6.js
|
|
|
372
372
|
chunk-XV6BO5MK.js
|
|
373
373
|
chunk-XZT5S5IY.js
|
|
374
374
|
chunk-Y3R4C2P7.js
|
|
375
|
-
chunk-Y74CGS5C.js
|
|
376
375
|
chunk-YCFOCDUA.js
|
|
377
376
|
chunk-YDA62L6J.js
|
|
378
377
|
chunk-YHJHYOBF.js
|
|
@@ -399,6 +398,7 @@ chunk-Z7CPIHXT.js
|
|
|
399
398
|
chunk-ZABRGL2F.js
|
|
400
399
|
chunk-ZDSSSQZZ.js
|
|
401
400
|
chunk-ZFX4EZMW.js
|
|
401
|
+
chunk-ZI5YL7N7.js
|
|
402
402
|
chunk-ZLRZR64W.js
|
|
403
403
|
chunk-ZMH7UZNP.js
|
|
404
404
|
chunk-ZMW2VHAF.js
|
|
@@ -409,6 +409,7 @@ chunk-ZQGAGLBO.js
|
|
|
409
409
|
chunk-ZRIBI33P.js
|
|
410
410
|
chunk-ZSHH4XS6.js
|
|
411
411
|
chunk-ZWPML4IH.js
|
|
412
|
+
chunk-ZXPVGNA4.js
|
|
412
413
|
chunk-ZYK7V4PG.js
|
|
413
414
|
chunk-ZZVYRC77.js
|
|
414
415
|
clean-N5ZBCTOB.js
|
|
@@ -448,7 +449,7 @@ commands/sessions/web/monaco.js
|
|
|
448
449
|
commands/sessions/web/monaco.worker.js
|
|
449
450
|
comment-5VFL65DI.js
|
|
450
451
|
comment-YXTD4LLT.js
|
|
451
|
-
commentIssue-
|
|
452
|
+
commentIssue-HQD5SBCE.js
|
|
452
453
|
comments-Z46LCFIS.js
|
|
453
454
|
commit-UBFHBWPL.js
|
|
454
455
|
commits-QFWMYJC5.js
|
|
@@ -462,7 +463,7 @@ configSet-NMSZ27OX.js
|
|
|
462
463
|
configUnset-IINMDUOO.js
|
|
463
464
|
configure-M2ECXTUT.js
|
|
464
465
|
coverage-FZKHWD7V.js
|
|
465
|
-
createIssue-
|
|
466
|
+
createIssue-32NTLGUU.js
|
|
466
467
|
cyclomatic-CYUIP7H3.js
|
|
467
468
|
daemonStatus-EAZHBC6O.js
|
|
468
469
|
del-6CB5KFFD.js
|
|
@@ -474,14 +475,14 @@ deps-RSUOIZPE.js
|
|
|
474
475
|
docsConfirm-AQGXUXUM.js
|
|
475
476
|
docsScreenshots-VV5F5SK5.js
|
|
476
477
|
docsUnlock-JTCIE32Q.js
|
|
477
|
-
doctorNodes-
|
|
478
|
+
doctorNodes-3L5FSA4N.js
|
|
478
479
|
done-YSG44MAX.js
|
|
479
480
|
drainDaemon-ZHP2VY7D.js
|
|
480
481
|
dropRetiredTables-JBLALSG5.js
|
|
481
|
-
edit-
|
|
482
|
+
edit-2JDSWRN6.js
|
|
482
483
|
editHook-LIRUJTEJ.js
|
|
483
|
-
editIssue-
|
|
484
|
-
editIssueComment-
|
|
484
|
+
editIssue-S34V2LAV.js
|
|
485
|
+
editIssueComment-BJZEYQWI.js
|
|
485
486
|
exportBacklog-ZTMILEAX.js
|
|
486
487
|
extension-YYRD5EM6.js
|
|
487
488
|
extract-SGYOCBTT.js
|
|
@@ -554,7 +555,7 @@ prs-RSBCBF4N.js
|
|
|
554
555
|
prsSlackChannel-QGXDVDOM.js
|
|
555
556
|
prsStatus-AEZDQ4HE.js
|
|
556
557
|
pullIfConfigured-AJ6X5WXS.js
|
|
557
|
-
raise-
|
|
558
|
+
raise-NUAO6IFZ.js
|
|
558
559
|
raiseHelpText-IDZI3UAC.js
|
|
559
560
|
ravendbAuth-SDXPMPDN.js
|
|
560
561
|
ravendbCollections-DLILEMS5.js
|
|
@@ -581,7 +582,7 @@ repos-HRCIMY6J.js
|
|
|
581
582
|
resolveHarness-CRWWVE4U.js
|
|
582
583
|
resolveModel-2I3SVZKR.js
|
|
583
584
|
restartDaemon-Y7V2QF3N.js
|
|
584
|
-
restartNode-
|
|
585
|
+
restartNode-HUKF5IZX.js
|
|
585
586
|
restructure-S6KIV6TM.js
|
|
586
587
|
review-Q2HDUBAA.js
|
|
587
588
|
reviewPrComments-PX4MPOTQ.js
|
|
@@ -589,7 +590,7 @@ rewindPhase-TCQMOWKB.js
|
|
|
589
590
|
rulesAdd-DR25M5KY.js
|
|
590
591
|
run-D7UQIGJU.js
|
|
591
592
|
run-DRGU5WNL.js
|
|
592
|
-
runDaemon-
|
|
593
|
+
runDaemon-QY3IAE3R.js
|
|
593
594
|
runExtract-7H2MKKFQ.js
|
|
594
595
|
runParallelPhase-6GQMW5NT.js
|
|
595
596
|
runRefine-K764J34T.js
|
|
@@ -611,7 +612,7 @@ show-GUW62FKK.js
|
|
|
611
612
|
show-IWLHTZEP.js
|
|
612
613
|
showClaudeCodeIcon-E4SAM3GN.js
|
|
613
614
|
showCodexIcon-YUAKV4NI.js
|
|
614
|
-
signExtension-
|
|
615
|
+
signExtension-FV54Z4RI.js
|
|
615
616
|
simulateDivergence-VB4UL4UR.js
|
|
616
617
|
skip-7Q3IVOBV.js
|
|
617
618
|
slack-VILAGICW.js
|
|
@@ -639,7 +640,7 @@ unlinkNode-RKC44U2T.js
|
|
|
639
640
|
unstar-YQDZUJV7.js
|
|
640
641
|
update-FHGTCK6N.js
|
|
641
642
|
update-W7ANHGDR.js
|
|
642
|
-
updateNode-
|
|
643
|
+
updateNode-U5AJUZV6.js
|
|
643
644
|
updatePhase-JEVJRAOR.js
|
|
644
645
|
updatePlan-QZVWDL2U.js
|
|
645
646
|
version-5K75T67C.js
|
|
@@ -647,8 +648,8 @@ viewIssue-N6W53LSK.js
|
|
|
647
648
|
watchLoop-MV7DVGC6.js
|
|
648
649
|
watchReport-A4W7UOAJ.js
|
|
649
650
|
watchWait-5Y2J5VQY.js
|
|
650
|
-
web-
|
|
651
|
-
web-
|
|
651
|
+
web-2UL2PQCT.js
|
|
652
|
+
web-KVYP6IS2.js
|
|
652
653
|
withPool-LEJ76IOJ.js
|
|
653
654
|
wontdo-XAQGHSR5.js
|
|
654
655
|
wontfix-XV5XJADI.js
|
package/dist/built-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.1198.0
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-JM57BCD6.js";
|
|
11
11
|
import {
|
|
12
12
|
firstBrokenHop
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6ZM4ATP3.js";
|
|
14
14
|
import {
|
|
15
15
|
describePeerError,
|
|
16
16
|
fetchPeerJson
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
import {
|
|
48
48
|
ASSIST_VERSION,
|
|
49
49
|
PROTOCOL_VERSION
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-7VMO2MAS.js";
|
|
51
51
|
import {
|
|
52
52
|
findLinkSpec
|
|
53
53
|
} from "./chunk-J2PPCMCR.js";
|
|
@@ -141,12 +141,14 @@ import {
|
|
|
141
141
|
import {
|
|
142
142
|
fetchProjectV2
|
|
143
143
|
} from "./chunk-YQ3CNWB3.js";
|
|
144
|
+
import {
|
|
145
|
+
isStagedAttachmentPath
|
|
146
|
+
} from "./chunk-O7L27TQP.js";
|
|
144
147
|
import {
|
|
145
148
|
attachmentContentType,
|
|
146
|
-
isStagedAttachmentPath,
|
|
147
149
|
stageAttachment,
|
|
148
150
|
stagedAttachmentsDir
|
|
149
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-P5LQVJWN.js";
|
|
150
152
|
import {
|
|
151
153
|
assignIssueToSelf
|
|
152
154
|
} from "./chunk-SDMBTSYP.js";
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
minGhAttachVersion
|
|
3
3
|
} from "./chunk-B7B26YPF.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from "./chunk-
|
|
5
|
+
isStagedAttachmentPath
|
|
6
|
+
} from "./chunk-O7L27TQP.js";
|
|
7
|
+
import {
|
|
8
|
+
ghAttachableExtensions
|
|
9
|
+
} from "./chunk-P5LQVJWN.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/prs/renderScreenshotBlock.ts
|
|
12
12
|
import { extname } from "path";
|
|
@@ -85,6 +85,11 @@ function appendScreenshots(body, attachments) {
|
|
|
85
85
|
${section}` : section;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
// src/commands/prs/attachArgs.ts
|
|
89
|
+
function attachArgs(attachments) {
|
|
90
|
+
return attachments.flatMap(({ path }) => ["--attach", path]);
|
|
91
|
+
}
|
|
92
|
+
|
|
88
93
|
// src/commands/prs/parseScreenshotSpec.ts
|
|
89
94
|
import { statSync } from "fs";
|
|
90
95
|
import { basename, extname as extname2, resolve } from "path";
|
|
@@ -125,30 +130,9 @@ function parseScreenshotSpecs(specs) {
|
|
|
125
130
|
}
|
|
126
131
|
}
|
|
127
132
|
|
|
128
|
-
// src/commands/prs/stageScreenshots.ts
|
|
129
|
-
import { readFile } from "fs/promises";
|
|
130
|
-
import { basename as basename2 } from "path";
|
|
131
|
-
function stageScreenshots(screenshots = []) {
|
|
132
|
-
return Promise.all(
|
|
133
|
-
screenshots.map(async (screenshot) => {
|
|
134
|
-
const { filePath } = await stageAttachment(
|
|
135
|
-
basename2(screenshot.path),
|
|
136
|
-
attachmentContentType(screenshot.path),
|
|
137
|
-
await readFile(screenshot.path)
|
|
138
|
-
);
|
|
139
|
-
return { ...screenshot, path: filePath };
|
|
140
|
-
})
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// src/commands/prs/attachArgs.ts
|
|
145
|
-
function attachArgs(attachments) {
|
|
146
|
-
return attachments.flatMap(({ path }) => ["--attach", path]);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
133
|
// src/commands/prs/runGhWithAttachments.ts
|
|
150
134
|
import { execFileSync } from "child_process";
|
|
151
|
-
import { basename as
|
|
135
|
+
import { basename as basename2 } from "path";
|
|
152
136
|
|
|
153
137
|
// src/shared/removeStagedAttachments.ts
|
|
154
138
|
import { rmSync } from "fs";
|
|
@@ -165,7 +149,7 @@ function removeStagedAttachments(attachments) {
|
|
|
165
149
|
var PLACED_URL = /https:\/\/\S+\/(pull|issues)\/\d+/;
|
|
166
150
|
function reportPartialFailure(attachments, stderr) {
|
|
167
151
|
const failed = attachments.filter(
|
|
168
|
-
({ path }) => stderr.includes(path) || stderr.includes(
|
|
152
|
+
({ path }) => stderr.includes(path) || stderr.includes(basename2(path))
|
|
169
153
|
);
|
|
170
154
|
const named = failed.length > 0 ? failed : attachments;
|
|
171
155
|
console.error(
|
|
@@ -201,8 +185,7 @@ function runGhWithAttachments(args, attachments) {
|
|
|
201
185
|
export {
|
|
202
186
|
renderScreenshotsSection,
|
|
203
187
|
appendScreenshots,
|
|
204
|
-
parseScreenshotSpecs,
|
|
205
|
-
stageScreenshots,
|
|
206
188
|
attachArgs,
|
|
189
|
+
parseScreenshotSpecs,
|
|
207
190
|
runGhWithAttachments
|
|
208
191
|
};
|
|
@@ -5,6 +5,10 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
rejectHarnessAttribution
|
|
7
7
|
} from "./chunk-C3MGHR3N.js";
|
|
8
|
+
import {
|
|
9
|
+
attachmentContentType,
|
|
10
|
+
stageAttachment
|
|
11
|
+
} from "./chunk-P5LQVJWN.js";
|
|
8
12
|
|
|
9
13
|
// src/shared/validateProposedContent.ts
|
|
10
14
|
var URL_PATTERN = /https?:\/\/[^\s<>()[\]"'`]+/gi;
|
|
@@ -37,6 +41,23 @@ function validateProposedContent(labels, title, body) {
|
|
|
37
41
|
}
|
|
38
42
|
}
|
|
39
43
|
|
|
44
|
+
// src/commands/prs/stageScreenshots.ts
|
|
45
|
+
import { readFile } from "fs/promises";
|
|
46
|
+
import { basename } from "path";
|
|
47
|
+
function stageScreenshots(screenshots = []) {
|
|
48
|
+
return Promise.all(
|
|
49
|
+
screenshots.map(async (screenshot) => {
|
|
50
|
+
const { filePath } = await stageAttachment(
|
|
51
|
+
basename(screenshot.path),
|
|
52
|
+
attachmentContentType(screenshot.path),
|
|
53
|
+
await readFile(screenshot.path)
|
|
54
|
+
);
|
|
55
|
+
return { ...screenshot, path: filePath };
|
|
56
|
+
})
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
40
60
|
export {
|
|
41
|
-
validateProposedContent
|
|
61
|
+
validateProposedContent,
|
|
62
|
+
stageScreenshots
|
|
42
63
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
stagedAttachmentsDir
|
|
3
|
+
} from "./chunk-P5LQVJWN.js";
|
|
4
|
+
|
|
5
|
+
// src/shared/isStagedAttachmentPath.ts
|
|
6
|
+
import { isAbsolute, relative, resolve, sep } from "path";
|
|
7
|
+
function isStagedAttachmentPath(path) {
|
|
8
|
+
const rel = relative(stagedAttachmentsDir, resolve(path));
|
|
9
|
+
return rel !== "" && rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
isStagedAttachmentPath
|
|
14
|
+
};
|
|
@@ -3,13 +3,6 @@ import { homedir } from "os";
|
|
|
3
3
|
import { join } from "path";
|
|
4
4
|
var stagedAttachmentsDir = join(homedir(), ".assist", "attachments");
|
|
5
5
|
|
|
6
|
-
// src/shared/isStagedAttachmentPath.ts
|
|
7
|
-
import { isAbsolute, relative, resolve, sep } from "path";
|
|
8
|
-
function isStagedAttachmentPath(path) {
|
|
9
|
-
const rel = relative(stagedAttachmentsDir, resolve(path));
|
|
10
|
-
return rel !== "" && rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
6
|
// src/commands/sessions/web/attachmentContentType.ts
|
|
14
7
|
import { extname } from "path";
|
|
15
8
|
|
|
@@ -73,7 +66,6 @@ async function stageAttachment(name, contentType, body) {
|
|
|
73
66
|
|
|
74
67
|
export {
|
|
75
68
|
stagedAttachmentsDir,
|
|
76
|
-
isStagedAttachmentPath,
|
|
77
69
|
attachmentContentType,
|
|
78
70
|
ghAttachableExtensions,
|
|
79
71
|
stageAttachment
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
stageScreenshots
|
|
3
|
+
} from "./chunk-JAZX2JSS.js";
|
|
4
|
+
import {
|
|
5
|
+
awaitPreviewApproval
|
|
6
|
+
} from "./chunk-D24GLTCK.js";
|
|
7
|
+
|
|
8
|
+
// src/commands/github/issue/reviewProposedIssueComment.ts
|
|
9
|
+
import { randomUUID } from "crypto";
|
|
10
|
+
async function reviewProposedIssueComment(title, body, screenshots = []) {
|
|
11
|
+
const sessionId = process.env.ASSIST_SESSION_ID;
|
|
12
|
+
if (process.env.ASSIST_SESSION !== "1" || !sessionId) return void 0;
|
|
13
|
+
return await awaitPreviewApproval("GitHub issue comment preview", {
|
|
14
|
+
sessionId,
|
|
15
|
+
requestId: randomUUID(),
|
|
16
|
+
title,
|
|
17
|
+
body,
|
|
18
|
+
prNumber: null,
|
|
19
|
+
kind: "github-issue-comment",
|
|
20
|
+
screenshots: screenshots.length ? await stageScreenshots(screenshots) : void 0
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
reviewProposedIssueComment
|
|
26
|
+
};
|