@staff0rd/assist 0.1196.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 +27 -26
- package/dist/{addActivity-UKZ2MJZY.js → addActivity-D7F3E6IR.js} +1 -1
- package/dist/built-version +1 -1
- package/dist/{chunk-B3Q6IKBW.js → chunk-6ZM4ATP3.js} +1 -1
- package/dist/{chunk-B4O2YCNY.js → chunk-7N2JBVAY.js} +6 -4
- package/dist/{chunk-6YLF6LB6.js → chunk-7VMO2MAS.js} +1 -1
- package/dist/{chunk-CUR6OOHC.js → chunk-D56OSOJ2.js} +1 -1
- package/dist/{chunk-IEDFQBJI.js → chunk-EPVBZE3T.js} +13 -30
- package/dist/{chunk-5BY472AT.js → chunk-IVUDQ2OK.js} +1 -1
- package/dist/{chunk-ABLDOQ4B.js → chunk-JAZX2JSS.js} +22 -1
- package/dist/{chunk-PXXN6TT2.js → chunk-LIKGFVCS.js} +5 -3
- 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-Y55PJHMU.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-XAQ3WILB.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 +32 -24
- package/dist/{raise-SJ5JLPBS.js → raise-NUAO6IFZ.js} +7 -5
- package/dist/{restartNode-SJQW3ARZ.js → restartNode-HUKF5IZX.js} +5 -5
- package/dist/{runDaemon-WR4YUH7P.js → runDaemon-QY3IAE3R.js} +34 -11
- package/dist/{signExtension-PMS43R4K.js → signExtension-FV54Z4RI.js} +1 -1
- package/dist/{updateNode-3RUK5BSA.js → updateNode-U5AJUZV6.js} +5 -5
- package/dist/{web-XXN3QBZM.js → web-2UL2PQCT.js} +7 -6
- package/dist/{web-5ELDJBGT.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
|
@@ -3,7 +3,7 @@ activity-2SEJVUW5.js
|
|
|
3
3
|
add-7DAC5W2W.js
|
|
4
4
|
add-R7G76G7G.js
|
|
5
5
|
add-YGWMQIDK.js
|
|
6
|
-
addActivity-
|
|
6
|
+
addActivity-D7F3E6IR.js
|
|
7
7
|
addPhase-N73554MQ.js
|
|
8
8
|
adviceFragments-5XVE6JXX.js
|
|
9
9
|
advise-XBZMABJX.js
|
|
@@ -56,7 +56,6 @@ chunk-4YAIQN3S.js
|
|
|
56
56
|
chunk-4YHDWC5E.js
|
|
57
57
|
chunk-556BOFTS.js
|
|
58
58
|
chunk-56USVTPP.js
|
|
59
|
-
chunk-5BY472AT.js
|
|
60
59
|
chunk-5CNDLMYO.js
|
|
61
60
|
chunk-5H7EHZ3J.js
|
|
62
61
|
chunk-5JOVEUBS.js
|
|
@@ -76,17 +75,18 @@ chunk-6G2ADBNV.js
|
|
|
76
75
|
chunk-6QO66MJ4.js
|
|
77
76
|
chunk-6SKKK2RR.js
|
|
78
77
|
chunk-6T53CG7D.js
|
|
79
|
-
chunk-6YLF6LB6.js
|
|
80
78
|
chunk-6Z7XJJNZ.js
|
|
79
|
+
chunk-6ZM4ATP3.js
|
|
81
80
|
chunk-7F22C6MC.js
|
|
82
81
|
chunk-7HNRCA3N.js
|
|
83
82
|
chunk-7KDF6H4R.js
|
|
84
83
|
chunk-7KVL2L7Z.js
|
|
84
|
+
chunk-7N2JBVAY.js
|
|
85
85
|
chunk-7NZOH4LN.js
|
|
86
86
|
chunk-7SMQSAXT.js
|
|
87
|
+
chunk-7VMO2MAS.js
|
|
87
88
|
chunk-A2XSU5K6.js
|
|
88
89
|
chunk-A7ONLVZD.js
|
|
89
|
-
chunk-ABLDOQ4B.js
|
|
90
90
|
chunk-ACEJSQDN.js
|
|
91
91
|
chunk-ADIYP3KC.js
|
|
92
92
|
chunk-ADLCDG2V.js
|
|
@@ -99,8 +99,6 @@ chunk-AVLELL42.js
|
|
|
99
99
|
chunk-AYZKB6AU.js
|
|
100
100
|
chunk-B2XNGBON.js
|
|
101
101
|
chunk-B3JSQA5D.js
|
|
102
|
-
chunk-B3Q6IKBW.js
|
|
103
|
-
chunk-B4O2YCNY.js
|
|
104
102
|
chunk-B5ZOANOD.js
|
|
105
103
|
chunk-B6RAZW2L.js
|
|
106
104
|
chunk-B7B26YPF.js
|
|
@@ -119,14 +117,13 @@ chunk-CDDJAXEJ.js
|
|
|
119
117
|
chunk-CDU6M5IX.js
|
|
120
118
|
chunk-CGYVYHMM.js
|
|
121
119
|
chunk-CUOHHT2F.js
|
|
122
|
-
chunk-CUR6OOHC.js
|
|
123
120
|
chunk-D24GLTCK.js
|
|
124
121
|
chunk-D33NLT35.js
|
|
122
|
+
chunk-D56OSOJ2.js
|
|
125
123
|
chunk-D6WBUFXT.js
|
|
126
124
|
chunk-D7UZLH36.js
|
|
127
125
|
chunk-DGQ7KOW4.js
|
|
128
126
|
chunk-DP5YM3WJ.js
|
|
129
|
-
chunk-DPCFT55U.js
|
|
130
127
|
chunk-DPHNPX75.js
|
|
131
128
|
chunk-DQUUWYB3.js
|
|
132
129
|
chunk-DS2YJZZY.js
|
|
@@ -139,6 +136,7 @@ chunk-EM5TGZYD.js
|
|
|
139
136
|
chunk-ENBVLWTC.js
|
|
140
137
|
chunk-ENTJ2N5Y.js
|
|
141
138
|
chunk-EOUZVOHM.js
|
|
139
|
+
chunk-EPVBZE3T.js
|
|
142
140
|
chunk-EQZXAFIP.js
|
|
143
141
|
chunk-ERG23IG5.js
|
|
144
142
|
chunk-ES5IPLDM.js
|
|
@@ -185,7 +183,6 @@ chunk-I3TEQBTO.js
|
|
|
185
183
|
chunk-IBPSXDUB.js
|
|
186
184
|
chunk-IBVCCKC3.js
|
|
187
185
|
chunk-IDRVSAV5.js
|
|
188
|
-
chunk-IEDFQBJI.js
|
|
189
186
|
chunk-IFMJH2XY.js
|
|
190
187
|
chunk-IHZGFTOB.js
|
|
191
188
|
chunk-IISY3AMC.js
|
|
@@ -197,16 +194,17 @@ chunk-IS5SG2SN.js
|
|
|
197
194
|
chunk-ISIVSUR5.js
|
|
198
195
|
chunk-IULYBBGP.js
|
|
199
196
|
chunk-IVBWOIGE.js
|
|
197
|
+
chunk-IVUDQ2OK.js
|
|
200
198
|
chunk-IXDML4IQ.js
|
|
201
199
|
chunk-IXVSWYW2.js
|
|
202
200
|
chunk-J2PPCMCR.js
|
|
203
201
|
chunk-J6ULAU7G.js
|
|
204
202
|
chunk-J7SNTS4M.js
|
|
203
|
+
chunk-JAZX2JSS.js
|
|
205
204
|
chunk-JDYC4JZQ.js
|
|
206
205
|
chunk-JFBD33EV.js
|
|
207
206
|
chunk-JHBA5IZR.js
|
|
208
207
|
chunk-JJKKIBF5.js
|
|
209
|
-
chunk-JJKRUHWS.js
|
|
210
208
|
chunk-JM57BCD6.js
|
|
211
209
|
chunk-JMEYVW4M.js
|
|
212
210
|
chunk-JNCFHWBK.js
|
|
@@ -229,6 +227,7 @@ chunk-KZX6UIKC.js
|
|
|
229
227
|
chunk-L363MNYZ.js
|
|
230
228
|
chunk-L6SCN5J6.js
|
|
231
229
|
chunk-LDVATRUW.js
|
|
230
|
+
chunk-LIKGFVCS.js
|
|
232
231
|
chunk-LIN3HTLF.js
|
|
233
232
|
chunk-LKDW2GWH.js
|
|
234
233
|
chunk-LKZ7J5AK.js
|
|
@@ -260,6 +259,7 @@ chunk-O3SCSMQJ.js
|
|
|
260
259
|
chunk-O3YZV2FA.js
|
|
261
260
|
chunk-O6HFT23O.js
|
|
262
261
|
chunk-O6RBWPG2.js
|
|
262
|
+
chunk-O7L27TQP.js
|
|
263
263
|
chunk-ODLSWRTS.js
|
|
264
264
|
chunk-OLE7XSNB.js
|
|
265
265
|
chunk-OQ6AYXHB.js
|
|
@@ -269,6 +269,7 @@ chunk-P23ZWXGY.js
|
|
|
269
269
|
chunk-P253KAVC.js
|
|
270
270
|
chunk-P26XSDFU.js
|
|
271
271
|
chunk-P56S7RYB.js
|
|
272
|
+
chunk-P5LQVJWN.js
|
|
272
273
|
chunk-P7FVAGFQ.js
|
|
273
274
|
chunk-P7SERZI6.js
|
|
274
275
|
chunk-PB3F4XB3.js
|
|
@@ -278,9 +279,7 @@ chunk-PPPKJV3H.js
|
|
|
278
279
|
chunk-PS3TSUFD.js
|
|
279
280
|
chunk-PURNABFX.js
|
|
280
281
|
chunk-PVJZDW3D.js
|
|
281
|
-
chunk-PXXN6TT2.js
|
|
282
282
|
chunk-PZAEU7LL.js
|
|
283
|
-
chunk-Q4TGGE5L.js
|
|
284
283
|
chunk-Q6PZLPK4.js
|
|
285
284
|
chunk-Q7YVMIA3.js
|
|
286
285
|
chunk-QADVHG7P.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-Y55PJHMU.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
|
};
|
|
@@ -69,10 +69,12 @@ function eventTranscriptMessages(event) {
|
|
|
69
69
|
function claimReply(replies, event) {
|
|
70
70
|
if (event.kind !== "message" || event.role !== "user" || !event.at) return;
|
|
71
71
|
const at = event.at;
|
|
72
|
+
const label = /^`assist ([^`]+)` finished with exit code /.exec(
|
|
73
|
+
event.text
|
|
74
|
+
)?.[1];
|
|
75
|
+
if (!label) return;
|
|
72
76
|
const matching = replies.filter(
|
|
73
|
-
(reply2) => reply2.at <= at &&
|
|
74
|
-
`\`assist ${reply2.command}\` finished with exit code `
|
|
75
|
-
)
|
|
77
|
+
(reply2) => reply2.at <= at && (label === reply2.command || label.startsWith(`${reply2.command} `))
|
|
76
78
|
);
|
|
77
79
|
const reply = matching.at(-1);
|
|
78
80
|
if (!reply) return;
|
|
@@ -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
|
+
};
|