@arbidocs/blocks 0.4.54 → 0.4.55
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/agents/index.cjs +218 -230
- package/dist/agents/index.js +2 -2
- package/dist/agents/tasks/NewThreadDialog.d.ts +4 -8
- package/dist/agents/tasks/TaskActivityTimeline.d.ts +2 -8
- package/dist/agents/tasks/TaskInbox.d.ts +1 -1
- package/dist/agents/tasks/TaskRowMenu.d.ts +1 -6
- package/dist/agents/tasks/TaskStartDialog.d.ts +1 -8
- package/dist/agents/tasks/TaskStatusPill.d.ts +2 -2
- package/dist/agents/tasks/TaskTable.d.ts +6 -17
- package/dist/agents/tasks/WorkflowComposer.d.ts +2 -2
- package/dist/agents/tasks/index.d.ts +1 -4
- package/dist/agents/tasks/taskColumns.d.ts +2 -2
- package/dist/agents/tasks/taskComposerTypes.d.ts +2 -15
- package/dist/agents/tasks/taskLabels.d.ts +5 -7
- package/dist/agents/tasks/taskRequest.d.ts +5 -7
- package/dist/agents/tasks/taskRows.d.ts +6 -10
- package/dist/agents/tasks/taskTableLabels.d.ts +2 -6
- package/dist/agents/tasks/workflowRows.d.ts +2 -2
- package/dist/{chunk-2FBNT7Y6.js → chunk-BIAALPXI.js} +45 -611
- package/dist/chunk-BIAALPXI.js.map +1 -0
- package/dist/{chunk-5JEVPE7Y.cjs → chunk-ZSNH4CWE.cjs} +42 -611
- package/dist/chunk-ZSNH4CWE.cjs.map +1 -0
- package/dist/connect/index.cjs +1 -2
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +1 -2
- package/dist/connect/index.js.map +1 -1
- package/dist/index.cjs +219 -231
- package/dist/index.js +2 -2
- package/package.json +4 -4
- package/dist/agents/tasks/TaskReviewActions.d.ts +0 -44
- package/dist/agents/tasks/TaskReviewDialog.d.ts +0 -22
- package/dist/chunk-2FBNT7Y6.js.map +0 -1
- package/dist/chunk-5JEVPE7Y.cjs.map +0 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
|
|
5
|
+
var chunkWBDK4PIA_cjs = require('./chunk-WBDK4PIA.cjs');
|
|
5
6
|
var chunk3AFWGEDJ_cjs = require('./chunk-3AFWGEDJ.cjs');
|
|
6
7
|
var chunkIA7RTPT3_cjs = require('./chunk-IA7RTPT3.cjs');
|
|
7
|
-
var chunkWBDK4PIA_cjs = require('./chunk-WBDK4PIA.cjs');
|
|
8
8
|
var chunkYJQVLVBJ_cjs = require('./chunk-YJQVLVBJ.cjs');
|
|
9
9
|
var chunkVFUWWH52_cjs = require('./chunk-VFUWWH52.cjs');
|
|
10
10
|
var chunk2EI7NCUA_cjs = require('./chunk-2EI7NCUA.cjs');
|
|
@@ -3051,21 +3051,13 @@ var TRIGGER_LABELS = {
|
|
|
3051
3051
|
var STATUS_LABELS = {
|
|
3052
3052
|
todo: "To do",
|
|
3053
3053
|
generating: "Generating",
|
|
3054
|
-
ready_for_review: "Ready for review",
|
|
3055
3054
|
done: "Done",
|
|
3056
3055
|
chat: "Chat"
|
|
3057
3056
|
};
|
|
3058
|
-
var STATUS_ORDER = [
|
|
3059
|
-
"ready_for_review",
|
|
3060
|
-
"generating",
|
|
3061
|
-
"todo",
|
|
3062
|
-
"done",
|
|
3063
|
-
"chat"
|
|
3064
|
-
];
|
|
3057
|
+
var STATUS_ORDER = ["generating", "todo", "done", "chat"];
|
|
3065
3058
|
var STATUS_TONE = {
|
|
3066
3059
|
todo: "neutral",
|
|
3067
3060
|
generating: "ai",
|
|
3068
|
-
ready_for_review: "warning",
|
|
3069
3061
|
done: "success",
|
|
3070
3062
|
chat: "neutral"
|
|
3071
3063
|
};
|
|
@@ -3094,21 +3086,6 @@ function PersonPill({ person, size = "sm", testId }) {
|
|
|
3094
3086
|
}
|
|
3095
3087
|
) });
|
|
3096
3088
|
}
|
|
3097
|
-
function PersonAvatar({ person, size = "xs" }) {
|
|
3098
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3099
|
-
ui.UserEntity,
|
|
3100
|
-
{
|
|
3101
|
-
variant: "icon",
|
|
3102
|
-
size,
|
|
3103
|
-
interactive: false,
|
|
3104
|
-
showTooltip: false,
|
|
3105
|
-
initials: chunkKDG6FER6_cjs.initials(person.label),
|
|
3106
|
-
displayName: person.label,
|
|
3107
|
-
avatarStyle: person.id ? ui.getEntityColorStyles(person.id) : void 0,
|
|
3108
|
-
isAgent: person.isAgent
|
|
3109
|
-
}
|
|
3110
|
-
);
|
|
3111
|
-
}
|
|
3112
3089
|
var DEFAULT_TASK_OUTPUTS_CELL_LABELS = {
|
|
3113
3090
|
none: "\u2014",
|
|
3114
3091
|
open: (count) => `${count} ${count === 1 ? "output" : "outputs"}`,
|
|
@@ -3232,192 +3209,6 @@ function TaskMoveDialog({
|
|
|
3232
3209
|
}
|
|
3233
3210
|
);
|
|
3234
3211
|
}
|
|
3235
|
-
var DEFAULT_TASK_REVIEW_ACTIONS_LABELS = {
|
|
3236
|
-
approve: "Approve",
|
|
3237
|
-
requestChanges: "Request changes",
|
|
3238
|
-
feedbackLabel: "What should change?",
|
|
3239
|
-
feedbackPlaceholder: "Tell the agent what to fix. It continues in the same thread.",
|
|
3240
|
-
send: "Send back",
|
|
3241
|
-
cancel: "Cancel",
|
|
3242
|
-
askApproval: "Ask someone to approve",
|
|
3243
|
-
askApprovalPerson: "Who should approve this?",
|
|
3244
|
-
askApprovalSearch: "Search people\u2026",
|
|
3245
|
-
askApprovalEmpty: "No one to ask.",
|
|
3246
|
-
askApprovalNote: "Add a note (optional)",
|
|
3247
|
-
askApprovalSend: "Request approval"
|
|
3248
|
-
};
|
|
3249
|
-
function TaskReviewActions({
|
|
3250
|
-
id,
|
|
3251
|
-
busy = false,
|
|
3252
|
-
canRequestChanges = true,
|
|
3253
|
-
onApprove,
|
|
3254
|
-
onRequestChanges,
|
|
3255
|
-
onRequestApproval,
|
|
3256
|
-
people = [],
|
|
3257
|
-
compact = false,
|
|
3258
|
-
quiet = false,
|
|
3259
|
-
canApprove = true,
|
|
3260
|
-
labels
|
|
3261
|
-
}) {
|
|
3262
|
-
const l = { ...DEFAULT_TASK_REVIEW_ACTIONS_LABELS, ...labels };
|
|
3263
|
-
const [open, setOpen] = react.useState(false);
|
|
3264
|
-
const [feedback, setFeedback] = react.useState("");
|
|
3265
|
-
const trimmed = feedback.trim();
|
|
3266
|
-
const [askOpen, setAskOpen] = react.useState(false);
|
|
3267
|
-
const [person, setPerson] = react.useState("");
|
|
3268
|
-
const [note, setNote] = react.useState("");
|
|
3269
|
-
const canAsk = !!onRequestApproval && people.length > 0;
|
|
3270
|
-
const ask = () => {
|
|
3271
|
-
if (!person || !onRequestApproval) return;
|
|
3272
|
-
onRequestApproval(person, note.trim());
|
|
3273
|
-
setPerson("");
|
|
3274
|
-
setNote("");
|
|
3275
|
-
setAskOpen(false);
|
|
3276
|
-
};
|
|
3277
|
-
const send = () => {
|
|
3278
|
-
if (!trimmed) return;
|
|
3279
|
-
onRequestChanges(trimmed);
|
|
3280
|
-
setFeedback("");
|
|
3281
|
-
setOpen(false);
|
|
3282
|
-
};
|
|
3283
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", "data-slot": "task-review-actions", children: [
|
|
3284
|
-
canApprove && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3285
|
-
ui.Button,
|
|
3286
|
-
{
|
|
3287
|
-
size: "sm",
|
|
3288
|
-
variant: quiet ? "outline" : "default",
|
|
3289
|
-
className: "h-8 gap-1.5 pointer-coarse:h-11",
|
|
3290
|
-
disabled: busy,
|
|
3291
|
-
onClick: onApprove,
|
|
3292
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(void 0, { testId: `task-approve-${id}` }),
|
|
3293
|
-
children: [
|
|
3294
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-3.5", "aria-hidden": true }),
|
|
3295
|
-
l.approve
|
|
3296
|
-
]
|
|
3297
|
-
}
|
|
3298
|
-
),
|
|
3299
|
-
canRequestChanges && /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { open, onOpenChange: setOpen, children: [
|
|
3300
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3301
|
-
ui.Button,
|
|
3302
|
-
{
|
|
3303
|
-
size: "sm",
|
|
3304
|
-
variant: "outline",
|
|
3305
|
-
className: ui.cn(
|
|
3306
|
-
"h-8 gap-1.5 pointer-coarse:h-11",
|
|
3307
|
-
compact && "w-8 px-0 pointer-coarse:w-11"
|
|
3308
|
-
),
|
|
3309
|
-
disabled: busy,
|
|
3310
|
-
"aria-label": compact ? l.requestChanges : void 0,
|
|
3311
|
-
title: compact ? l.requestChanges : void 0,
|
|
3312
|
-
"data-testid": `task-request-changes-${id}`,
|
|
3313
|
-
children: [
|
|
3314
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageSquareReply, { className: "size-3.5", "aria-hidden": true }),
|
|
3315
|
-
!compact && l.requestChanges
|
|
3316
|
-
]
|
|
3317
|
-
}
|
|
3318
|
-
) }),
|
|
3319
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.PopoverContent, { align: "end", className: "w-80 space-y-2", children: [
|
|
3320
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: `task-feedback-${id}`, className: "text-sm font-medium", children: l.feedbackLabel }),
|
|
3321
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3322
|
-
ui.Textarea,
|
|
3323
|
-
{
|
|
3324
|
-
id: `task-feedback-${id}`,
|
|
3325
|
-
value: feedback,
|
|
3326
|
-
rows: 3,
|
|
3327
|
-
placeholder: l.feedbackPlaceholder,
|
|
3328
|
-
onChange: (e) => setFeedback(e.target.value),
|
|
3329
|
-
"data-testid": `task-feedback-${id}`
|
|
3330
|
-
}
|
|
3331
|
-
),
|
|
3332
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
3333
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "ghost", size: "sm", onClick: () => setOpen(false), children: l.cancel }),
|
|
3334
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3335
|
-
ui.Button,
|
|
3336
|
-
{
|
|
3337
|
-
size: "sm",
|
|
3338
|
-
disabled: !trimmed || busy,
|
|
3339
|
-
onClick: send,
|
|
3340
|
-
"data-testid": `task-send-changes-${id}`,
|
|
3341
|
-
children: l.send
|
|
3342
|
-
}
|
|
3343
|
-
)
|
|
3344
|
-
] })
|
|
3345
|
-
] })
|
|
3346
|
-
] }),
|
|
3347
|
-
canAsk && /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { open: askOpen, onOpenChange: setAskOpen, children: [
|
|
3348
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3349
|
-
ui.Button,
|
|
3350
|
-
{
|
|
3351
|
-
size: "sm",
|
|
3352
|
-
variant: "outline",
|
|
3353
|
-
className: ui.cn(
|
|
3354
|
-
"h-8 gap-1.5 pointer-coarse:h-11",
|
|
3355
|
-
compact && "w-8 px-0 pointer-coarse:w-11"
|
|
3356
|
-
),
|
|
3357
|
-
disabled: busy,
|
|
3358
|
-
"aria-label": compact ? l.askApproval : void 0,
|
|
3359
|
-
title: compact ? l.askApproval : void 0,
|
|
3360
|
-
"data-testid": `task-ask-approval-${id}`,
|
|
3361
|
-
children: [
|
|
3362
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCheck, { className: "size-3.5", "aria-hidden": true }),
|
|
3363
|
-
!compact && l.askApproval
|
|
3364
|
-
]
|
|
3365
|
-
}
|
|
3366
|
-
) }),
|
|
3367
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.PopoverContent, { align: "end", className: "w-72 space-y-2 p-2", children: [
|
|
3368
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 text-sm font-medium", children: l.askApprovalPerson }),
|
|
3369
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.Command, { className: "rounded-md border", children: [
|
|
3370
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3371
|
-
ui.CommandInput,
|
|
3372
|
-
{
|
|
3373
|
-
placeholder: l.askApprovalSearch,
|
|
3374
|
-
"data-testid": `task-ask-approval-search-${id}`
|
|
3375
|
-
}
|
|
3376
|
-
),
|
|
3377
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.CommandList, { className: "max-h-40", children: [
|
|
3378
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.CommandEmpty, { children: l.askApprovalEmpty }),
|
|
3379
|
-
people.map((p) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3380
|
-
ui.CommandItem,
|
|
3381
|
-
{
|
|
3382
|
-
value: p.label,
|
|
3383
|
-
onSelect: () => setPerson(p.id),
|
|
3384
|
-
"data-testid": `task-ask-approval-person-${id}-${p.id}`,
|
|
3385
|
-
children: [
|
|
3386
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", children: p.label }),
|
|
3387
|
-
p.id === person && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "ml-2 size-4 shrink-0", "aria-hidden": true })
|
|
3388
|
-
]
|
|
3389
|
-
},
|
|
3390
|
-
p.id
|
|
3391
|
-
))
|
|
3392
|
-
] })
|
|
3393
|
-
] }),
|
|
3394
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3395
|
-
ui.Textarea,
|
|
3396
|
-
{
|
|
3397
|
-
value: note,
|
|
3398
|
-
rows: 2,
|
|
3399
|
-
placeholder: l.askApprovalNote,
|
|
3400
|
-
onChange: (e) => setNote(e.target.value),
|
|
3401
|
-
"data-testid": `task-ask-approval-note-${id}`
|
|
3402
|
-
}
|
|
3403
|
-
),
|
|
3404
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
3405
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "ghost", size: "sm", onClick: () => setAskOpen(false), children: l.cancel }),
|
|
3406
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3407
|
-
ui.Button,
|
|
3408
|
-
{
|
|
3409
|
-
size: "sm",
|
|
3410
|
-
disabled: !person || busy,
|
|
3411
|
-
onClick: ask,
|
|
3412
|
-
"data-testid": `task-send-approval-${id}`,
|
|
3413
|
-
children: l.askApprovalSend
|
|
3414
|
-
}
|
|
3415
|
-
)
|
|
3416
|
-
] })
|
|
3417
|
-
] })
|
|
3418
|
-
] })
|
|
3419
|
-
] });
|
|
3420
|
-
}
|
|
3421
3212
|
function TaskRowMenu({
|
|
3422
3213
|
task,
|
|
3423
3214
|
status,
|
|
@@ -3436,11 +3227,9 @@ function TaskRowMenu({
|
|
|
3436
3227
|
onEdit,
|
|
3437
3228
|
onDelete,
|
|
3438
3229
|
onMoveTo,
|
|
3439
|
-
onChangeOwner,
|
|
3440
3230
|
onOpenActivity,
|
|
3441
3231
|
onToggleShared,
|
|
3442
|
-
onGrantAccess
|
|
3443
|
-
reviewActions
|
|
3232
|
+
onGrantAccess
|
|
3444
3233
|
}) {
|
|
3445
3234
|
const [open, setOpen] = react.useState(false);
|
|
3446
3235
|
const id = task.external_id;
|
|
@@ -3460,7 +3249,6 @@ function TaskRowMenu({
|
|
|
3460
3249
|
) }),
|
|
3461
3250
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuContent, { align: "end", children: [
|
|
3462
3251
|
onToggleSelected && /* @__PURE__ */ jsxRuntime.jsx(ui.DropdownMenuItem, { onSelect: onToggleSelected, "data-testid": `task-select-${id}`, children: selected ? "Deselect task" : "Select task" }),
|
|
3463
|
-
reviewActions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-1.5", children: typeof reviewActions === "function" ? reviewActions(() => setOpen(false)) : reviewActions }),
|
|
3464
3252
|
isOwner && onGrantAccess && task.pending_auth_request_id && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3465
3253
|
ui.DropdownMenuItem,
|
|
3466
3254
|
{
|
|
@@ -3505,10 +3293,6 @@ function TaskRowMenu({
|
|
|
3505
3293
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ListPlus, { className: "mr-2 size-4", "aria-hidden": true }),
|
|
3506
3294
|
labels.addSubtask
|
|
3507
3295
|
] }),
|
|
3508
|
-
canEdit && !isChat && onChangeOwner && /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuItem, { onSelect: onChangeOwner, "data-testid": `task-change-owner-${id}`, children: [
|
|
3509
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserRoundCog, { className: "mr-2 size-4", "aria-hidden": true }),
|
|
3510
|
-
labels.changeOwner
|
|
3511
|
-
] }),
|
|
3512
3296
|
canEdit && onMoveTo && /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuItem, { onSelect: onMoveTo, "data-testid": `task-move-${id}`, children: [
|
|
3513
3297
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CornerDownRight, { className: "mr-2 size-4", "aria-hidden": true }),
|
|
3514
3298
|
labels.moveTo
|
|
@@ -3547,8 +3331,6 @@ function StatusIcon({ status }) {
|
|
|
3547
3331
|
switch (status) {
|
|
3548
3332
|
case "generating":
|
|
3549
3333
|
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: `${ICON} animate-spin`, "aria-hidden": true });
|
|
3550
|
-
case "ready_for_review":
|
|
3551
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: ICON, "aria-hidden": true });
|
|
3552
3334
|
case "done":
|
|
3553
3335
|
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: ICON, "aria-hidden": true });
|
|
3554
3336
|
case "chat":
|
|
@@ -3623,7 +3405,7 @@ function TaskStatusPill({
|
|
|
3623
3405
|
}
|
|
3624
3406
|
|
|
3625
3407
|
// src/agents/tasks/taskColumns.tsx
|
|
3626
|
-
var ACTIONS_WIDTH =
|
|
3408
|
+
var ACTIONS_WIDTH = 160;
|
|
3627
3409
|
var NARROW_ACTIONS_WIDTH = 56;
|
|
3628
3410
|
var TASK_COLUMN_ORDER = [
|
|
3629
3411
|
"name",
|
|
@@ -3712,7 +3494,7 @@ function createTaskColumns(o) {
|
|
|
3712
3494
|
colId: "status",
|
|
3713
3495
|
...sortable,
|
|
3714
3496
|
headerName: l.colStatus,
|
|
3715
|
-
// Wide enough for "
|
|
3497
|
+
// Wide enough for "Generating" and "Waiting for access" in full, with the elapsed time.
|
|
3716
3498
|
flex: 1.3,
|
|
3717
3499
|
minWidth: 170,
|
|
3718
3500
|
valueGetter: (p) => p.data?.task.status ?? "",
|
|
@@ -3742,7 +3524,7 @@ function applyColumnWidthRules(api, gridWidth, rules) {
|
|
|
3742
3524
|
|
|
3743
3525
|
// src/agents/tasks/taskRows.ts
|
|
3744
3526
|
var MAX_TASK_DEPTH = 5;
|
|
3745
|
-
var ownerExtId = (task) => task.
|
|
3527
|
+
var ownerExtId = (task) => task.owner_ext_id || task.created_by_ext_id || null;
|
|
3746
3528
|
var isPlainTodo = (task) => !task.agent_ext_id && !task.has_agent_action && !task.skill_ref;
|
|
3747
3529
|
function indexTasks(tasks) {
|
|
3748
3530
|
const byId = new Map(tasks.map((t) => [t.external_id, t]));
|
|
@@ -3882,18 +3664,15 @@ function buildTaskRows(tasks, filter, collapsed, compare, options = {}) {
|
|
|
3882
3664
|
var DEFAULT_TASK_LIST_LABELS = {
|
|
3883
3665
|
filterAll: "All",
|
|
3884
3666
|
emptyTitle: "No tasks yet",
|
|
3885
|
-
emptyMessage: "Use New to add one: just type what you need, or
|
|
3667
|
+
emptyMessage: "Use New to add one: just type what you need, or add a due date. Automations that create tasks live on the Workflows page. You always decide when a task is done.",
|
|
3886
3668
|
noMatches: "No tasks match.",
|
|
3887
3669
|
due: (when) => when,
|
|
3888
3670
|
overdue: (when) => `${when} \xB7 overdue`,
|
|
3889
3671
|
agent: "Agent",
|
|
3890
3672
|
colTask: "Task",
|
|
3891
3673
|
colOwner: "Owner",
|
|
3892
|
-
ownerHint: "Who
|
|
3674
|
+
ownerHint: "Who created the task. They are notified when its run finishes.",
|
|
3893
3675
|
colOutputs: "Outputs",
|
|
3894
|
-
changeOwner: "Change owner\u2026",
|
|
3895
|
-
changeOwnerTitle: (name) => `Who has the next step on \u201C${name}\u201D?`,
|
|
3896
|
-
changeOwnerMe: "Me",
|
|
3897
3676
|
preparedBy: (agent) => `Prepared by ${agent}`,
|
|
3898
3677
|
colDue: "Due",
|
|
3899
3678
|
colStatus: "Status",
|
|
@@ -3913,9 +3692,8 @@ var DEFAULT_TASK_LIST_LABELS = {
|
|
|
3913
3692
|
markDone: "Mark done",
|
|
3914
3693
|
reopen: "Reopen",
|
|
3915
3694
|
markDoneMany: "Mark done",
|
|
3916
|
-
markDoneManyHint: "Marks
|
|
3695
|
+
markDoneManyHint: "Marks the selected tasks done.",
|
|
3917
3696
|
deleteMany: "Delete",
|
|
3918
|
-
approve: "Approve",
|
|
3919
3697
|
moveTo: "Move to\u2026",
|
|
3920
3698
|
untitled: "Untitled task",
|
|
3921
3699
|
fromWorkflow: (name) => `From \u201C${name}\u201D`,
|
|
@@ -3937,7 +3715,7 @@ var DEFAULT_TASK_LIST_LABELS = {
|
|
|
3937
3715
|
allowAccess: "Allow access",
|
|
3938
3716
|
moreActions: "More actions",
|
|
3939
3717
|
activity: "Activity",
|
|
3940
|
-
statusHint: (status, ago
|
|
3718
|
+
statusHint: (status, ago) => `${status} \xB7 ${ago}`,
|
|
3941
3719
|
status: {}
|
|
3942
3720
|
};
|
|
3943
3721
|
var ROW_HEIGHT = 56;
|
|
@@ -3953,16 +3731,12 @@ var WIDTH_RULES = [
|
|
|
3953
3731
|
{ colId: "status", minWidth: NARROW_GRID }
|
|
3954
3732
|
];
|
|
3955
3733
|
function statusHint(task, ctx) {
|
|
3956
|
-
const { props: p, l
|
|
3734
|
+
const { props: p, l } = ctx;
|
|
3957
3735
|
if (!p.formatRelative || !task.updated_at) return void 0;
|
|
3958
3736
|
const key = asTaskStatus(task.status);
|
|
3959
3737
|
const pill = { ...DEFAULT_TASK_STATUS_PILL_LABELS, ...p.statusPillLabels };
|
|
3960
3738
|
const label = task.pending_auth_request_id ? pill.waitingForAccess : STATUS_LABELS[key];
|
|
3961
|
-
return l.statusHint(
|
|
3962
|
-
label,
|
|
3963
|
-
p.formatRelative(task.updated_at),
|
|
3964
|
-
key === "ready_for_review" ? owner(task).label : void 0
|
|
3965
|
-
);
|
|
3739
|
+
return l.statusHint(label, p.formatRelative(task.updated_at));
|
|
3966
3740
|
}
|
|
3967
3741
|
function TaskTable(props) {
|
|
3968
3742
|
const { tasks: allTasks, isLoading, busyId, header, testId } = props;
|
|
@@ -3977,7 +3751,6 @@ function TaskTable(props) {
|
|
|
3977
3751
|
const [selectedIds, setSelectedIds] = react.useState(/* @__PURE__ */ new Set());
|
|
3978
3752
|
const [sort, setSort] = react.useState(null);
|
|
3979
3753
|
const [moving, setMoving] = react.useState(null);
|
|
3980
|
-
const [handingOff, setHandingOff] = react.useState(null);
|
|
3981
3754
|
const tasks = allTasks;
|
|
3982
3755
|
const apiRef = react.useRef(null);
|
|
3983
3756
|
const [narrow, setNarrow] = react.useState(false);
|
|
@@ -3990,7 +3763,7 @@ function TaskTable(props) {
|
|
|
3990
3763
|
const nameOf = (task) => task.title?.trim() || task.workflow_ext_id && props.workflowNames?.[task.workflow_ext_id] || l.untitled;
|
|
3991
3764
|
const owner = (task) => {
|
|
3992
3765
|
const id = ownerExtId(task);
|
|
3993
|
-
const mine = task.
|
|
3766
|
+
const mine = task.is_owner !== false;
|
|
3994
3767
|
return {
|
|
3995
3768
|
id,
|
|
3996
3769
|
label: mine ? l.me : (id && peopleNames.get(id)) ?? l.someone,
|
|
@@ -4297,51 +4070,7 @@ function TaskTable(props) {
|
|
|
4297
4070
|
const isOwner = task.is_owner !== false;
|
|
4298
4071
|
const canEdit = isOwner || Boolean(p.canEditShared);
|
|
4299
4072
|
const canAdmin = isOwner || Boolean(p.isWorkspaceOwner);
|
|
4300
|
-
const canAskReview = status !== "done" && status !== "chat" && canEdit && Boolean(p.onRequestApproval && p.people?.length);
|
|
4301
|
-
const reviewActions = (closeMenu) => status === "ready_for_review" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4302
|
-
TaskReviewActions,
|
|
4303
|
-
{
|
|
4304
|
-
id,
|
|
4305
|
-
busy,
|
|
4306
|
-
quiet: true,
|
|
4307
|
-
canApprove: task.signoff_ext_id ? Boolean(task.can_signoff) : isOwner,
|
|
4308
|
-
canRequestChanges: Boolean(task.agent_ext_id || task.has_agent_action || task.skill_ref) && canEdit,
|
|
4309
|
-
onApprove: () => {
|
|
4310
|
-
p.onApprove(task);
|
|
4311
|
-
closeMenu?.();
|
|
4312
|
-
},
|
|
4313
|
-
onRequestChanges: (feedback) => {
|
|
4314
|
-
p.onRequestChanges(task, feedback);
|
|
4315
|
-
closeMenu?.();
|
|
4316
|
-
},
|
|
4317
|
-
onRequestApproval: p.onRequestApproval ? (userId, note) => {
|
|
4318
|
-
p.onRequestApproval?.(task, userId, note);
|
|
4319
|
-
closeMenu?.();
|
|
4320
|
-
} : void 0,
|
|
4321
|
-
people: p.people,
|
|
4322
|
-
compact: true,
|
|
4323
|
-
labels: p.reviewLabels
|
|
4324
|
-
}
|
|
4325
|
-
) : canAskReview ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4326
|
-
TaskReviewActions,
|
|
4327
|
-
{
|
|
4328
|
-
id,
|
|
4329
|
-
busy,
|
|
4330
|
-
canApprove: false,
|
|
4331
|
-
canRequestChanges: false,
|
|
4332
|
-
onApprove: () => void 0,
|
|
4333
|
-
onRequestChanges: () => void 0,
|
|
4334
|
-
onRequestApproval: (userId, note) => {
|
|
4335
|
-
p.onRequestApproval?.(task, userId, note);
|
|
4336
|
-
closeMenu?.();
|
|
4337
|
-
},
|
|
4338
|
-
people: p.people,
|
|
4339
|
-
compact: true,
|
|
4340
|
-
labels: p.reviewLabels
|
|
4341
|
-
}
|
|
4342
|
-
) : null;
|
|
4343
4073
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-2", children: [
|
|
4344
|
-
!latest.current.narrow && reviewActions(),
|
|
4345
4074
|
!latest.current.narrow && isOwner && task.pending_auth_request_id && p.onGrantAccess && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4346
4075
|
ui.Button,
|
|
4347
4076
|
{
|
|
@@ -4358,7 +4087,6 @@ function TaskTable(props) {
|
|
|
4358
4087
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4359
4088
|
TaskRowMenu,
|
|
4360
4089
|
{
|
|
4361
|
-
reviewActions: latest.current.narrow && (status === "ready_for_review" || canAskReview) ? reviewActions : void 0,
|
|
4362
4090
|
task,
|
|
4363
4091
|
status,
|
|
4364
4092
|
busy,
|
|
@@ -4370,7 +4098,6 @@ function TaskTable(props) {
|
|
|
4370
4098
|
onReopen: () => p.onReopen(task),
|
|
4371
4099
|
onAddSubtask: p.onAddSubtask ? () => p.onAddSubtask?.(task) : void 0,
|
|
4372
4100
|
onMoveTo: p.onMove ? () => setMoving(task) : void 0,
|
|
4373
|
-
onChangeOwner: p.onChangeOwner && p.people?.length ? () => setHandingOff(task) : void 0,
|
|
4374
4101
|
onEdit: () => p.onEdit(task),
|
|
4375
4102
|
onDelete: () => p.onDelete(task),
|
|
4376
4103
|
onOpenActivity: p.onOpenActivity ? () => p.onOpenActivity?.(task) : void 0,
|
|
@@ -4609,24 +4336,6 @@ function TaskTable(props) {
|
|
|
4609
4336
|
] })
|
|
4610
4337
|
}
|
|
4611
4338
|
),
|
|
4612
|
-
handingOff && props.onChangeOwner && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4613
|
-
TaskMoveDialog,
|
|
4614
|
-
{
|
|
4615
|
-
open: true,
|
|
4616
|
-
onOpenChange: (open) => !open && setHandingOff(null),
|
|
4617
|
-
options: (props.people ?? []).map((p) => ({ id: p.id, label: p.label })),
|
|
4618
|
-
currentParentId: handingOff.signoff_ext_id,
|
|
4619
|
-
onPick: (userId) => props.onChangeOwner?.(handingOff, userId),
|
|
4620
|
-
labels: {
|
|
4621
|
-
title: l.changeOwnerTitle(nameOf(handingOff)),
|
|
4622
|
-
none: l.changeOwnerMe,
|
|
4623
|
-
search: l.moveToSearch,
|
|
4624
|
-
empty: l.moveToEmpty,
|
|
4625
|
-
cancel: l.moveToCancel
|
|
4626
|
-
},
|
|
4627
|
-
testId: "task-owner"
|
|
4628
|
-
}
|
|
4629
|
-
),
|
|
4630
4339
|
moving && props.onMove && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4631
4340
|
TaskMoveDialog,
|
|
4632
4341
|
{
|
|
@@ -4658,7 +4367,6 @@ function TaskInbox(p) {
|
|
|
4658
4367
|
const [selected, setSelected] = react.useState(/* @__PURE__ */ new Set());
|
|
4659
4368
|
const [collapsed, setCollapsed] = react.useState(/* @__PURE__ */ new Set());
|
|
4660
4369
|
const [moving, setMoving] = react.useState(null);
|
|
4661
|
-
const [handingOff, setHandingOff] = react.useState(null);
|
|
4662
4370
|
const l = { ...DEFAULT_TASK_LIST_LABELS, ...p.labels };
|
|
4663
4371
|
const nameOf = (t) => t.title?.trim() || t.workflow_ext_id && p.workflowNames?.[t.workflow_ext_id] || l.untitled;
|
|
4664
4372
|
const all = p.tasks.filter((t) => t.status != null);
|
|
@@ -4707,7 +4415,7 @@ function TaskInbox(p) {
|
|
|
4707
4415
|
});
|
|
4708
4416
|
const workflowIds = new Set(workflows.map((w) => w.external_id));
|
|
4709
4417
|
const order = (a, b) => {
|
|
4710
|
-
const weight = (t) => t.pending_auth_request_id || t.last_error ? 0 : t.status === "
|
|
4418
|
+
const weight = (t) => t.pending_auth_request_id || t.last_error ? 0 : t.status === "todo" ? 1 : t.status === "generating" ? 2 : 3;
|
|
4711
4419
|
return weight(a) - weight(b) || (b.updated_at ?? "").localeCompare(a.updated_at ?? "");
|
|
4712
4420
|
};
|
|
4713
4421
|
const renderTask = (task, depth = 0) => {
|
|
@@ -4758,7 +4466,7 @@ function TaskInbox(p) {
|
|
|
4758
4466
|
}
|
|
4759
4467
|
),
|
|
4760
4468
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground", children: [
|
|
4761
|
-
status !== "todo" &&
|
|
4469
|
+
status !== "todo" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4762
4470
|
TaskStatusPill,
|
|
4763
4471
|
{
|
|
4764
4472
|
id,
|
|
@@ -4807,21 +4515,6 @@ function TaskInbox(p) {
|
|
|
4807
4515
|
children: "Allow access"
|
|
4808
4516
|
}
|
|
4809
4517
|
),
|
|
4810
|
-
p.onRequestApproval && status !== "done" && canEdit(task) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4811
|
-
TaskReviewActions,
|
|
4812
|
-
{
|
|
4813
|
-
id,
|
|
4814
|
-
busy,
|
|
4815
|
-
compact: true,
|
|
4816
|
-
canApprove: false,
|
|
4817
|
-
canRequestChanges: false,
|
|
4818
|
-
onApprove: () => void 0,
|
|
4819
|
-
onRequestChanges: () => void 0,
|
|
4820
|
-
onRequestApproval: (userId, note) => p.onRequestApproval?.(task, userId, note),
|
|
4821
|
-
people: p.people,
|
|
4822
|
-
labels: p.reviewLabels
|
|
4823
|
-
}
|
|
4824
|
-
),
|
|
4825
4518
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4826
4519
|
TaskRowMenu,
|
|
4827
4520
|
{
|
|
@@ -4842,7 +4535,6 @@ function TaskInbox(p) {
|
|
|
4842
4535
|
onEdit: () => p.onEdit(task),
|
|
4843
4536
|
onAddSubtask: p.onAddSubtask ? () => p.onAddSubtask?.(task) : void 0,
|
|
4844
4537
|
onMoveTo: p.onMove ? () => setMoving(task) : void 0,
|
|
4845
|
-
onChangeOwner: status !== "ready_for_review" && p.onChangeOwner && p.people?.length ? () => setHandingOff(task) : void 0,
|
|
4846
4538
|
onOpenActivity: p.onOpenActivity ? () => p.onOpenActivity?.(task) : void 0,
|
|
4847
4539
|
onToggleShared: p.onToggleShared ? () => p.onToggleShared?.(task, !task.is_shared) : void 0
|
|
4848
4540
|
}
|
|
@@ -4907,20 +4599,13 @@ function TaskInbox(p) {
|
|
|
4907
4599
|
label: "Generating",
|
|
4908
4600
|
count: all.filter((t) => t.status === "generating").length
|
|
4909
4601
|
},
|
|
4910
|
-
{
|
|
4911
|
-
id: "ready_for_review",
|
|
4912
|
-
label: "Ready for review",
|
|
4913
|
-
count: all.filter((t) => t.status === "ready_for_review").length
|
|
4914
|
-
},
|
|
4915
4602
|
{
|
|
4916
4603
|
id: "done",
|
|
4917
4604
|
label: "Completed",
|
|
4918
4605
|
count: all.filter((t) => t.status === "done").length
|
|
4919
4606
|
}
|
|
4920
4607
|
],
|
|
4921
|
-
groups: [
|
|
4922
|
-
{ label: "Status", options: ["todo", "generating", "ready_for_review", "done"] }
|
|
4923
|
-
],
|
|
4608
|
+
groups: [{ label: "Status", options: ["todo", "generating", "done"] }],
|
|
4924
4609
|
triggerClassName: "flex h-5 items-center gap-0.5 rounded px-1 text-muted-foreground hover:text-foreground pointer-coarse:h-11! pointer-coarse:min-w-11 pointer-coarse:justify-center",
|
|
4925
4610
|
renderChevron: true,
|
|
4926
4611
|
disableHoverOpen: true
|
|
@@ -4945,7 +4630,7 @@ function TaskInbox(p) {
|
|
|
4945
4630
|
chunkZW6FPIFC_cjs.EmptyState,
|
|
4946
4631
|
{
|
|
4947
4632
|
title: q ? "No matches" : all.length ? "You\u2019re all caught up" : "No work here yet",
|
|
4948
|
-
description: "Create a task from a prompt or a saved workflow. Keep its drafts
|
|
4633
|
+
description: "Create a task from a prompt or a saved workflow. Keep its drafts and outputs together."
|
|
4949
4634
|
}
|
|
4950
4635
|
) : /* @__PURE__ */ jsxRuntime.jsxs("ul", { children: [
|
|
4951
4636
|
workflows.map((w) => {
|
|
@@ -5059,24 +4744,6 @@ function TaskInbox(p) {
|
|
|
5059
4744
|
cancel: l.moveToCancel
|
|
5060
4745
|
}
|
|
5061
4746
|
}
|
|
5062
|
-
),
|
|
5063
|
-
handingOff && p.onChangeOwner && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5064
|
-
TaskMoveDialog,
|
|
5065
|
-
{
|
|
5066
|
-
open: true,
|
|
5067
|
-
onOpenChange: (open) => !open && setHandingOff(null),
|
|
5068
|
-
options: p.people ?? [],
|
|
5069
|
-
currentParentId: handingOff.signoff_ext_id,
|
|
5070
|
-
onPick: (id) => p.onChangeOwner?.(handingOff, id),
|
|
5071
|
-
labels: {
|
|
5072
|
-
title: l.changeOwnerTitle(nameOf(handingOff)),
|
|
5073
|
-
none: l.changeOwnerMe,
|
|
5074
|
-
search: l.moveToSearch,
|
|
5075
|
-
empty: l.moveToEmpty,
|
|
5076
|
-
cancel: l.moveToCancel
|
|
5077
|
-
},
|
|
5078
|
-
testId: "task-owner"
|
|
5079
|
-
}
|
|
5080
4747
|
)
|
|
5081
4748
|
] });
|
|
5082
4749
|
}
|
|
@@ -5338,13 +5005,11 @@ function ConversationListView(p) {
|
|
|
5338
5005
|
] });
|
|
5339
5006
|
}
|
|
5340
5007
|
var NO_PEOPLE = [];
|
|
5341
|
-
var NO_ASSIGNEES = [];
|
|
5342
5008
|
function TaskStartDialog({
|
|
5343
5009
|
open,
|
|
5344
5010
|
onOpenChange,
|
|
5345
5011
|
workflows,
|
|
5346
5012
|
people = NO_PEOPLE,
|
|
5347
|
-
assignees = NO_ASSIGNEES,
|
|
5348
5013
|
isPending,
|
|
5349
5014
|
error,
|
|
5350
5015
|
startLabel,
|
|
@@ -5355,14 +5020,12 @@ function TaskStartDialog({
|
|
|
5355
5020
|
const [choice, setChoice] = react.useState("prompt");
|
|
5356
5021
|
const [shared, setShared] = react.useState(false);
|
|
5357
5022
|
const [sourceOpen, setSourceOpen] = react.useState(false);
|
|
5358
|
-
const [assignee, setAssignee] = react.useState("");
|
|
5359
5023
|
react.useEffect(() => {
|
|
5360
5024
|
if (open) return;
|
|
5361
5025
|
setPrompt("");
|
|
5362
5026
|
setChoice("prompt");
|
|
5363
5027
|
setShared(false);
|
|
5364
5028
|
setSourceOpen(false);
|
|
5365
|
-
setAssignee("");
|
|
5366
5029
|
}, [open]);
|
|
5367
5030
|
const textareaRef = react.useRef(null);
|
|
5368
5031
|
const mention = chunkV3L5DONY_cjs.useMentionAutocomplete({
|
|
@@ -5374,16 +5037,13 @@ function TaskStartDialog({
|
|
|
5374
5037
|
const todo = choice === "todo";
|
|
5375
5038
|
const promptHint = todo ? "What needs doing?" : "What should ARBI do?";
|
|
5376
5039
|
const workflowId = choice === "prompt" || todo ? null : choice;
|
|
5377
|
-
const assigneeId = todo ? assignee : "";
|
|
5378
|
-
const sharedNow = shared || assigneeId !== "";
|
|
5379
5040
|
const valid = workflowId ? workflows.some((w) => w.external_id === workflowId) : Boolean(prompt.trim());
|
|
5380
5041
|
const values = {
|
|
5381
5042
|
prompt: prompt.trim(),
|
|
5382
5043
|
workflowId,
|
|
5383
5044
|
todo,
|
|
5384
|
-
shared
|
|
5385
|
-
mentions: chunk7UTB4PHM_cjs.toMessageMentions(chunk7UTB4PHM_cjs.extractMentions(prompt, people))
|
|
5386
|
-
...assigneeId ? { assigneeId } : {}
|
|
5045
|
+
shared,
|
|
5046
|
+
mentions: chunk7UTB4PHM_cjs.toMessageMentions(chunk7UTB4PHM_cjs.extractMentions(prompt, people))
|
|
5387
5047
|
};
|
|
5388
5048
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { modal: false, open, onOpenChange: (next) => !isPending && onOpenChange(next), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5389
5049
|
ui.DialogContent,
|
|
@@ -5465,39 +5125,12 @@ function TaskStartDialog({
|
|
|
5465
5125
|
),
|
|
5466
5126
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.SelectContent, { children: [
|
|
5467
5127
|
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "prompt", children: "With ARBI" }),
|
|
5468
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "todo", children: "
|
|
5128
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "todo", children: "To-do" }),
|
|
5469
5129
|
workflows.map((workflow) => /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: workflow.external_id, children: workflow.name }, workflow.external_id))
|
|
5470
5130
|
] })
|
|
5471
5131
|
]
|
|
5472
5132
|
}
|
|
5473
5133
|
),
|
|
5474
|
-
todo && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
5475
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Assigned to" }),
|
|
5476
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5477
|
-
ui.Select,
|
|
5478
|
-
{
|
|
5479
|
-
value: assigneeId || "me",
|
|
5480
|
-
onValueChange: (next) => setAssignee(next === "me" ? "" : next),
|
|
5481
|
-
disabled: isPending,
|
|
5482
|
-
children: [
|
|
5483
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5484
|
-
ui.SelectTrigger,
|
|
5485
|
-
{
|
|
5486
|
-
id: "task-start-assignee",
|
|
5487
|
-
"aria-label": "Assigned to",
|
|
5488
|
-
className: "h-7 w-auto max-w-full border-0 bg-transparent px-1 text-xs font-normal text-foreground shadow-none hover:bg-muted",
|
|
5489
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ui.SelectValue, {})
|
|
5490
|
-
}
|
|
5491
|
-
),
|
|
5492
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.SelectContent, { children: [
|
|
5493
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "me", children: "Me" }),
|
|
5494
|
-
assignees.map((person) => /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: person.id, children: person.label }, person.id))
|
|
5495
|
-
] })
|
|
5496
|
-
]
|
|
5497
|
-
}
|
|
5498
|
-
)
|
|
5499
|
-
] }),
|
|
5500
|
-
todo && assignees.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: "Invite a workspace collaborator to assign this to them." }),
|
|
5501
5134
|
error && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "mt-3 text-sm text-destructive", children: error })
|
|
5502
5135
|
] }),
|
|
5503
5136
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2 border-t px-3 py-2", children: [
|
|
@@ -5516,10 +5149,10 @@ function TaskStartDialog({
|
|
|
5516
5149
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5517
5150
|
ui.VisibilityToggle,
|
|
5518
5151
|
{
|
|
5519
|
-
items: { shared
|
|
5152
|
+
items: { shared },
|
|
5520
5153
|
onToggle: setShared,
|
|
5521
|
-
label:
|
|
5522
|
-
disabled: isPending
|
|
5154
|
+
label: shared ? "Workspace" : "Only Me",
|
|
5155
|
+
disabled: isPending,
|
|
5523
5156
|
"data-testid": "task-start-visibility"
|
|
5524
5157
|
}
|
|
5525
5158
|
),
|
|
@@ -5535,7 +5168,7 @@ function TaskStartDialog({
|
|
|
5535
5168
|
} catch {
|
|
5536
5169
|
}
|
|
5537
5170
|
},
|
|
5538
|
-
children: isPending ? "Starting\u2026" : startLabel ? startLabel : todo ?
|
|
5171
|
+
children: isPending ? "Starting\u2026" : startLabel ? startLabel : todo ? "Create task" : "Start now"
|
|
5539
5172
|
}
|
|
5540
5173
|
)
|
|
5541
5174
|
] })
|
|
@@ -5774,7 +5407,6 @@ function composerToWorkRequest({ workflow, values, plan, documentTitles }, works
|
|
|
5774
5407
|
description: values.description.trim(),
|
|
5775
5408
|
due_at: values.dueAt ? localInputToIso(values.dueAt) : null,
|
|
5776
5409
|
parent_conversation_ext_id: values.parentTaskId || null,
|
|
5777
|
-
signoff_user_ext_id: values.signoffUserId || null,
|
|
5778
5410
|
shared: values.shared
|
|
5779
5411
|
};
|
|
5780
5412
|
if (values.assignee === "me") {
|
|
@@ -5817,7 +5449,6 @@ function composerToTaskQuery({ workflow, values, plan, documentTitles }, workspa
|
|
|
5817
5449
|
title: fields.name,
|
|
5818
5450
|
description: values.description.trim(),
|
|
5819
5451
|
due_at: values.dueAt ? localInputToIso(values.dueAt) : null,
|
|
5820
|
-
signoff_user_ext_id: values.signoffUserId || null,
|
|
5821
5452
|
parent_conversation_ext_id: values.parentTaskId || null,
|
|
5822
5453
|
shared: values.shared,
|
|
5823
5454
|
...fields.skill_ref === null && fields.prompt && plan ? { plan } : {}
|
|
@@ -5853,7 +5484,6 @@ function composerToWorkflowRequest({ workflow, values, plan, documentTitles }, w
|
|
|
5853
5484
|
skill_inputs: fields.skill_inputs,
|
|
5854
5485
|
agent_ext_id: values.agentId || null,
|
|
5855
5486
|
auth_mode: authModeFor(values),
|
|
5856
|
-
signoff_user_ext_id: values.signoffUserId || null,
|
|
5857
5487
|
workspace_ext_id: workspaceId,
|
|
5858
5488
|
// The plan grades every run of a free-instruction workflow (a skill's run is not a goal run).
|
|
5859
5489
|
...fields.skill_ref === null && fields.prompt && plan ? { plan } : {}
|
|
@@ -5874,7 +5504,6 @@ function taskComposerToUpdateRequest({
|
|
|
5874
5504
|
description: values.description.trim(),
|
|
5875
5505
|
due_at: values.dueAt ? localInputToIso(values.dueAt) : null,
|
|
5876
5506
|
shared: values.shared,
|
|
5877
|
-
...values.signoffUserId ? { signoff_user_ext_id: values.signoffUserId } : {},
|
|
5878
5507
|
parent_conversation_ext_id: values.parentTaskId || null,
|
|
5879
5508
|
...plan !== void 0 ? { plan } : {}
|
|
5880
5509
|
};
|
|
@@ -5898,7 +5527,6 @@ function composerToWorkflowUpdate({
|
|
|
5898
5527
|
skill_inputs: fields.skill_inputs,
|
|
5899
5528
|
agent_ext_id: values.agentId || null,
|
|
5900
5529
|
auth_mode: authModeFor(values),
|
|
5901
|
-
signoff_user_ext_id: values.signoffUserId || null,
|
|
5902
5530
|
// Omission preserves the plan; explicit null removes a stored free-instruction plan.
|
|
5903
5531
|
...fields.skill_ref === null && fields.prompt && plan !== void 0 ? { plan } : {}
|
|
5904
5532
|
};
|
|
@@ -5912,7 +5540,6 @@ function taskToComposerValues(task, workflows) {
|
|
|
5912
5540
|
inputs: {},
|
|
5913
5541
|
when: "now",
|
|
5914
5542
|
parentTaskId: task.parent_conversation_ext_id ?? "",
|
|
5915
|
-
signoffUserId: task.signoff_ext_id && task.signoff_ext_id !== task.owner_ext_id ? task.signoff_ext_id : "",
|
|
5916
5543
|
shared: task.is_shared ?? true,
|
|
5917
5544
|
description: task.description ?? "",
|
|
5918
5545
|
dueAt: isoToLocalInput(task.due_at),
|
|
@@ -5939,7 +5566,6 @@ function workflowToComposerValues(workflow, workflows) {
|
|
|
5939
5566
|
eventKind: workflow.event_kind ?? "user_message",
|
|
5940
5567
|
eventFilter: workflow.event_filter ?? null,
|
|
5941
5568
|
afterTaskId: workflow.after_conversation_ext_id ?? "",
|
|
5942
|
-
signoffUserId: workflow.signoff_ext_id && workflow.signoff_ext_id !== workflow.owner_ext_id ? workflow.signoff_ext_id : "",
|
|
5943
5569
|
shared: workflow.shared,
|
|
5944
5570
|
description: workflow.description ?? "",
|
|
5945
5571
|
agentId: workflow.agent_ext_id ?? "",
|
|
@@ -5989,12 +5615,11 @@ var EMPTY_NEW_THREAD = {
|
|
|
5989
5615
|
prompt: "",
|
|
5990
5616
|
title: "",
|
|
5991
5617
|
shared: false,
|
|
5992
|
-
ownerId: "",
|
|
5993
5618
|
dueAt: "",
|
|
5994
5619
|
parentId: "",
|
|
5995
5620
|
assistant: true
|
|
5996
5621
|
};
|
|
5997
|
-
var hasTaskFields = (v) => Boolean(v.
|
|
5622
|
+
var hasTaskFields = (v) => Boolean(v.dueAt || v.parentId);
|
|
5998
5623
|
function titleFromPrompt(prompt, max = 80) {
|
|
5999
5624
|
const first = prompt.trim().split("\n")[0].trim();
|
|
6000
5625
|
return first.length > max ? `${first.slice(0, max - 1).trimEnd()}\u2026` : first;
|
|
@@ -6005,7 +5630,6 @@ function newThreadToRequest(values) {
|
|
|
6005
5630
|
const task = {
|
|
6006
5631
|
...title ? { title } : {},
|
|
6007
5632
|
due_at: values.dueAt ? localInputToIso(values.dueAt) : null,
|
|
6008
|
-
signoff_user_ext_id: values.ownerId || null,
|
|
6009
5633
|
parent_conversation_ext_id: values.parentId || null,
|
|
6010
5634
|
shared: values.shared
|
|
6011
5635
|
};
|
|
@@ -6023,7 +5647,7 @@ function newThreadToRequest(values) {
|
|
|
6023
5647
|
}
|
|
6024
5648
|
var DEFAULT_NEW_THREAD_DIALOG_LABELS = {
|
|
6025
5649
|
title: "New",
|
|
6026
|
-
description: "Ask for anything, like a normal chat: the assistant gets on it. Add
|
|
5650
|
+
description: "Ask for anything, like a normal chat: the assistant gets on it. Add a due date if it matters.",
|
|
6027
5651
|
promptLabel: "What do you want to ask or get done?",
|
|
6028
5652
|
promptPlaceholder: "Ask a question, or describe what needs doing\u2026",
|
|
6029
5653
|
titleLabel: "Title",
|
|
@@ -6032,8 +5656,6 @@ var DEFAULT_NEW_THREAD_DIALOG_LABELS = {
|
|
|
6032
5656
|
taskDetails: "Task details",
|
|
6033
5657
|
files: (count) => count === 0 ? "No files in this workspace yet: answers come from general knowledge." : `Can use the ${count} file${count === 1 ? "" : "s"} in this workspace.`,
|
|
6034
5658
|
taskDetailsHint: "Optional.",
|
|
6035
|
-
owner: "Owner",
|
|
6036
|
-
ownerMe: "Me",
|
|
6037
5659
|
due: "Due",
|
|
6038
5660
|
dueNone: "No date",
|
|
6039
5661
|
dueClear: "Clear date",
|
|
@@ -6063,7 +5685,6 @@ function formatDue(local) {
|
|
|
6063
5685
|
function NewThreadDialog({
|
|
6064
5686
|
open,
|
|
6065
5687
|
onOpenChange,
|
|
6066
|
-
people,
|
|
6067
5688
|
tasks = [],
|
|
6068
5689
|
initialValues,
|
|
6069
5690
|
fileCount,
|
|
@@ -6086,12 +5707,6 @@ function NewThreadDialog({
|
|
|
6086
5707
|
const set = (key, value) => setValues((v) => ({ ...v, [key]: value }));
|
|
6087
5708
|
const canSubmit = values.prompt.trim() !== "" && !isPending;
|
|
6088
5709
|
const pillLabels = { search: l.search, empty: l.empty };
|
|
6089
|
-
const personOptions = (people ?? []).map((p) => ({
|
|
6090
|
-
id: p.id,
|
|
6091
|
-
label: p.label,
|
|
6092
|
-
description: p.description,
|
|
6093
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(PersonAvatar, { person: { id: p.id, label: p.label } })
|
|
6094
|
-
}));
|
|
6095
5710
|
const taskOptions = tasks.map((t) => ({
|
|
6096
5711
|
id: t.id,
|
|
6097
5712
|
label: t.name,
|
|
@@ -6195,20 +5810,6 @@ function NewThreadDialog({
|
|
|
6195
5810
|
detailsOpen && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", "data-testid": `${id}-details`, children: [
|
|
6196
5811
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: l.taskDetailsHint }),
|
|
6197
5812
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
6198
|
-
people !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6199
|
-
PillSelect,
|
|
6200
|
-
{
|
|
6201
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCheck, { className: GLYPH, "aria-hidden": true }),
|
|
6202
|
-
prefix: l.owner,
|
|
6203
|
-
value: values.ownerId,
|
|
6204
|
-
options: personOptions,
|
|
6205
|
-
noneOption: { id: "", label: l.ownerMe },
|
|
6206
|
-
onChange: (v) => set("ownerId", v),
|
|
6207
|
-
searchable: personOptions.length > 6,
|
|
6208
|
-
labels: pillLabels,
|
|
6209
|
-
testId: `${id}-owner`
|
|
6210
|
-
}
|
|
6211
|
-
),
|
|
6212
5813
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { children: [
|
|
6213
5814
|
/* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6214
5815
|
ui.EntityPill,
|
|
@@ -6362,14 +5963,11 @@ function workflowRunStatusLabel(status) {
|
|
|
6362
5963
|
success: "Success",
|
|
6363
5964
|
failed: "Failed",
|
|
6364
5965
|
running: "In progress",
|
|
6365
|
-
awaiting_review: "Waiting for review",
|
|
6366
5966
|
awaiting_authorization: "Awaiting access"
|
|
6367
5967
|
};
|
|
6368
5968
|
return labels[status] ?? status.replaceAll("_", " ");
|
|
6369
5969
|
}
|
|
6370
5970
|
function listedRunStatus(status, threadStatus) {
|
|
6371
|
-
if (threadStatus === "ready_for_review" && (status === "running" || status === "completed"))
|
|
6372
|
-
return "awaiting_review";
|
|
6373
5971
|
if (threadStatus === "done" && status === "running") return "completed";
|
|
6374
5972
|
return status;
|
|
6375
5973
|
}
|
|
@@ -6976,14 +6574,9 @@ var DEFAULT_TASK_ACTIVITY_LABELS = {
|
|
|
6976
6574
|
runStartedBy: (agent) => `Run started by ${agent}`,
|
|
6977
6575
|
awaitingAccess: "Waiting for access",
|
|
6978
6576
|
accessGranted: "Access granted",
|
|
6979
|
-
readyForReview: "Ready for review",
|
|
6980
|
-
handedOff: "Handed off",
|
|
6981
|
-
changesRequested: "Asked for changes",
|
|
6982
6577
|
done: "Marked done",
|
|
6983
6578
|
reopened: "Reopened",
|
|
6984
6579
|
failed: "Run failed",
|
|
6985
|
-
handedOverNote: (note) => `Handed over: \u201C${note}\u201D`,
|
|
6986
|
-
sentBackNote: (note) => `Asked: \u201C${note}\u201D`,
|
|
6987
6580
|
failureLine: (error) => error,
|
|
6988
6581
|
system: "System"
|
|
6989
6582
|
};
|
|
@@ -6992,10 +6585,6 @@ var ICONS = {
|
|
|
6992
6585
|
run_started: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { className: "size-3.5", "aria-hidden": true }),
|
|
6993
6586
|
awaiting_access: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { className: "size-3.5", "aria-hidden": true }),
|
|
6994
6587
|
access_granted: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, { className: "size-3.5", "aria-hidden": true }),
|
|
6995
|
-
ready_for_review: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleDot, { className: "size-3.5", "aria-hidden": true }),
|
|
6996
|
-
reviewed: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "size-3.5", "aria-hidden": true }),
|
|
6997
|
-
handed_off: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserRoundCog, { className: "size-3.5", "aria-hidden": true }),
|
|
6998
|
-
changes_requested: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageSquareReply, { className: "size-3.5", "aria-hidden": true }),
|
|
6999
6588
|
done: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "size-3.5", "aria-hidden": true }),
|
|
7000
6589
|
reopened: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RotateCcw, { className: "size-3.5", "aria-hidden": true }),
|
|
7001
6590
|
failed: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: "size-3.5", "aria-hidden": true }),
|
|
@@ -7026,7 +6615,6 @@ function TaskActivityTimeline({
|
|
|
7026
6615
|
const base = chunkMHVNT4J3_cjs.testIdOr(testId, { testId: "task-activity" });
|
|
7027
6616
|
const describe = (e) => {
|
|
7028
6617
|
const detail = e.detail ?? {};
|
|
7029
|
-
const note = asString(e.note);
|
|
7030
6618
|
const agentId = asString(detail.agent_ext_id);
|
|
7031
6619
|
const agent = agentId ? agentName?.(agentId) : void 0;
|
|
7032
6620
|
switch (e.kind) {
|
|
@@ -7054,22 +6642,8 @@ function TaskActivityTimeline({
|
|
|
7054
6642
|
return { headline: l.awaitingAccess };
|
|
7055
6643
|
case "access_granted":
|
|
7056
6644
|
return { headline: l.accessGranted };
|
|
7057
|
-
case "ready_for_review":
|
|
7058
|
-
return { headline: l.readyForReview };
|
|
7059
|
-
case "reviewed":
|
|
7060
|
-
return { headline: "Approved this review stage" };
|
|
7061
|
-
case "handed_off":
|
|
7062
|
-
return {
|
|
7063
|
-
headline: l.handedOff,
|
|
7064
|
-
extra: note ? /* @__PURE__ */ jsxRuntime.jsx(Quote, { text: l.handedOverNote(note) }) : void 0
|
|
7065
|
-
};
|
|
7066
|
-
case "changes_requested":
|
|
7067
|
-
return {
|
|
7068
|
-
headline: l.changesRequested,
|
|
7069
|
-
extra: note ? /* @__PURE__ */ jsxRuntime.jsx(Quote, { text: l.sentBackNote(note) }) : void 0
|
|
7070
|
-
};
|
|
7071
6645
|
case "done":
|
|
7072
|
-
return { headline: l.done
|
|
6646
|
+
return { headline: l.done };
|
|
7073
6647
|
case "reopened":
|
|
7074
6648
|
return { headline: l.reopened };
|
|
7075
6649
|
case "failed": {
|
|
@@ -7107,17 +6681,6 @@ function TaskActivityTimeline({
|
|
|
7107
6681
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1 text-sm", children: [
|
|
7108
6682
|
e.actor_ext_id ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex", "data-testid": `${base}-actor-${e.external_id}`, children: renderPerson(e.actor_ext_id) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: l.system }),
|
|
7109
6683
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: headline }),
|
|
7110
|
-
e.kind === "handed_off" && e.to_ext_id && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7111
|
-
"span",
|
|
7112
|
-
{
|
|
7113
|
-
className: "inline-flex items-center gap-1",
|
|
7114
|
-
"data-testid": `${base}-to-${e.external_id}`,
|
|
7115
|
-
children: [
|
|
7116
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { className: "size-3.5 text-muted-foreground", "aria-hidden": true }),
|
|
7117
|
-
renderPerson(e.to_ext_id)
|
|
7118
|
-
]
|
|
7119
|
-
}
|
|
7120
|
-
),
|
|
7121
6684
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7122
6685
|
"time",
|
|
7123
6686
|
{
|
|
@@ -7137,9 +6700,6 @@ function TaskActivityTimeline({
|
|
|
7137
6700
|
);
|
|
7138
6701
|
}) });
|
|
7139
6702
|
}
|
|
7140
|
-
function Quote({ text }) {
|
|
7141
|
-
return /* @__PURE__ */ jsxRuntime.jsx("blockquote", { className: "border-l-2 pl-2 text-xs text-muted-foreground whitespace-pre-wrap", children: text });
|
|
7142
|
-
}
|
|
7143
6703
|
function TaskActivityDialog({
|
|
7144
6704
|
open,
|
|
7145
6705
|
onOpenChange,
|
|
@@ -7280,7 +6840,7 @@ function compactThreadActivity(events) {
|
|
|
7280
6840
|
const batches = /* @__PURE__ */ new Map();
|
|
7281
6841
|
for (const event of events) {
|
|
7282
6842
|
if (event.kind === "notified") {
|
|
7283
|
-
if (["
|
|
6843
|
+
if (["conversation_ready", "conversation_done"].includes(
|
|
7284
6844
|
String(event.detail?.notification_type)
|
|
7285
6845
|
))
|
|
7286
6846
|
continue;
|
|
@@ -7626,8 +7186,6 @@ var DEFAULT_TASK_COMPOSER_LABELS = {
|
|
|
7626
7186
|
titlePlaceholder: "What needs doing?",
|
|
7627
7187
|
descriptionLabel: "Description",
|
|
7628
7188
|
descriptionPlaceholder: "Add details (optional)",
|
|
7629
|
-
signoff: "Owner",
|
|
7630
|
-
signoffMe: "Me",
|
|
7631
7189
|
due: "Due",
|
|
7632
7190
|
dueNone: "No date",
|
|
7633
7191
|
dueClear: "Clear date",
|
|
@@ -7638,14 +7196,14 @@ var DEFAULT_TASK_COMPOSER_LABELS = {
|
|
|
7638
7196
|
visibilityPrivate: "Only me",
|
|
7639
7197
|
assistant: "Task Assistant",
|
|
7640
7198
|
assistantStandby: "On standby. It replies when you @mention it in the task\u2019s thread.",
|
|
7641
|
-
assistantPreparing: (when) => `Will
|
|
7199
|
+
assistantPreparing: (when) => `Will work on this task ${when}. You mark it done when it is.`,
|
|
7642
7200
|
configure: "Configure",
|
|
7643
7201
|
configureClose: "Done",
|
|
7644
7202
|
what: "What should it do?",
|
|
7645
7203
|
template: "Skill",
|
|
7646
7204
|
whatPlaceholder: "Choose\u2026",
|
|
7647
7205
|
plan: "Plan",
|
|
7648
|
-
planHint: "The checklist it is held to. You see how it did when
|
|
7206
|
+
planHint: "The checklist it is held to. You see how it did when it finishes.",
|
|
7649
7207
|
start: "Start",
|
|
7650
7208
|
whenOptions: {
|
|
7651
7209
|
manual: "When asked",
|
|
@@ -7702,7 +7260,6 @@ function defaultTaskComposerValues(workflows, initial) {
|
|
|
7702
7260
|
eventKind: "user_message",
|
|
7703
7261
|
afterTaskId: "",
|
|
7704
7262
|
parentTaskId: "",
|
|
7705
|
-
signoffUserId: "",
|
|
7706
7263
|
shared: false,
|
|
7707
7264
|
description: "",
|
|
7708
7265
|
dueAt: "",
|
|
@@ -7730,7 +7287,6 @@ function WorkflowComposer({
|
|
|
7730
7287
|
hideRunLater = false,
|
|
7731
7288
|
workflows,
|
|
7732
7289
|
agents,
|
|
7733
|
-
people,
|
|
7734
7290
|
tasks = [],
|
|
7735
7291
|
values: valuesProp,
|
|
7736
7292
|
initialValues,
|
|
@@ -7856,12 +7412,6 @@ function WorkflowComposer({
|
|
|
7856
7412
|
else onSubmit(submitted);
|
|
7857
7413
|
};
|
|
7858
7414
|
const pillLabels = { search: l.search, empty: l.empty };
|
|
7859
|
-
const personOptions = (people ?? []).map((p) => ({
|
|
7860
|
-
id: p.id,
|
|
7861
|
-
label: p.label,
|
|
7862
|
-
description: p.description,
|
|
7863
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(PersonAvatar, { person: { id: p.id, label: p.label } })
|
|
7864
|
-
}));
|
|
7865
7415
|
const taskOptions = tasks.map((t) => ({
|
|
7866
7416
|
id: t.id,
|
|
7867
7417
|
label: t.name,
|
|
@@ -8271,36 +7821,20 @@ function WorkflowComposer({
|
|
|
8271
7821
|
}
|
|
8272
7822
|
)
|
|
8273
7823
|
] }),
|
|
8274
|
-
/* @__PURE__ */ jsxRuntime.
|
|
7824
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8275
7825
|
"div",
|
|
8276
7826
|
{
|
|
8277
7827
|
className: "flex flex-wrap items-center gap-2",
|
|
8278
7828
|
"data-testid": `${id}-properties`,
|
|
8279
|
-
children:
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
{
|
|
8283
|
-
|
|
8284
|
-
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
onChange: (v) => set("signoffUserId", v),
|
|
8289
|
-
searchable: personOptions.length > 6,
|
|
8290
|
-
labels: pillLabels,
|
|
8291
|
-
testId: `${id}-signoff`
|
|
8292
|
-
}
|
|
8293
|
-
),
|
|
8294
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8295
|
-
ui.VisibilityToggle,
|
|
8296
|
-
{
|
|
8297
|
-
items: { shared: values.shared },
|
|
8298
|
-
onToggle: (share) => set("shared", share),
|
|
8299
|
-
label: l.visibility,
|
|
8300
|
-
"data-testid": `${id}-visibility`
|
|
8301
|
-
}
|
|
8302
|
-
)
|
|
8303
|
-
]
|
|
7829
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7830
|
+
ui.VisibilityToggle,
|
|
7831
|
+
{
|
|
7832
|
+
items: { shared: values.shared },
|
|
7833
|
+
onToggle: (share) => set("shared", share),
|
|
7834
|
+
label: l.visibility,
|
|
7835
|
+
"data-testid": `${id}-visibility`
|
|
7836
|
+
}
|
|
7837
|
+
)
|
|
8304
7838
|
}
|
|
8305
7839
|
)
|
|
8306
7840
|
] })
|
|
@@ -8371,7 +7905,6 @@ function WorkTaskComposer({
|
|
|
8371
7905
|
isEdit = false,
|
|
8372
7906
|
workflows,
|
|
8373
7907
|
agents,
|
|
8374
|
-
people,
|
|
8375
7908
|
tasks = [],
|
|
8376
7909
|
values: valuesProp,
|
|
8377
7910
|
initialValues,
|
|
@@ -8444,12 +7977,6 @@ function WorkTaskComposer({
|
|
|
8444
7977
|
});
|
|
8445
7978
|
const id = chunkMHVNT4J3_cjs.testIdOr(testId, { testId: "task-composer" });
|
|
8446
7979
|
const submitText = isPending ? l.saving : isEdit ? l.save : !hasWork ? l.addTask : values.when === "now" ? l.addAndStart : l.addAndSchedule;
|
|
8447
|
-
const personOptions = (people ?? []).map((p) => ({
|
|
8448
|
-
id: p.id,
|
|
8449
|
-
label: p.label,
|
|
8450
|
-
description: p.description,
|
|
8451
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(PersonAvatar, { person: { id: p.id, label: p.label } })
|
|
8452
|
-
}));
|
|
8453
7980
|
const taskOptions = tasks.map((t) => ({
|
|
8454
7981
|
id: t.id,
|
|
8455
7982
|
label: t.name,
|
|
@@ -8510,20 +8037,6 @@ function WorkTaskComposer({
|
|
|
8510
8037
|
)
|
|
8511
8038
|
] }),
|
|
8512
8039
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", "data-testid": `${id}-properties`, children: [
|
|
8513
|
-
people !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8514
|
-
PillSelect,
|
|
8515
|
-
{
|
|
8516
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCheck, { className: GLYPH3, "aria-hidden": true }),
|
|
8517
|
-
prefix: l.signoff,
|
|
8518
|
-
value: values.signoffUserId,
|
|
8519
|
-
options: personOptions,
|
|
8520
|
-
noneOption: { id: "", label: l.signoffMe },
|
|
8521
|
-
onChange: (v) => set("signoffUserId", v),
|
|
8522
|
-
searchable: personOptions.length > 6,
|
|
8523
|
-
labels: pillLabels,
|
|
8524
|
-
testId: `${id}-signoff`
|
|
8525
|
-
}
|
|
8526
|
-
),
|
|
8527
8040
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { children: [
|
|
8528
8041
|
/* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8529
8042
|
ui.EntityPill,
|
|
@@ -8821,85 +8334,6 @@ function WorkTaskComposer({
|
|
|
8821
8334
|
function TaskComposer(props) {
|
|
8822
8335
|
return props.kind === "workflow" ? /* @__PURE__ */ jsxRuntime.jsx(WorkflowComposer, { ...props }) : /* @__PURE__ */ jsxRuntime.jsx(WorkTaskComposer, { ...props });
|
|
8823
8336
|
}
|
|
8824
|
-
function TaskReviewDialog(p) {
|
|
8825
|
-
const [action, setAction] = react.useState("forward");
|
|
8826
|
-
const [userId, setUserId] = react.useState("");
|
|
8827
|
-
const [note, setNote] = react.useState("");
|
|
8828
|
-
react.useEffect(() => {
|
|
8829
|
-
if (p.open) {
|
|
8830
|
-
setAction(p.people.length ? "forward" : p.canApprove ? "finish" : "revise");
|
|
8831
|
-
setUserId("");
|
|
8832
|
-
setNote("");
|
|
8833
|
-
}
|
|
8834
|
-
}, [p.open]);
|
|
8835
|
-
const valid = action === "forward" ? p.people.some((person) => person.id === userId) : action === "revise" ? p.canRevise && Boolean(note.trim()) : p.canApprove;
|
|
8836
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: p.open, onOpenChange: (next) => !p.isPending && p.onOpenChange(next), children: /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogContent, { "data-testid": "task-review-dialog", className: "sm:max-w-lg", children: [
|
|
8837
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.DialogTitle, { children: [
|
|
8838
|
-
"Review: ",
|
|
8839
|
-
p.taskName
|
|
8840
|
-
] }),
|
|
8841
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { children: p.canApprove ? "Approve your review and send it on, request changes, or finish the task." : "Choose who should review this work next, or ask ARBI for changes." }),
|
|
8842
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 py-2", children: [
|
|
8843
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
8844
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "review-next-step", children: "Next step" }),
|
|
8845
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8846
|
-
ui.Select,
|
|
8847
|
-
{
|
|
8848
|
-
value: action,
|
|
8849
|
-
onValueChange: (value) => setAction(value),
|
|
8850
|
-
disabled: p.isPending,
|
|
8851
|
-
children: [
|
|
8852
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectTrigger, { id: "review-next-step", children: /* @__PURE__ */ jsxRuntime.jsx(ui.SelectValue, {}) }),
|
|
8853
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.SelectContent, { children: [
|
|
8854
|
-
p.people.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "forward", children: p.canApprove ? "Approve and send for review" : "Send for review" }),
|
|
8855
|
-
p.canRevise && /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "revise", children: "Ask ARBI for changes" }),
|
|
8856
|
-
p.canApprove && /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "finish", children: "Approve and finish task" })
|
|
8857
|
-
] })
|
|
8858
|
-
]
|
|
8859
|
-
}
|
|
8860
|
-
)
|
|
8861
|
-
] }),
|
|
8862
|
-
action === "forward" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
8863
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "review-recipient", children: "Next reviewer" }),
|
|
8864
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { value: userId, onValueChange: setUserId, disabled: p.isPending, children: [
|
|
8865
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectTrigger, { id: "review-recipient", children: /* @__PURE__ */ jsxRuntime.jsx(ui.SelectValue, { placeholder: "Choose a person" }) }),
|
|
8866
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectContent, { children: p.people.map((person) => /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: person.id, children: person.label }, person.id)) })
|
|
8867
|
-
] })
|
|
8868
|
-
] }),
|
|
8869
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
8870
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "review-note", children: action === "revise" ? "What should ARBI change?" : "Review note (optional)" }),
|
|
8871
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8872
|
-
ui.Textarea,
|
|
8873
|
-
{
|
|
8874
|
-
id: "review-note",
|
|
8875
|
-
value: note,
|
|
8876
|
-
onChange: (e) => setNote(e.target.value),
|
|
8877
|
-
disabled: p.isPending,
|
|
8878
|
-
placeholder: action === "revise" ? "Explain what needs changing in the same draft\u2026" : "Explain what you checked and what the next reviewer should focus on\u2026"
|
|
8879
|
-
}
|
|
8880
|
-
)
|
|
8881
|
-
] }),
|
|
8882
|
-
p.error && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "text-sm text-destructive", children: p.error })
|
|
8883
|
-
] }),
|
|
8884
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
8885
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outline", onClick: () => p.onOpenChange(false), disabled: p.isPending, children: "Cancel" }),
|
|
8886
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8887
|
-
ui.Button,
|
|
8888
|
-
{
|
|
8889
|
-
"data-testid": "task-review-submit",
|
|
8890
|
-
disabled: !valid || p.isPending,
|
|
8891
|
-
onClick: () => p.onSubmit({
|
|
8892
|
-
action,
|
|
8893
|
-
userId,
|
|
8894
|
-
note: note.trim(),
|
|
8895
|
-
approveCurrent: p.canApprove && action === "forward"
|
|
8896
|
-
}),
|
|
8897
|
-
children: p.isPending ? "Saving\u2026" : action === "forward" ? p.canApprove ? "Approve and send" : "Send for review" : action === "revise" ? "Send to ARBI" : "Finish task"
|
|
8898
|
-
}
|
|
8899
|
-
)
|
|
8900
|
-
] })
|
|
8901
|
-
] }) });
|
|
8902
|
-
}
|
|
8903
8337
|
function ThreadNotifyDialog({
|
|
8904
8338
|
open,
|
|
8905
8339
|
onOpenChange,
|
|
@@ -10752,7 +10186,6 @@ exports.DEFAULT_TASK_COMPOSER_LABELS = DEFAULT_TASK_COMPOSER_LABELS;
|
|
|
10752
10186
|
exports.DEFAULT_TASK_LIST_LABELS = DEFAULT_TASK_LIST_LABELS;
|
|
10753
10187
|
exports.DEFAULT_TASK_OUTPUTS_CELL_LABELS = DEFAULT_TASK_OUTPUTS_CELL_LABELS;
|
|
10754
10188
|
exports.DEFAULT_TASK_PLAN_LABELS = DEFAULT_TASK_PLAN_LABELS;
|
|
10755
|
-
exports.DEFAULT_TASK_REVIEW_ACTIONS_LABELS = DEFAULT_TASK_REVIEW_ACTIONS_LABELS;
|
|
10756
10189
|
exports.DEFAULT_TASK_RUNS_DIALOG_LABELS = DEFAULT_TASK_RUNS_DIALOG_LABELS;
|
|
10757
10190
|
exports.DEFAULT_TASK_STATUS_PILL_LABELS = DEFAULT_TASK_STATUS_PILL_LABELS;
|
|
10758
10191
|
exports.DEFAULT_TASK_THREAD_CHIP_LABELS = DEFAULT_TASK_THREAD_CHIP_LABELS;
|
|
@@ -10812,8 +10245,6 @@ exports.TaskInbox = TaskInbox;
|
|
|
10812
10245
|
exports.TaskMoveDialog = TaskMoveDialog;
|
|
10813
10246
|
exports.TaskOutputsCell = TaskOutputsCell;
|
|
10814
10247
|
exports.TaskPlan = TaskPlan;
|
|
10815
|
-
exports.TaskReviewActions = TaskReviewActions;
|
|
10816
|
-
exports.TaskReviewDialog = TaskReviewDialog;
|
|
10817
10248
|
exports.TaskRunsDialog = TaskRunsDialog;
|
|
10818
10249
|
exports.TaskStartDialog = TaskStartDialog;
|
|
10819
10250
|
exports.TaskStatusPill = TaskStatusPill;
|
|
@@ -10905,5 +10336,5 @@ exports.workflowTriggerType = workflowTriggerType;
|
|
|
10905
10336
|
exports.workflowWhen = workflowWhen;
|
|
10906
10337
|
exports.workflowsAccepting = workflowsAccepting;
|
|
10907
10338
|
exports.workflowsForHost = workflowsForHost;
|
|
10908
|
-
//# sourceMappingURL=chunk-
|
|
10909
|
-
//# sourceMappingURL=chunk-
|
|
10339
|
+
//# sourceMappingURL=chunk-ZSNH4CWE.cjs.map
|
|
10340
|
+
//# sourceMappingURL=chunk-ZSNH4CWE.cjs.map
|