@wowyuarm/dsh-agent-team 0.1.1 → 0.1.2
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/package.json +31 -23
- package/packages/agent-team/lib/index.js +51 -62
- package/packages/agent-team/lib/ledger.js +63 -39
- package/packages/agent-team/lib/spec.js +10 -4
- package/packages/agent-team/lib/typert.host.js +60 -73
- package/packages/agent-team/lib/typert.remote-client.d.ts +3 -3
- package/packages/agent-team/lib/typert.remote-client.d.ts.map +1 -1
- package/packages/agent-team/lib/typert.remote-client.js +41 -56
- package/packages/agent-team/lib/types/index.d.ts +10 -13
- package/packages/agent-team/lib/types/index.d.ts.map +1 -1
- package/packages/agent-team/lib/types/ledger.d.ts +11 -11
- package/packages/agent-team/lib/types/ledger.d.ts.map +1 -1
- package/packages/agent-team/lib/types/spec.d.ts.map +1 -1
- package/packages/agent-team/lib/types/types.d.ts +20 -12
- package/packages/agent-team/lib/types/types.d.ts.map +1 -1
- package/packages/agent-team/preset/team-member/agent.cordis.yml +2 -2
- package/packages/client-agent-team/README.md +3 -2
- package/packages/client-agent-team/README.zh.md +3 -2
- package/packages/client-agent-team/lib/client.js +758 -184
- package/packages/client-agent-team/lib/client.js.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.d.ts +1 -2
- package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.js +20 -17
- package/packages/client-agent-team/lib/types/client/TeamChannelPage.d.ts +3 -1
- package/packages/client-agent-team/lib/types/client/TeamChannelPage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamChannelPage.js +38 -2
- package/packages/client-agent-team/lib/types/client/TeamChannelsPanel.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamChannelsPanel.js +16 -2
- package/packages/client-agent-team/lib/types/client/TeamComposer.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamComposer.js +22 -1
- package/packages/client-agent-team/lib/types/client/TeamConversation.d.ts +1 -1
- package/packages/client-agent-team/lib/types/client/TeamConversation.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamConversation.js +3 -3
- package/packages/client-agent-team/lib/types/client/TeamMessage.d.ts +7 -2
- package/packages/client-agent-team/lib/types/client/TeamMessage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamMessage.js +123 -11
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.d.ts +4 -0
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.js +78 -8
- package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.d.ts +1 -1
- package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.js +2 -2
- package/packages/client-agent-team/lib/types/client/index.js +1 -1
- package/packages/client-agent-team/lib/types/client/locales.d.ts +8 -2
- package/packages/client-agent-team/lib/types/client/locales.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/locales.js +8 -2
- package/packages/client-agent-team/lib/types/client/sidebar-drag.d.ts +35 -0
- package/packages/client-agent-team/lib/types/client/sidebar-drag.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/sidebar-drag.js +70 -0
- package/packages/client-agent-team/lib/types/client/sidebar-order.d.ts +27 -0
- package/packages/client-agent-team/lib/types/client/sidebar-order.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/sidebar-order.js +170 -0
- package/packages/client-agent-team/lib/types/client/slots.d.ts +2 -2
- package/packages/client-agent-team/lib/types/client/slots.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/task-refs.d.ts +20 -0
- package/packages/client-agent-team/lib/types/client/task-refs.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/task-refs.js +58 -0
- package/packages/client-agent-team/lib/types/client/team-formatters.d.ts +13 -0
- package/packages/client-agent-team/lib/types/client/team-formatters.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/team-formatters.js +26 -2
- package/packages/tool-agent-team/lib/index.js +4 -4
|
@@ -1007,7 +1007,7 @@ window.__ModuleLoader__.load({
|
|
|
1007
1007
|
};
|
|
1008
1008
|
//#endregion
|
|
1009
1009
|
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.js
|
|
1010
|
-
const version = {
|
|
1010
|
+
const version$1 = {
|
|
1011
1011
|
major: 4,
|
|
1012
1012
|
minor: 4,
|
|
1013
1013
|
patch: 3
|
|
@@ -1019,7 +1019,7 @@ window.__ModuleLoader__.load({
|
|
|
1019
1019
|
inst ?? (inst = {});
|
|
1020
1020
|
inst._zod.def = def;
|
|
1021
1021
|
inst._zod.bag = inst._zod.bag || {};
|
|
1022
|
-
inst._zod.version = version;
|
|
1022
|
+
inst._zod.version = version$1;
|
|
1023
1023
|
const checks = [...inst._zod.def.checks ?? []];
|
|
1024
1024
|
if (inst._zod.traits.has("$ZodCheck")) checks.unshift(inst);
|
|
1025
1025
|
for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
|
|
@@ -4220,6 +4220,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4220
4220
|
literal("reopen")
|
|
4221
4221
|
]).readonly(),
|
|
4222
4222
|
"releasedClaimRefs": union([_undefined(), array(intersection(string(), unknown()))]).readonly().optional(),
|
|
4223
|
+
"completedClaimRefs": union([_undefined(), array(intersection(string(), unknown()))]).readonly().optional(),
|
|
4223
4224
|
"activityRef": intersection(string(), unknown()).readonly(),
|
|
4224
4225
|
"taskRef": intersection(string(), unknown()).readonly(),
|
|
4225
4226
|
"threadRef": intersection(string(), unknown()).readonly(),
|
|
@@ -4509,6 +4510,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4509
4510
|
literal("reopen")
|
|
4510
4511
|
]).readonly(),
|
|
4511
4512
|
"releasedClaimRefs": union([_undefined(), array(intersection(string(), unknown()))]).readonly().optional(),
|
|
4513
|
+
"completedClaimRefs": union([_undefined(), array(intersection(string(), unknown()))]).readonly().optional(),
|
|
4512
4514
|
"activityRef": intersection(string(), unknown()).readonly(),
|
|
4513
4515
|
"taskRef": intersection(string(), unknown()).readonly(),
|
|
4514
4516
|
"threadRef": intersection(string(), unknown()).readonly(),
|
|
@@ -4636,6 +4638,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4636
4638
|
"baseRevision": number().readonly(),
|
|
4637
4639
|
"recipients": array(intersection(string(), unknown())).readonly().optional(),
|
|
4638
4640
|
"attachmentPaths": union([_undefined(), array(string())]).readonly().optional(),
|
|
4641
|
+
"attachments": union([_undefined(), array(intersection(string(), unknown()))]).readonly().optional(),
|
|
4639
4642
|
"confirmationToken": intersection(string(), unknown()).readonly().optional()
|
|
4640
4643
|
});
|
|
4641
4644
|
const _wowyuarm_dsh_agent_team_agentTeam_reply_result$schema = union([
|
|
@@ -4733,52 +4736,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4733
4736
|
})).readonly()
|
|
4734
4737
|
})
|
|
4735
4738
|
]);
|
|
4736
|
-
const
|
|
4737
|
-
"requestId": intersection(string(), unknown()).readonly(),
|
|
4739
|
+
const _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_parameter_0$schema = object({
|
|
4738
4740
|
"workspaceId": intersection(string(), unknown()).readonly(),
|
|
4739
|
-
"
|
|
4740
|
-
});
|
|
4741
|
-
const _wowyuarm_dsh_agent_team_agentTeam_restartMember_result$schema = object({
|
|
4742
|
-
"receipt": object({
|
|
4743
|
-
"operationId": intersection(string(), unknown()).readonly(),
|
|
4744
|
-
"requestId": intersection(string(), unknown()).readonly(),
|
|
4745
|
-
"sequence": number().readonly()
|
|
4746
|
-
}).readonly(),
|
|
4747
|
-
"status": object({
|
|
4748
|
-
"member": object({
|
|
4749
|
-
"memberId": intersection(string(), unknown()).readonly(),
|
|
4750
|
-
"sessionId": intersection(string(), unknown()).readonly(),
|
|
4751
|
-
"workspaceId": intersection(string(), unknown()).readonly(),
|
|
4752
|
-
"handle": string().readonly(),
|
|
4753
|
-
"description": string().readonly(),
|
|
4754
|
-
"presetId": string().readonly(),
|
|
4755
|
-
"model": union([_undefined(), object({
|
|
4756
|
-
"provider": string().readonly(),
|
|
4757
|
-
"model": string().readonly(),
|
|
4758
|
-
"reasoningEffort": intersection(string(), unknown()).readonly().optional()
|
|
4759
|
-
})]).readonly().optional(),
|
|
4760
|
-
"privateMemoryPath": string().readonly(),
|
|
4761
|
-
"state": union([
|
|
4762
|
-
literal("enabled"),
|
|
4763
|
-
literal("suspended"),
|
|
4764
|
-
literal("inactive")
|
|
4765
|
-
]).readonly()
|
|
4766
|
-
}).readonly(),
|
|
4767
|
-
"availability": union([
|
|
4768
|
-
literal("suspended"),
|
|
4769
|
-
literal("inactive"),
|
|
4770
|
-
literal("active"),
|
|
4771
|
-
literal("unavailable")
|
|
4772
|
-
]).readonly(),
|
|
4773
|
-
"presence": union([
|
|
4774
|
-
literal("unavailable"),
|
|
4775
|
-
literal("available"),
|
|
4776
|
-
literal("working"),
|
|
4777
|
-
literal("error")
|
|
4778
|
-
]).readonly(),
|
|
4779
|
-
"diagnostic": string().readonly().optional()
|
|
4780
|
-
}).readonly()
|
|
4741
|
+
"taskRefs": array(intersection(string(), unknown())).readonly()
|
|
4781
4742
|
});
|
|
4743
|
+
const _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_result$schema = object({ "resolved": array(object({
|
|
4744
|
+
"taskRef": intersection(string(), unknown()).readonly(),
|
|
4745
|
+
"channelRef": intersection(string(), unknown()).readonly(),
|
|
4746
|
+
"threadRef": intersection(string(), unknown()).readonly(),
|
|
4747
|
+
"taskNumber": number().readonly()
|
|
4748
|
+
})).readonly() });
|
|
4782
4749
|
const _wowyuarm_dsh_agent_team_agentTeam_sendMessage_parameter_0$schema = object({
|
|
4783
4750
|
"requestId": intersection(string(), unknown()).readonly(),
|
|
4784
4751
|
"workspaceId": intersection(string(), unknown()).readonly(),
|
|
@@ -4961,6 +4928,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4961
4928
|
literal("reopen")
|
|
4962
4929
|
]).readonly(),
|
|
4963
4930
|
"releasedClaimRefs": union([_undefined(), array(intersection(string(), unknown()))]).readonly().optional(),
|
|
4931
|
+
"completedClaimRefs": union([_undefined(), array(intersection(string(), unknown()))]).readonly().optional(),
|
|
4964
4932
|
"activityRef": intersection(string(), unknown()).readonly(),
|
|
4965
4933
|
"taskRef": intersection(string(), unknown()).readonly(),
|
|
4966
4934
|
"threadRef": intersection(string(), unknown()).readonly(),
|
|
@@ -5193,6 +5161,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5193
5161
|
literal("reopen")
|
|
5194
5162
|
]).readonly(),
|
|
5195
5163
|
"releasedClaimRefs": union([_undefined(), array(intersection(string(), unknown()))]).readonly().optional(),
|
|
5164
|
+
"completedClaimRefs": union([_undefined(), array(intersection(string(), unknown()))]).readonly().optional(),
|
|
5196
5165
|
"activityRef": intersection(string(), unknown()).readonly(),
|
|
5197
5166
|
"taskRef": intersection(string(), unknown()).readonly(),
|
|
5198
5167
|
"threadRef": intersection(string(), unknown()).readonly(),
|
|
@@ -5251,7 +5220,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5251
5220
|
},
|
|
5252
5221
|
sourceLocation: {
|
|
5253
5222
|
"file": "packages/agent-team/src/index.ts",
|
|
5254
|
-
"line":
|
|
5223
|
+
"line": 342,
|
|
5255
5224
|
"column": 9
|
|
5256
5225
|
}
|
|
5257
5226
|
},
|
|
@@ -5278,7 +5247,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5278
5247
|
},
|
|
5279
5248
|
sourceLocation: {
|
|
5280
5249
|
"file": "packages/agent-team/src/index.ts",
|
|
5281
|
-
"line":
|
|
5250
|
+
"line": 644,
|
|
5282
5251
|
"column": 9
|
|
5283
5252
|
}
|
|
5284
5253
|
},
|
|
@@ -5306,7 +5275,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5306
5275
|
},
|
|
5307
5276
|
sourceLocation: {
|
|
5308
5277
|
"file": "packages/agent-team/src/index.ts",
|
|
5309
|
-
"line":
|
|
5278
|
+
"line": 279,
|
|
5310
5279
|
"column": 9
|
|
5311
5280
|
}
|
|
5312
5281
|
},
|
|
@@ -5333,7 +5302,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5333
5302
|
},
|
|
5334
5303
|
sourceLocation: {
|
|
5335
5304
|
"file": "packages/agent-team/src/index.ts",
|
|
5336
|
-
"line":
|
|
5305
|
+
"line": 524,
|
|
5337
5306
|
"column": 9
|
|
5338
5307
|
}
|
|
5339
5308
|
},
|
|
@@ -5360,7 +5329,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5360
5329
|
},
|
|
5361
5330
|
sourceLocation: {
|
|
5362
5331
|
"file": "packages/agent-team/src/index.ts",
|
|
5363
|
-
"line":
|
|
5332
|
+
"line": 320,
|
|
5364
5333
|
"column": 9
|
|
5365
5334
|
}
|
|
5366
5335
|
},
|
|
@@ -5387,7 +5356,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5387
5356
|
},
|
|
5388
5357
|
sourceLocation: {
|
|
5389
5358
|
"file": "packages/agent-team/src/index.ts",
|
|
5390
|
-
"line":
|
|
5359
|
+
"line": 621,
|
|
5391
5360
|
"column": 9
|
|
5392
5361
|
}
|
|
5393
5362
|
},
|
|
@@ -5414,7 +5383,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5414
5383
|
},
|
|
5415
5384
|
sourceLocation: {
|
|
5416
5385
|
"file": "packages/agent-team/src/index.ts",
|
|
5417
|
-
"line":
|
|
5386
|
+
"line": 654,
|
|
5418
5387
|
"column": 3
|
|
5419
5388
|
}
|
|
5420
5389
|
},
|
|
@@ -5441,7 +5410,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5441
5410
|
},
|
|
5442
5411
|
sourceLocation: {
|
|
5443
5412
|
"file": "packages/agent-team/src/index.ts",
|
|
5444
|
-
"line":
|
|
5413
|
+
"line": 534,
|
|
5445
5414
|
"column": 9
|
|
5446
5415
|
}
|
|
5447
5416
|
},
|
|
@@ -5469,7 +5438,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5469
5438
|
},
|
|
5470
5439
|
sourceLocation: {
|
|
5471
5440
|
"file": "packages/agent-team/src/index.ts",
|
|
5472
|
-
"line":
|
|
5441
|
+
"line": 270,
|
|
5473
5442
|
"column": 3
|
|
5474
5443
|
}
|
|
5475
5444
|
},
|
|
@@ -5496,7 +5465,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5496
5465
|
},
|
|
5497
5466
|
sourceLocation: {
|
|
5498
5467
|
"file": "packages/agent-team/src/index.ts",
|
|
5499
|
-
"line":
|
|
5468
|
+
"line": 608,
|
|
5500
5469
|
"column": 9
|
|
5501
5470
|
}
|
|
5502
5471
|
},
|
|
@@ -5523,7 +5492,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5523
5492
|
},
|
|
5524
5493
|
sourceLocation: {
|
|
5525
5494
|
"file": "packages/agent-team/src/index.ts",
|
|
5526
|
-
"line":
|
|
5495
|
+
"line": 661,
|
|
5527
5496
|
"column": 9
|
|
5528
5497
|
}
|
|
5529
5498
|
},
|
|
@@ -5550,7 +5519,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5550
5519
|
},
|
|
5551
5520
|
sourceLocation: {
|
|
5552
5521
|
"file": "packages/agent-team/src/index.ts",
|
|
5553
|
-
"line":
|
|
5522
|
+
"line": 400,
|
|
5554
5523
|
"column": 9
|
|
5555
5524
|
}
|
|
5556
5525
|
},
|
|
@@ -5577,7 +5546,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5577
5546
|
},
|
|
5578
5547
|
sourceLocation: {
|
|
5579
5548
|
"file": "packages/agent-team/src/index.ts",
|
|
5580
|
-
"line":
|
|
5549
|
+
"line": 546,
|
|
5581
5550
|
"column": 9
|
|
5582
5551
|
}
|
|
5583
5552
|
},
|
|
@@ -5604,15 +5573,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5604
5573
|
},
|
|
5605
5574
|
sourceLocation: {
|
|
5606
5575
|
"file": "packages/agent-team/src/index.ts",
|
|
5607
|
-
"line":
|
|
5576
|
+
"line": 629,
|
|
5608
5577
|
"column": 9
|
|
5609
5578
|
}
|
|
5610
5579
|
},
|
|
5611
5580
|
{
|
|
5612
|
-
id: "@wowyuarm/dsh-agent-team#agentTeam/
|
|
5581
|
+
id: "@wowyuarm/dsh-agent-team#agentTeam/resolveTaskRefs",
|
|
5613
5582
|
service: "agentTeam",
|
|
5614
5583
|
namespace: "agentTeam",
|
|
5615
|
-
method: "
|
|
5584
|
+
method: "resolveTaskRefs",
|
|
5616
5585
|
invocation: { kind: "direct" },
|
|
5617
5586
|
parameters: [{
|
|
5618
5587
|
name: "request",
|
|
@@ -5620,19 +5589,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5620
5589
|
source: "json",
|
|
5621
5590
|
codec: {
|
|
5622
5591
|
mode: "strict",
|
|
5623
|
-
typeSymbol: "@wowyuarm/dsh-agent-team/types#
|
|
5624
|
-
schema:
|
|
5592
|
+
typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamResolveTaskRefsRequest",
|
|
5593
|
+
schema: _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_parameter_0$schema
|
|
5625
5594
|
}
|
|
5626
5595
|
}],
|
|
5627
5596
|
result: {
|
|
5628
5597
|
mode: "strict",
|
|
5629
|
-
typeSymbol: "@wowyuarm/dsh-agent-team/types#
|
|
5630
|
-
schema:
|
|
5598
|
+
typeSymbol: "@wowyuarm/dsh-agent-team/types#AgentTeamResolveTaskRefsResult",
|
|
5599
|
+
schema: _wowyuarm_dsh_agent_team_agentTeam_resolveTaskRefs_result$schema
|
|
5631
5600
|
},
|
|
5632
5601
|
sourceLocation: {
|
|
5633
5602
|
"file": "packages/agent-team/src/index.ts",
|
|
5634
|
-
"line":
|
|
5635
|
-
"column":
|
|
5603
|
+
"line": 258,
|
|
5604
|
+
"column": 3
|
|
5636
5605
|
}
|
|
5637
5606
|
},
|
|
5638
5607
|
{
|
|
@@ -5658,7 +5627,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5658
5627
|
},
|
|
5659
5628
|
sourceLocation: {
|
|
5660
5629
|
"file": "packages/agent-team/src/index.ts",
|
|
5661
|
-
"line":
|
|
5630
|
+
"line": 556,
|
|
5662
5631
|
"column": 9
|
|
5663
5632
|
}
|
|
5664
5633
|
},
|
|
@@ -5685,7 +5654,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5685
5654
|
},
|
|
5686
5655
|
sourceLocation: {
|
|
5687
5656
|
"file": "packages/agent-team/src/index.ts",
|
|
5688
|
-
"line":
|
|
5657
|
+
"line": 678,
|
|
5689
5658
|
"column": 3
|
|
5690
5659
|
}
|
|
5691
5660
|
},
|
|
@@ -5712,7 +5681,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5712
5681
|
},
|
|
5713
5682
|
sourceLocation: {
|
|
5714
5683
|
"file": "packages/agent-team/src/index.ts",
|
|
5715
|
-
"line":
|
|
5684
|
+
"line": 671,
|
|
5716
5685
|
"column": 3
|
|
5717
5686
|
}
|
|
5718
5687
|
},
|
|
@@ -5739,7 +5708,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5739
5708
|
},
|
|
5740
5709
|
sourceLocation: {
|
|
5741
5710
|
"file": "packages/agent-team/src/index.ts",
|
|
5742
|
-
"line":
|
|
5711
|
+
"line": 332,
|
|
5743
5712
|
"column": 9
|
|
5744
5713
|
}
|
|
5745
5714
|
},
|
|
@@ -5766,7 +5735,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5766
5735
|
},
|
|
5767
5736
|
sourceLocation: {
|
|
5768
5737
|
"file": "packages/agent-team/src/index.ts",
|
|
5769
|
-
"line":
|
|
5738
|
+
"line": 487,
|
|
5770
5739
|
"column": 9
|
|
5771
5740
|
}
|
|
5772
5741
|
},
|
|
@@ -5793,7 +5762,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5793
5762
|
},
|
|
5794
5763
|
sourceLocation: {
|
|
5795
5764
|
"file": "packages/agent-team/src/index.ts",
|
|
5796
|
-
"line":
|
|
5765
|
+
"line": 685,
|
|
5797
5766
|
"column": 3
|
|
5798
5767
|
}
|
|
5799
5768
|
}
|
|
@@ -5801,7 +5770,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5801
5770
|
};
|
|
5802
5771
|
//#endregion
|
|
5803
5772
|
//#region src/client/navigation.ts
|
|
5804
|
-
const STORAGE_KEY$
|
|
5773
|
+
const STORAGE_KEY$2 = "dsh.agent-team.navigation";
|
|
5805
5774
|
function readSnapshot() {
|
|
5806
5775
|
if (typeof localStorage === "undefined") return { mode: "conversation" };
|
|
5807
5776
|
try {
|
|
@@ -5825,7 +5794,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5825
5794
|
if (typeof localStorage === "undefined") return;
|
|
5826
5795
|
try {
|
|
5827
5796
|
const { mode, workspaceId, channelRef, taskRef, threadRef, taskNumber } = snapshot;
|
|
5828
|
-
localStorage.setItem(STORAGE_KEY$
|
|
5797
|
+
localStorage.setItem(STORAGE_KEY$2, JSON.stringify({
|
|
5829
5798
|
mode,
|
|
5830
5799
|
...workspaceId === void 0 ? {} : { workspaceId },
|
|
5831
5800
|
...channelRef === void 0 ? {} : { channelRef },
|
|
@@ -6036,7 +6005,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6036
6005
|
};
|
|
6037
6006
|
//#endregion
|
|
6038
6007
|
//#region src/client/drafts.ts
|
|
6039
|
-
const STORAGE_KEY = "dsh.agent-team.drafts.v1";
|
|
6008
|
+
const STORAGE_KEY$1 = "dsh.agent-team.drafts.v1";
|
|
6040
6009
|
/** Retention ceiling; the oldest savedAt entries fall out first. */
|
|
6041
6010
|
const LIMIT = 50;
|
|
6042
6011
|
const EMPTY = Object.freeze({
|
|
@@ -6071,7 +6040,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6071
6040
|
if (typeof localStorage === "undefined") return;
|
|
6072
6041
|
try {
|
|
6073
6042
|
const payload = Object.fromEntries([...entries].map(([key, entry]) => [key, entry]));
|
|
6074
|
-
localStorage.setItem(STORAGE_KEY, JSON.stringify(payload));
|
|
6043
|
+
localStorage.setItem(STORAGE_KEY$1, JSON.stringify(payload));
|
|
6075
6044
|
} catch {}
|
|
6076
6045
|
}
|
|
6077
6046
|
/**
|
|
@@ -6123,7 +6092,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6123
6092
|
reset() {
|
|
6124
6093
|
this.entries = /* @__PURE__ */ new Map();
|
|
6125
6094
|
this.snapshots.clear();
|
|
6126
|
-
if (typeof localStorage !== "undefined") localStorage.removeItem(STORAGE_KEY);
|
|
6095
|
+
if (typeof localStorage !== "undefined") localStorage.removeItem(STORAGE_KEY$1);
|
|
6127
6096
|
for (const listener of this.listeners) listener();
|
|
6128
6097
|
}
|
|
6129
6098
|
/** Re-read persisted content — what a fresh page load starts from. */
|
|
@@ -6409,7 +6378,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6409
6378
|
}
|
|
6410
6379
|
//#endregion
|
|
6411
6380
|
//#region \0dsh-css:/home/yu/projects/dsh-agent-team/packages/client-agent-team/src/client/composer.module.css.mjs
|
|
6412
|
-
const css$5 = ".x9jGQq_root{padding:0 var(--dsh-composer-side-clearance,16px) 8px;flex-direction:column;align-items:center;display:flex}.x9jGQq_card{box-sizing:border-box;width:100%;max-width:var(--dsh-composer-card-max-width,780px);border:1px solid var(--dsw-alias-border-l2-darkmode-thin);background:var(--dsw-specific-input-major,var(--dsw-alias-bg-layer-1));box-shadow:var(--dsw-shadow-lv2);border-radius:22px;flex-direction:column;gap:6px;padding:10px 0 0;display:flex;position:relative}.x9jGQq_inputArea{min-height:28px;position:relative}.x9jGQq_inputArea textarea{box-sizing:border-box;resize:none;width:100%;min-height:28px;max-height:336px;color:var(--dsw-alias-label-primary,var(--dsw-alias-label-primary));font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;background:0 0;border:0;outline:0;padding:4px 12px 0 16px;font-size:15px;line-height:24px;display:block;overflow-y:auto}.x9jGQq_inputArea textarea::placeholder{color:var(--dsw-alias-label-caption,var(--dsw-alias-label-tertiary))}.x9jGQq_inputArea textarea:disabled{cursor:not-allowed;opacity:.55}.x9jGQq_mentionMenu{z-index:10;border:1px solid var(--dsw-alias-border-inverted);background:var(--dsw-specific-menu);max-height:min(320px,40vh);box-shadow:var(--dsw-shadow-lv3);border-radius:12px;padding:4px;position:absolute;bottom:calc(100% + 12px);left:0;right:0;overflow-y:auto}.x9jGQq_mentionOption{width:100%;min-height:40px;color:var(--dsw-alias-label-primary,var(--dsw-alias-label-primary));cursor:pointer;text-align:left;background:0 0;border:0;border-radius:10px;grid-template-columns:16px minmax(0,auto) minmax(0,1fr);align-items:center;gap:8px;padding:8px 10px;font-size:14px;line-height:22px;display:grid}.x9jGQq_mentionOption:hover,.x9jGQq_mentionOption[aria-selected=true]{background:var(--dsw-alias-interactive-bg-hover)}.x9jGQq_mentionName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.x9jGQq_mentionDescription{min-width:0;color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-tertiary));text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.x9jGQq_toolbar{justify-content:flex-end;align-items:center;gap:6px;min-height:34px;padding:2px 8px 6px;display:flex}.x9jGQq_attachButton{background:var(--dsw-specific-selector);color:var(--dsw-alias-label-primary);cursor:pointer;border:0;border-radius:999px;flex:none;place-items:center;width:28px;height:28px;margin-right:auto;display:grid}.x9jGQq_attachButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-solid)}.x9jGQq_attachButton:disabled{cursor:default;opacity:.5}.x9jGQq_attachButton:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,var(--dsw-specific-selector));outline-offset:1px}.x9jGQq_fileInput{display:none}.x9jGQq_fileChips{flex-wrap:wrap;gap:4px;margin:0;padding:4px 8px 0;list-style:none;display:flex}.x9jGQq_fileChip{background:var(--dsw-alias-interactive-bg-hover);border-radius:6px;align-items:center;gap:4px;max-width:100%;padding:2px 4px 2px 8px;display:inline-flex}.x9jGQq_fileChipName{text-overflow:ellipsis;white-space:nowrap;max-width:220px;font-size:11px;line-height:16px;overflow:hidden}.x9jGQq_fileChipRemove{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:4px;justify-content:center;align-items:center;width:16px;height:16px;padding:0;font-size:12px;display:inline-flex}.x9jGQq_fileChipRemove:hover,.x9jGQq_fileChipRemove:focus-visible{color:var(--dsw-alias-label-primary);outline:none}.x9jGQq_sendButton{background:var(--dsw-alias-button-info-fill,var(--dsw-alias-button-primary-fill));color:#fff;cursor:pointer;border:0;border-radius:50%;justify-content:center;align-items:center;width:34px;height:34px;padding:0;transition:background-color .1s,opacity .1s;display:inline-flex}.x9jGQq_sendButton:hover:not(:disabled){background:var(--dsw-alias-button-info-hover,var(--dsw-alias-button-primary-hover))}.x9jGQq_sendButton:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.x9jGQq_sendButton:disabled{cursor:not-allowed;opacity:.4}.x9jGQq_confirmation{color:var(--dsw-alias-label-tertiary);align-self:stretch;margin:0;padding:0 16px;font-size:12px;line-height:18px}.x9jGQq_notifyRow{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-tertiary));overflow-wrap:anywhere;margin:0;padding:0 16px;font-size:12px;line-height:18px}.x9jGQq_error{color:var(--dsw-alias-state-error-primary);align-self:stretch;margin:0;padding:0 4px 2px;font-size:12px;line-height:18px}@media (width<=600px){.x9jGQq_mentionOption{grid-template-columns:16px minmax(0,1fr);min-height:36px;padding-block:6px}.x9jGQq_mentionDescription{display:none}}@media (prefers-reduced-motion:reduce){.x9jGQq_sendButton{transition:none}}";
|
|
6381
|
+
const css$5 = ".x9jGQq_root{padding:0 var(--dsh-composer-side-clearance,16px) 8px;flex-direction:column;align-items:center;display:flex}.x9jGQq_card{box-sizing:border-box;width:100%;max-width:var(--dsh-composer-card-max-width,780px);border:1px solid var(--dsw-alias-border-l2-darkmode-thin);background:var(--dsw-specific-input-major,var(--dsw-alias-bg-layer-1));box-shadow:var(--dsw-shadow-lv2);border-radius:22px;flex-direction:column;gap:6px;padding:10px 0 0;display:flex;position:relative}.x9jGQq_inputArea{min-height:28px;position:relative}.x9jGQq_inputArea textarea{box-sizing:border-box;resize:none;width:100%;min-height:28px;max-height:336px;color:var(--dsw-alias-label-primary,var(--dsw-alias-label-primary));font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;background:0 0;border:0;outline:0;padding:4px 12px 0 16px;font-size:15px;line-height:24px;display:block;overflow-y:auto}.x9jGQq_inputArea textarea::placeholder{color:var(--dsw-alias-label-caption,var(--dsw-alias-label-tertiary))}.x9jGQq_inputArea textarea:disabled{cursor:not-allowed;opacity:.55}.x9jGQq_mentionMenu{z-index:10;border:1px solid var(--dsw-alias-border-inverted);background:var(--dsw-specific-menu);max-height:min(320px,40vh);box-shadow:var(--dsw-shadow-lv3);border-radius:12px;padding:4px;position:absolute;bottom:calc(100% + 12px);left:0;right:0;overflow-y:auto}.x9jGQq_mentionOption{width:100%;min-height:40px;color:var(--dsw-alias-label-primary,var(--dsw-alias-label-primary));cursor:pointer;text-align:left;background:0 0;border:0;border-radius:10px;grid-template-columns:16px minmax(0,auto) minmax(0,1fr);align-items:center;gap:8px;padding:8px 10px;font-size:14px;line-height:22px;display:grid}.x9jGQq_mentionOption:hover,.x9jGQq_mentionOption[aria-selected=true]{background:var(--dsw-alias-interactive-bg-hover)}.x9jGQq_mentionName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.x9jGQq_mentionDescription{min-width:0;color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-tertiary));text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.x9jGQq_toolbar{justify-content:flex-end;align-items:center;gap:6px;min-height:34px;padding:2px 8px 6px;display:flex}.x9jGQq_attachButton{background:var(--dsw-specific-selector);color:var(--dsw-alias-label-primary);cursor:pointer;border:0;border-radius:999px;flex:none;place-items:center;width:28px;height:28px;margin-right:auto;display:grid}.x9jGQq_attachButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-solid)}.x9jGQq_attachButton:disabled{cursor:default;opacity:.5}.x9jGQq_attachButton:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,var(--dsw-specific-selector));outline-offset:1px}.x9jGQq_fileInput{display:none}.x9jGQq_fileChips{flex-wrap:wrap;gap:4px;margin:0;padding:4px 8px 0;list-style:none;display:flex}.x9jGQq_fileChip{background:var(--dsw-alias-interactive-bg-hover);border-radius:6px;align-items:center;gap:4px;max-width:100%;padding:2px 4px 2px 8px;display:inline-flex}.x9jGQq_fileChipSize{color:var(--dsw-alias-label-tertiary);margin-left:6px}.x9jGQq_imageChip{align-items:center;display:flex}.x9jGQq_imageChipPreview{border:1px solid var(--dsw-alias-border-l2);object-fit:cover;border-radius:4px;width:56px;height:40px}.x9jGQq_fileChipName{text-overflow:ellipsis;white-space:nowrap;max-width:220px;font-size:11px;line-height:16px;overflow:hidden}.x9jGQq_fileChipRemove{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:4px;justify-content:center;align-items:center;width:16px;height:16px;padding:0;font-size:12px;display:inline-flex}.x9jGQq_fileChipRemove:hover,.x9jGQq_fileChipRemove:focus-visible{color:var(--dsw-alias-label-primary);outline:none}.x9jGQq_sendButton{background:var(--dsw-alias-button-info-fill,var(--dsw-alias-button-primary-fill));color:#fff;cursor:pointer;border:0;border-radius:50%;justify-content:center;align-items:center;width:34px;height:34px;padding:0;transition:background-color .1s,opacity .1s;display:inline-flex}.x9jGQq_sendButton:hover:not(:disabled){background:var(--dsw-alias-button-info-hover,var(--dsw-alias-button-primary-hover))}.x9jGQq_sendButton:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.x9jGQq_sendButton:disabled{cursor:not-allowed;opacity:.4}.x9jGQq_confirmation{color:var(--dsw-alias-label-tertiary);align-self:stretch;margin:0;padding:0 16px;font-size:12px;line-height:18px}.x9jGQq_notifyRow{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-tertiary));overflow-wrap:anywhere;margin:0;padding:0 16px;font-size:12px;line-height:18px}.x9jGQq_error{color:var(--dsw-alias-state-error-primary);align-self:stretch;margin:0;padding:0 4px 2px;font-size:12px;line-height:18px}@media (width<=600px){.x9jGQq_mentionOption{grid-template-columns:16px minmax(0,1fr);min-height:36px;padding-block:6px}.x9jGQq_mentionDescription{display:none}}@media (prefers-reduced-motion:reduce){.x9jGQq_sendButton{transition:none}}";
|
|
6413
6382
|
const tagId$5 = "@wowyuarm/dsh-agent-team/composer.module.css";
|
|
6414
6383
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$5) + "]") === null) {
|
|
6415
6384
|
const tag = document.createElement("style");
|
|
@@ -6426,8 +6395,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6426
6395
|
"fileChip": "x9jGQq_fileChip",
|
|
6427
6396
|
"fileChipName": "x9jGQq_fileChipName",
|
|
6428
6397
|
"fileChipRemove": "x9jGQq_fileChipRemove",
|
|
6398
|
+
"fileChipSize": "x9jGQq_fileChipSize",
|
|
6429
6399
|
"fileChips": "x9jGQq_fileChips",
|
|
6430
6400
|
"fileInput": "x9jGQq_fileInput",
|
|
6401
|
+
"imageChip": "x9jGQq_imageChip",
|
|
6402
|
+
"imageChipPreview": "x9jGQq_imageChipPreview",
|
|
6431
6403
|
"inputArea": "x9jGQq_inputArea",
|
|
6432
6404
|
"mentionDescription": "x9jGQq_mentionDescription",
|
|
6433
6405
|
"mentionMenu": "x9jGQq_mentionMenu",
|
|
@@ -6464,6 +6436,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6464
6436
|
const normalized = query.toLocaleLowerCase();
|
|
6465
6437
|
return members.filter((status) => status.presence !== "unavailable" && status.member.state !== "inactive" && status.member.handle.toLocaleLowerCase().startsWith(normalized));
|
|
6466
6438
|
}
|
|
6439
|
+
/** One object URL per draft file; revoked when the draft is removed. */
|
|
6440
|
+
const draftPreviewUrls = /* @__PURE__ */ new WeakMap();
|
|
6441
|
+
function draftPreviewUrl(file) {
|
|
6442
|
+
if (!file.type.startsWith("image/")) return void 0;
|
|
6443
|
+
let url = draftPreviewUrls.get(file);
|
|
6444
|
+
if (url === void 0) {
|
|
6445
|
+
url = URL.createObjectURL(file);
|
|
6446
|
+
draftPreviewUrls.set(file, url);
|
|
6447
|
+
}
|
|
6448
|
+
return url;
|
|
6449
|
+
}
|
|
6467
6450
|
function TeamComposer({ members, recipients, draft, pending, confirmation, error, onDraftChange, onRecipientsChange, onSubmit, pendingFiles, onFilesChange, t }) {
|
|
6468
6451
|
const inputRef = (0, react.useRef)(null);
|
|
6469
6452
|
const fileInputRef = (0, react.useRef)(null);
|
|
@@ -6666,23 +6649,39 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6666
6649
|
onFilesChange !== void 0 && pendingFiles !== void 0 && pendingFiles.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
6667
6650
|
className: composer_module_css_default.fileChips,
|
|
6668
6651
|
"aria-label": t("attachFiles"),
|
|
6669
|
-
children: pendingFiles.map((file, index) =>
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
className: composer_module_css_default.
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6652
|
+
children: pendingFiles.map((file, index) => {
|
|
6653
|
+
const previewUrl = draftPreviewUrl(file);
|
|
6654
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
6655
|
+
className: `${composer_module_css_default.fileChip} ${previewUrl !== void 0 ? composer_module_css_default.imageChip : ""}`,
|
|
6656
|
+
children: [
|
|
6657
|
+
previewUrl !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
|
|
6658
|
+
src: previewUrl,
|
|
6659
|
+
alt: "",
|
|
6660
|
+
className: composer_module_css_default.imageChipPreview
|
|
6661
|
+
}),
|
|
6662
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
6663
|
+
className: composer_module_css_default.fileChipName,
|
|
6664
|
+
title: file.name,
|
|
6665
|
+
children: [file.name, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6666
|
+
className: composer_module_css_default.fileChipSize,
|
|
6667
|
+
children: formatByteSize(file.size)
|
|
6668
|
+
})]
|
|
6669
|
+
}),
|
|
6670
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6671
|
+
type: "button",
|
|
6672
|
+
className: composer_module_css_default.fileChipRemove,
|
|
6673
|
+
"aria-label": t("removeFile", { name: file.name }),
|
|
6674
|
+
disabled: pending,
|
|
6675
|
+
onClick: () => {
|
|
6676
|
+
const url = draftPreviewUrls.get(file);
|
|
6677
|
+
if (url !== void 0) URL.revokeObjectURL(url);
|
|
6678
|
+
onFilesChange(pendingFiles.filter((_, candidate) => candidate !== index));
|
|
6679
|
+
},
|
|
6680
|
+
children: "×"
|
|
6681
|
+
})
|
|
6682
|
+
]
|
|
6683
|
+
}, `${file.name}-${index}`);
|
|
6684
|
+
})
|
|
6686
6685
|
}),
|
|
6687
6686
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6688
6687
|
className: composer_module_css_default.toolbar,
|
|
@@ -6729,6 +6728,56 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6729
6728
|
});
|
|
6730
6729
|
}
|
|
6731
6730
|
//#endregion
|
|
6731
|
+
//#region src/client/task-refs.ts
|
|
6732
|
+
const resolved = /* @__PURE__ */ new Map();
|
|
6733
|
+
const pending = /* @__PURE__ */ new Set();
|
|
6734
|
+
/** Refs the Host did not recognize; never re-queried (no retry loops). */
|
|
6735
|
+
const unresolvable = /* @__PURE__ */ new Set();
|
|
6736
|
+
const listeners$1 = /* @__PURE__ */ new Set();
|
|
6737
|
+
let version = 0;
|
|
6738
|
+
const emit = () => {
|
|
6739
|
+
version += 1;
|
|
6740
|
+
for (const listener of listeners$1) listener();
|
|
6741
|
+
};
|
|
6742
|
+
const subscribe = (listener) => {
|
|
6743
|
+
listeners$1.add(listener);
|
|
6744
|
+
return () => {
|
|
6745
|
+
listeners$1.delete(listener);
|
|
6746
|
+
};
|
|
6747
|
+
};
|
|
6748
|
+
/** Stable snapshot token; the map is read directly after this changes. */
|
|
6749
|
+
const getSnapshot = () => version;
|
|
6750
|
+
/** React binding: re-renders the caller when any ref resolution lands. */
|
|
6751
|
+
const useResolvedTaskRefVersion = () => (0, react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
6752
|
+
const cachedResolvedTaskRef = (taskRef) => resolved.get(taskRef);
|
|
6753
|
+
/** Store one resolution (click path) and wake every rendered link. */
|
|
6754
|
+
const rememberResolvedTaskRef = (entry) => {
|
|
6755
|
+
resolved.set(entry.taskRef, entry);
|
|
6756
|
+
pending.delete(entry.taskRef);
|
|
6757
|
+
emit();
|
|
6758
|
+
};
|
|
6759
|
+
/**
|
|
6760
|
+
* Batch-resolve unknown refs through the Host lookup. Concurrent callers
|
|
6761
|
+
* deduplicate through the pending set; failures just clear the pending mark
|
|
6762
|
+
* so a later interaction can retry.
|
|
6763
|
+
*/
|
|
6764
|
+
const resolveUnknownTaskRefs = async (refs, lookup) => {
|
|
6765
|
+
const missing = refs.filter((taskRef) => !resolved.has(taskRef) && !pending.has(taskRef) && !unresolvable.has(taskRef));
|
|
6766
|
+
if (missing.length === 0) return;
|
|
6767
|
+
for (const taskRef of missing) pending.add(taskRef);
|
|
6768
|
+
try {
|
|
6769
|
+
const entries = await lookup(missing);
|
|
6770
|
+
for (const entry of entries) {
|
|
6771
|
+
resolved.set(entry.taskRef, entry);
|
|
6772
|
+
pending.delete(entry.taskRef);
|
|
6773
|
+
}
|
|
6774
|
+
for (const taskRef of missing) if (!resolved.has(taskRef)) unresolvable.add(taskRef);
|
|
6775
|
+
if (entries.length > 0) emit();
|
|
6776
|
+
} finally {
|
|
6777
|
+
for (const taskRef of missing) pending.delete(taskRef);
|
|
6778
|
+
}
|
|
6779
|
+
};
|
|
6780
|
+
//#endregion
|
|
6732
6781
|
//#region src/client/team-formatters.ts
|
|
6733
6782
|
function formatTaskStatus(status, t) {
|
|
6734
6783
|
return t({
|
|
@@ -6772,6 +6821,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6772
6821
|
for (let index = 0; index < memberId.length; index += 1) hash = (hash * 31 + memberId.charCodeAt(index)) % 360;
|
|
6773
6822
|
return hash;
|
|
6774
6823
|
}
|
|
6824
|
+
const BRANDED_REF_PATTERN = /\b(task|channel|thread):[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
|
|
6825
|
+
/**
|
|
6826
|
+
* Split a literal text run into plain and branded-ref segments. The pattern
|
|
6827
|
+
* anchors on the fixed ref prefixes plus the UUID shape, so ordinary prose
|
|
6828
|
+
* containing a colon never linkifies. Refs render as navigation links; text
|
|
6829
|
+
* without any ref comes back as one untouched segment.
|
|
6830
|
+
*/
|
|
6831
|
+
function splitBrandedRefs(text) {
|
|
6832
|
+
const segments = [];
|
|
6833
|
+
let cursor = 0;
|
|
6834
|
+
for (const match of text.matchAll(BRANDED_REF_PATTERN)) {
|
|
6835
|
+
const start = match.index ?? 0;
|
|
6836
|
+
if (start > cursor) segments.push({ text: text.slice(cursor, start) });
|
|
6837
|
+
segments.push({
|
|
6838
|
+
text: match[0],
|
|
6839
|
+
ref: match[0]
|
|
6840
|
+
});
|
|
6841
|
+
cursor = start + match[0].length;
|
|
6842
|
+
}
|
|
6843
|
+
if (cursor < text.length) segments.push({ text: text.slice(cursor) });
|
|
6844
|
+
return segments;
|
|
6845
|
+
}
|
|
6775
6846
|
function escapeRegExp(value) {
|
|
6776
6847
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
6777
6848
|
}
|
|
@@ -6852,7 +6923,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6852
6923
|
}
|
|
6853
6924
|
function formatActivity(activity, options) {
|
|
6854
6925
|
const actor = options.actorName(activity.actor);
|
|
6855
|
-
if (activity.kind === "accept") return options.t("
|
|
6926
|
+
if (activity.kind === "accept") return activity.completedClaimRefs !== void 0 && activity.completedClaimRefs.length > 0 ? options.t("activityAcceptedWithClaims", {
|
|
6927
|
+
actor,
|
|
6928
|
+
count: activity.completedClaimRefs.length
|
|
6929
|
+
}) : options.t("activityAccepted", { actor });
|
|
6856
6930
|
if (activity.kind === "close") return options.t("activityClosed", { actor });
|
|
6857
6931
|
if (activity.kind === "reopen") return options.t("activityReopened", { actor });
|
|
6858
6932
|
const direction = "claimRef" in activity ? options.claims.find((claim) => claim.claimRef === activity.claimRef)?.direction ?? options.t("claims") : options.t("claims");
|
|
@@ -6880,7 +6954,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6880
6954
|
}
|
|
6881
6955
|
//#endregion
|
|
6882
6956
|
//#region \0dsh-css:/home/yu/projects/dsh-agent-team/packages/client-agent-team/src/client/conversation.module.css.mjs
|
|
6883
|
-
const css$4 = ".omcBaG_surface{grid-template-rows:auto minmax(0,1fr) auto;min-width:0;height:100%;min-height:0;display:grid;overflow:hidden}.omcBaG_surfaceHeader{border-bottom:1px solid var(--dsw-alias-border-l2);min-width:0;padding:14px clamp(18px,3vw,36px) 12px}.omcBaG_headerRow{justify-content:space-between;align-items:flex-start;gap:16px;min-width:0;max-width:880px;margin:0 auto;display:flex}.omcBaG_headerCopy{min-width:0}.omcBaG_headerCopy h1{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;margin:0;font-size:20px;font-weight:600;line-height:28px}.omcBaG_headerCopy p{color:var(--dsw-alias-label-secondary);margin:3px 0 0;font-size:13px;line-height:20px}.omcBaG_headerActions{flex:none;align-items:center;gap:6px;display:flex}.omcBaG_backRow{max-width:880px;margin:0 auto 8px}.omcBaG_timeline{overscroll-behavior:contain;scrollbar-gutter:stable;min-height:0;padding:12px clamp(18px,3vw,36px) 24px;overflow:hidden auto}.omcBaG_timelineContent{flex-direction:column;min-width:0;max-width:880px;min-height:100%;margin:0 auto;display:flex}.omcBaG_emptySurface{margin:auto;padding:32px 0}.omcBaG_emptySurface .omcBaG_emptyState{text-align:center;justify-items:center}.omcBaG_timelineAction{justify-content:center;padding:2px 0 8px;display:flex}.omcBaG_messageRow{gap:10px;padding:10px 0;display:flex}.omcBaG_messageRow[data-grouped]{padding-top:2px}.omcBaG_messageRow[data-grouped] .omcBaG_messageBody>:first-child{margin-top:0}.omcBaG_messageIdentity{background:hsl(var(--team-avatar-hue,212) 42% 46%);color:#fff;border-radius:50%;flex:0 0 28px;justify-content:center;align-items:center;height:28px;font-size:12px;font-weight:600;display:flex}.omcBaG_messageRow[data-human] .omcBaG_messageIdentity{background:var(--dsw-alias-state-business-primary)}.omcBaG_messageRow[data-grouped] .omcBaG_messageIdentity{visibility:hidden}.omcBaG_messageBody{min-width:0}.omcBaG_nameRow{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}.omcBaG_nameRow strong{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:20px}.omcBaG_messageTime{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:20px}.omcBaG_messageText{white-space:pre-wrap;word-break:break-word;margin:6px 0;font-size:14px;line-height:22px}.omcBaG_messageBody .omcBaG_messageMarkdown{font-size:14px;line-height:22px}.omcBaG_messageBody>.omcBaG_messageMarkdown>div:first-child{color:var(--dsw-alias-label-primary);font:inherit}.omcBaG_messageBody .omcBaG_messageMarkdown p{margin:6px 0}.omcBaG_messageBody .omcBaG_messageMarkdown :where(ul,ol){margin:6px 0;padding-left:22px}.omcBaG_messageBody .omcBaG_messageMarkdown li+li{margin-top:2px}.omcBaG_messageBody .omcBaG_messageMarkdown strong{font-weight:600}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h1,h2,h3,h4,h5,h6){margin:12px 0 4px}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h1){font-size:17px;line-height:26px}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h2){font-size:16px;line-height:24px}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h3,h4,h5,h6){font-size:15px;line-height:22px}.omcBaG_messageBody .omcBaG_messageMarkdown pre{margin:8px 0;padding:10px 12px;font-size:13px}.omcBaG_messageBody .omcBaG_messageMarkdown blockquote{margin:6px 0}.omcBaG_messageBody .omcBaG_messageMarkdown :where(th,td){padding-block:5px}.omcBaG_emptyState,.omcBaG_loadingState{color:var(--dsw-alias-label-tertiary);margin:0;padding:14px 0;font-size:13px;line-height:20px}.omcBaG_emptyState{gap:3px;display:grid}.omcBaG_emptyState strong{color:var(--dsw-alias-label-secondary);font-weight:500}.omcBaG_emptyState span{font-size:12px}.omcBaG_loadingState{align-items:center;gap:8px;display:flex}.omcBaG_loadingMark{background:var(--dsw-alias-bg-skeleton);border-radius:50%;width:8px;height:8px;animation:1.2s ease-in-out infinite omcBaG_pulse}.omcBaG_error,.omcBaG_errorState{color:var(--dsw-alias-state-error-primary);max-width:880px;margin:0 auto;padding-top:6px;font-size:12px;line-height:18px}.omcBaG_errorState{justify-content:space-between;align-items:center;gap:8px;display:flex}.omcBaG_welcomeSurface{justify-content:center;align-items:center;min-width:0;height:100%;padding:32px;display:flex}.omcBaG_welcome{text-align:center;max-width:420px}.omcBaG_welcomeEyebrow{color:var(--dsw-alias-label-tertiary);text-transform:uppercase;font-size:12px;line-height:18px}.omcBaG_welcome h1{color:var(--dsw-alias-label-primary);margin:8px 0;font-size:24px;font-weight:600;line-height:32px}.omcBaG_welcome p{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px;line-height:20px}@keyframes omcBaG_pulse{0%,to{opacity:.35}50%{opacity:1}}@media (width<=600px){.omcBaG_surfaceHeader{padding:12px 12px 10px}.omcBaG_headerRow{flex-direction:column;align-items:stretch;gap:8px}.omcBaG_headerActions{flex-wrap:wrap}.omcBaG_backRow{margin-bottom:6px}.omcBaG_timeline{scrollbar-gutter:auto;padding:8px 12px 16px}.omcBaG_messageRow{padding:8px 0}}@media (prefers-reduced-motion:reduce){.omcBaG_loadingMark{animation:none}}.omcBaG_messageRun{margin:2px 0;padding:3px 0}.omcBaG_messageRow[data-grouped]:has(.omcBaG_messageBody>button){border-top:1px solid var(--dsw-alias-border-l2);margin-top:3px;padding-top:7px}.omcBaG_runDivider{border-top:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);margin:2px 0 0;padding:5px 0 0 38px;font-size:11px;line-height:16px}.omcBaG_runDivider+.omcBaG_messageRow[data-grouped]:has(.omcBaG_messageBody>button){border-top:0;margin-top:0}.omcBaG_mention{background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 12%, transparent);color:var(--dsw-alias-state-business-primary);border-radius:5px;padding:0 4px;font-weight:500;box-shadow:0 1px 2px #00000014}.omcBaG_mentionsRow{gap:4px;width:fit-content;margin-top:3px;font-size:.85em;display:flex}.omcBaG_attachmentStrip{flex-wrap:wrap;gap:6px;margin-top:4px;display:flex}.omcBaG_attachmentThumb{cursor:zoom-in;border:0;border-radius:8px;padding:0}.omcBaG_attachmentThumb img{object-fit:cover;border-radius:8px;width:128px;height:96px;display:block}.omcBaG_attachmentThumb:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,currentColor);outline-offset:1px}.omcBaG_attachmentModal{width:min(1100px,92vw)}.omcBaG_attachmentZoom{object-fit:contain;border-radius:12px;max-width:100%;max-height:78vh;margin:0 auto;display:block}.omcBaG_attachmentChip{background:var(--dsw-alias-interactive-bg-hover);border-radius:6px;align-items:baseline;gap:6px;max-width:100%;padding:3px 8px;display:inline-flex}.omcBaG_attachmentChipName{text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:17px;overflow:hidden}.omcBaG_attachmentChipSize{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-size:11px;line-height:17px}";
|
|
6957
|
+
const css$4 = ".omcBaG_surface{grid-template-rows:auto minmax(0,1fr) auto;min-width:0;height:100%;min-height:0;display:grid;overflow:hidden}.omcBaG_surfaceHeader{border-bottom:1px solid var(--dsw-alias-border-l2);min-width:0;padding:14px clamp(18px,3vw,36px) 12px}.omcBaG_headerRow{justify-content:space-between;align-items:flex-start;gap:16px;min-width:0;max-width:880px;margin:0 auto;display:flex}.omcBaG_headerCopy{min-width:0}.omcBaG_headerCopy h1{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;margin:0;font-size:20px;font-weight:600;line-height:28px}.omcBaG_headerCopy p{color:var(--dsw-alias-label-secondary);margin:3px 0 0;font-size:13px;line-height:20px}.omcBaG_headerActions{flex:none;align-items:center;gap:6px;display:flex}.omcBaG_backRow{max-width:880px;margin:0 auto 8px}.omcBaG_timeline{overscroll-behavior:contain;scrollbar-gutter:stable;min-height:0;padding:12px clamp(18px,3vw,36px) 24px;overflow:hidden auto}.omcBaG_timelineContent{flex-direction:column;min-width:0;max-width:880px;min-height:100%;margin:0 auto;display:flex}.omcBaG_emptySurface{margin:auto;padding:32px 0}.omcBaG_emptySurface .omcBaG_emptyState{text-align:center;justify-items:center}.omcBaG_timelineAction{justify-content:center;padding:2px 0 8px;display:flex}.omcBaG_messageRow{gap:10px;padding:10px 0;display:flex}.omcBaG_messageRow[data-grouped]{padding-top:2px}.omcBaG_messageRow[data-grouped] .omcBaG_messageBody>:first-child{margin-top:0}.omcBaG_messageIdentity{background:hsl(var(--team-avatar-hue,212) 42% 46%);color:#fff;border-radius:50%;flex:0 0 28px;justify-content:center;align-items:center;height:28px;font-size:12px;font-weight:600;display:flex}.omcBaG_messageRow[data-human] .omcBaG_messageIdentity{background:var(--dsw-alias-state-business-primary)}.omcBaG_messageRow[data-grouped] .omcBaG_messageIdentity{visibility:hidden}.omcBaG_messageBody{min-width:0}.omcBaG_nameRow{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}.omcBaG_nameRow strong{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:20px}.omcBaG_messageTime{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:20px}.omcBaG_messageText{white-space:pre-wrap;word-break:break-word;margin:6px 0;font-size:14px;line-height:22px}.omcBaG_messageBody .omcBaG_messageMarkdown{font-size:14px;line-height:22px}.omcBaG_messageBody>.omcBaG_messageMarkdown>div:first-child{color:var(--dsw-alias-label-primary);font:inherit}.omcBaG_messageBody .omcBaG_messageMarkdown p{margin:6px 0}.omcBaG_messageBody .omcBaG_messageMarkdown :where(ul,ol){margin:6px 0;padding-left:22px}.omcBaG_messageBody .omcBaG_messageMarkdown li+li{margin-top:2px}.omcBaG_messageBody .omcBaG_messageMarkdown strong{font-weight:600}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h1,h2,h3,h4,h5,h6){margin:12px 0 4px}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h1){font-size:17px;line-height:26px}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h2){font-size:16px;line-height:24px}.omcBaG_messageBody .omcBaG_messageMarkdown :where(h3,h4,h5,h6){font-size:15px;line-height:22px}.omcBaG_messageBody .omcBaG_messageMarkdown pre{margin:8px 0;padding:10px 12px;font-size:13px}.omcBaG_messageBody .omcBaG_messageMarkdown blockquote{margin:6px 0}.omcBaG_messageBody .omcBaG_messageMarkdown :where(th,td){padding-block:5px}.omcBaG_emptyState,.omcBaG_loadingState{color:var(--dsw-alias-label-tertiary);margin:0;padding:14px 0;font-size:13px;line-height:20px}.omcBaG_emptyState{gap:3px;display:grid}.omcBaG_emptyState strong{color:var(--dsw-alias-label-secondary);font-weight:500}.omcBaG_emptyState span{font-size:12px}.omcBaG_loadingState{align-items:center;gap:8px;display:flex}.omcBaG_loadingMark{background:var(--dsw-alias-bg-skeleton);border-radius:50%;width:8px;height:8px;animation:1.2s ease-in-out infinite omcBaG_pulse}.omcBaG_error,.omcBaG_errorState{color:var(--dsw-alias-state-error-primary);max-width:880px;margin:0 auto;padding-top:6px;font-size:12px;line-height:18px}.omcBaG_errorState{justify-content:space-between;align-items:center;gap:8px;display:flex}.omcBaG_welcomeSurface{justify-content:center;align-items:center;min-width:0;height:100%;padding:32px;display:flex}.omcBaG_welcome{text-align:center;max-width:420px}.omcBaG_welcomeEyebrow{color:var(--dsw-alias-label-tertiary);text-transform:uppercase;font-size:12px;line-height:18px}.omcBaG_welcome h1{color:var(--dsw-alias-label-primary);margin:8px 0;font-size:24px;font-weight:600;line-height:32px}.omcBaG_welcome p{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px;line-height:20px}@keyframes omcBaG_pulse{0%,to{opacity:.35}50%{opacity:1}}@media (width<=600px){.omcBaG_surfaceHeader{padding:12px 12px 10px}.omcBaG_headerRow{flex-direction:column;align-items:stretch;gap:8px}.omcBaG_headerActions{flex-wrap:wrap}.omcBaG_backRow{margin-bottom:6px}.omcBaG_timeline{scrollbar-gutter:auto;padding:8px 12px 16px}.omcBaG_messageRow{padding:8px 0}}@media (prefers-reduced-motion:reduce){.omcBaG_loadingMark{animation:none}}.omcBaG_messageRun{margin:2px 0;padding:3px 0}.omcBaG_messageRow[data-grouped]:has(.omcBaG_messageBody>button){border-top:1px solid var(--dsw-alias-border-l2);margin-top:3px;padding-top:7px}.omcBaG_runDivider{border-top:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);margin:2px 0 0;padding:5px 0 0 38px;font-size:11px;line-height:16px}.omcBaG_runDivider+.omcBaG_messageRow[data-grouped]:has(.omcBaG_messageBody>button){border-top:0;margin-top:0}.omcBaG_mention{background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 12%, transparent);color:var(--dsw-alias-state-business-primary);border-radius:5px;padding:0 4px;font-weight:500;box-shadow:0 1px 2px #00000014}.omcBaG_mentionsRow{gap:4px;width:fit-content;margin-top:3px;font-size:.85em;display:flex}.omcBaG_attachmentStrip{flex-wrap:wrap;gap:6px;margin-top:4px;display:flex}.omcBaG_attachmentThumb{cursor:zoom-in;border:0;border-radius:8px;padding:0}.omcBaG_attachmentThumb img{object-fit:cover;border-radius:8px;width:128px;height:96px;display:block}.omcBaG_attachmentThumb:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,currentColor);outline-offset:1px}.omcBaG_confirmBody{margin:0 0 8px}.omcBaG_confirmList{gap:6px;margin:0;padding-left:18px;display:grid}.omcBaG_refLink{color:var(--dsw-alias-state-business-primary);cursor:pointer;font:inherit;text-align:left;text-underline-offset:3px;background:0 0;border:none;border-radius:4px;padding:0;text-decoration:underline}.omcBaG_refLink:hover{text-decoration-thickness:2px}.omcBaG_refLink:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:1px}.omcBaG_attachmentModal{width:min(1100px,92vw)}.omcBaG_attachmentZoom{object-fit:contain;border-radius:12px;max-width:100%;max-height:78vh;margin:0 auto;display:block}.omcBaG_attachmentChip{background:var(--dsw-alias-interactive-bg-hover);border-radius:6px;align-items:baseline;gap:6px;max-width:100%;padding:3px 8px;display:inline-flex}.omcBaG_attachmentChipName{text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:17px;overflow:hidden}.omcBaG_attachmentChipSize{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-size:11px;line-height:17px}";
|
|
6884
6958
|
const tagId$4 = "@wowyuarm/dsh-agent-team/conversation.module.css";
|
|
6885
6959
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]") === null) {
|
|
6886
6960
|
const tag = document.createElement("style");
|
|
@@ -6898,6 +6972,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6898
6972
|
"attachmentThumb": "omcBaG_attachmentThumb",
|
|
6899
6973
|
"attachmentZoom": "omcBaG_attachmentZoom",
|
|
6900
6974
|
"backRow": "omcBaG_backRow",
|
|
6975
|
+
"confirmBody": "omcBaG_confirmBody",
|
|
6976
|
+
"confirmList": "omcBaG_confirmList",
|
|
6901
6977
|
"emptyState": "omcBaG_emptyState",
|
|
6902
6978
|
"emptySurface": "omcBaG_emptySurface",
|
|
6903
6979
|
"error": "omcBaG_error",
|
|
@@ -6918,6 +6994,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6918
6994
|
"messageTime": "omcBaG_messageTime",
|
|
6919
6995
|
"nameRow": "omcBaG_nameRow",
|
|
6920
6996
|
"pulse": "omcBaG_pulse",
|
|
6997
|
+
"refLink": "omcBaG_refLink",
|
|
6921
6998
|
"runDivider": "omcBaG_runDivider",
|
|
6922
6999
|
"surface": "omcBaG_surface",
|
|
6923
7000
|
"surfaceHeader": "omcBaG_surfaceHeader",
|
|
@@ -6931,11 +7008,61 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6931
7008
|
//#endregion
|
|
6932
7009
|
//#region src/client/TeamMessage.tsx
|
|
6933
7010
|
/** One chat message row with identity chrome and sender-appropriate rendering. */
|
|
6934
|
-
function TeamMessage({ senderName, memberId, human, body, occurredAt, mentionNames, senderTitle, grouped, attachments, loadAttachment, t, children }) {
|
|
7011
|
+
function TeamMessage({ senderName, memberId, human, body, occurredAt, mentionNames, senderTitle, grouped, attachments, loadAttachment, t, onOpenRef, onResolveTaskRefs, children }) {
|
|
6935
7012
|
const avatarStyle = human ? void 0 : { "--team-avatar-hue": memberHue(memberId) };
|
|
6936
7013
|
const displayBody = stripAttachmentLines(body) === "" ? body : stripAttachmentLines(body);
|
|
6937
7014
|
const inline = (human || isPlainTextBody(displayBody)) && mentionNames !== void 0 && mentionNames.length > 0 ? splitMentionNames(displayBody, mentionNames) : void 0;
|
|
6938
7015
|
const fallbackNames = inline === void 0 ? mentionNames ?? [] : inline.unmatched;
|
|
7016
|
+
const richAgentBody = !human && !isPlainTextBody(displayBody);
|
|
7017
|
+
const fallbackRefs = richAgentBody && onOpenRef !== void 0 ? splitBrandedRefs(displayBody).filter((segment) => segment.ref !== void 0 && !segment.ref.startsWith("task:")).map((segment) => segment.ref) : [];
|
|
7018
|
+
const refVersion = useResolvedTaskRefVersion();
|
|
7019
|
+
const bodyTaskRefs = onOpenRef === void 0 || richAgentBody ? [] : splitBrandedRefs(displayBody).filter((segment) => segment.ref !== void 0 && segment.ref.startsWith("task:")).map((segment) => segment.ref);
|
|
7020
|
+
const bodyTaskRefKey = bodyTaskRefs.join(",");
|
|
7021
|
+
(0, react.useEffect)(() => {
|
|
7022
|
+
if (onResolveTaskRefs === void 0 || bodyTaskRefKey === "") return;
|
|
7023
|
+
resolveUnknownTaskRefs(bodyTaskRefs, onResolveTaskRefs);
|
|
7024
|
+
}, [
|
|
7025
|
+
onResolveTaskRefs,
|
|
7026
|
+
bodyTaskRefKey,
|
|
7027
|
+
refVersion
|
|
7028
|
+
]);
|
|
7029
|
+
const taskLabel = (0, react.useCallback)((taskNumber) => t?.("taskLabel", { number: taskNumber }) ?? `Task #${taskNumber}`, [t]);
|
|
7030
|
+
const markdownRef = (0, react.useRef)(null);
|
|
7031
|
+
(0, react.useLayoutEffect)(() => {
|
|
7032
|
+
const root = markdownRef.current;
|
|
7033
|
+
if (!richAgentBody || root === null || onOpenRef === void 0) return;
|
|
7034
|
+
const textNodes = markdownProseTextNodes(root);
|
|
7035
|
+
const taskRefs = [...new Set(textNodes.flatMap((node) => splitBrandedRefs(node.data).filter((segment) => segment.ref?.startsWith("task:") === true).map((segment) => segment.ref)))];
|
|
7036
|
+
if (onResolveTaskRefs !== void 0 && taskRefs.length > 0) resolveUnknownTaskRefs(taskRefs, onResolveTaskRefs);
|
|
7037
|
+
for (const node of textNodes) renderResolvedMarkdownTaskRefs(node, taskLabel);
|
|
7038
|
+
for (const button of root.querySelectorAll("button[data-task-ref]")) {
|
|
7039
|
+
const taskRef = button.dataset.taskRef;
|
|
7040
|
+
const hit = taskRef === void 0 ? void 0 : cachedResolvedTaskRef(taskRef);
|
|
7041
|
+
if (taskRef !== void 0 && hit !== void 0) button.textContent = taskLabel(hit.taskNumber);
|
|
7042
|
+
}
|
|
7043
|
+
}, [
|
|
7044
|
+
richAgentBody,
|
|
7045
|
+
onOpenRef,
|
|
7046
|
+
onResolveTaskRefs,
|
|
7047
|
+
refVersion,
|
|
7048
|
+
taskLabel
|
|
7049
|
+
]);
|
|
7050
|
+
(0, react.useEffect)(() => {
|
|
7051
|
+
const root = markdownRef.current;
|
|
7052
|
+
if (!richAgentBody || root === null || onOpenRef === void 0) return;
|
|
7053
|
+
const openTask = (event) => {
|
|
7054
|
+
const target = event.target;
|
|
7055
|
+
if (!(target instanceof Element)) return;
|
|
7056
|
+
const button = target.closest("button[data-task-ref]");
|
|
7057
|
+
if (button === null || !root.contains(button)) return;
|
|
7058
|
+
const taskRef = button instanceof HTMLElement ? button.dataset.taskRef : void 0;
|
|
7059
|
+
if (taskRef !== void 0) onOpenRef(taskRef);
|
|
7060
|
+
};
|
|
7061
|
+
root.addEventListener("click", openTask);
|
|
7062
|
+
return () => {
|
|
7063
|
+
root.removeEventListener("click", openTask);
|
|
7064
|
+
};
|
|
7065
|
+
}, [richAgentBody, onOpenRef]);
|
|
6939
7066
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", {
|
|
6940
7067
|
className: conversation_module_css_default.messageRow,
|
|
6941
7068
|
"data-human": human || void 0,
|
|
@@ -6963,20 +7090,33 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6963
7090
|
children: inline.segments.map((segment, index) => segment.mention ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6964
7091
|
className: conversation_module_css_default.mention,
|
|
6965
7092
|
children: segment.text
|
|
6966
|
-
}, index) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: segment.text }, index))
|
|
6967
|
-
}) : human ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7093
|
+
}, index) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: renderRefs(segment.text, onOpenRef, taskLabel) }, index))
|
|
7094
|
+
}) : human || onOpenRef !== void 0 && isPlainTextBody(displayBody) && splitBrandedRefs(displayBody).some((segment) => segment.ref !== void 0) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6968
7095
|
className: conversation_module_css_default.messageText,
|
|
6969
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MessageText, { text: displayBody })
|
|
7096
|
+
children: onOpenRef === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MessageText, { text: displayBody }) : renderRefs(displayBody, onOpenRef, taskLabel)
|
|
6970
7097
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7098
|
+
ref: markdownRef,
|
|
6971
7099
|
className: conversation_module_css_default.messageMarkdown,
|
|
6972
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, { text: displayBody })
|
|
7100
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, { text: displayBody }, `${displayBody}:${onOpenRef === void 0 ? "literal" : "refs"}`)
|
|
6973
7101
|
}),
|
|
6974
|
-
fallbackNames.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.
|
|
7102
|
+
(fallbackNames.length > 0 || fallbackRefs.length > 0) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6975
7103
|
className: conversation_module_css_default.mentionsRow,
|
|
6976
|
-
children: fallbackNames.map((name) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
7104
|
+
children: [fallbackNames.map((name) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
6977
7105
|
className: conversation_module_css_default.mention,
|
|
6978
7106
|
children: ["@", name]
|
|
6979
|
-
}, name))
|
|
7107
|
+
}, name)), fallbackRefs.map((ref) => {
|
|
7108
|
+
const resolved = cachedResolvedTaskRef(ref);
|
|
7109
|
+
const label = resolved !== void 0 && ref.startsWith("task:") ? taskLabel(resolved.taskNumber) : ref;
|
|
7110
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
7111
|
+
type: "button",
|
|
7112
|
+
className: conversation_module_css_default.refLink,
|
|
7113
|
+
title: ref,
|
|
7114
|
+
onClick: () => {
|
|
7115
|
+
onOpenRef(ref);
|
|
7116
|
+
},
|
|
7117
|
+
children: label
|
|
7118
|
+
}, ref);
|
|
7119
|
+
})]
|
|
6980
7120
|
}),
|
|
6981
7121
|
attachments !== void 0 && attachments.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamAttachmentStrip, {
|
|
6982
7122
|
attachments,
|
|
@@ -6988,6 +7128,60 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6988
7128
|
})]
|
|
6989
7129
|
});
|
|
6990
7130
|
}
|
|
7131
|
+
/** Text nodes that Markdown rendered as prose rather than code or a link. */
|
|
7132
|
+
function markdownProseTextNodes(root) {
|
|
7133
|
+
const nodes = [];
|
|
7134
|
+
const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT);
|
|
7135
|
+
for (let node = walker.nextNode(); node !== null; node = walker.nextNode()) {
|
|
7136
|
+
const parent = node.parentElement;
|
|
7137
|
+
if (parent !== null && parent.closest("code, pre, a, button") === null) nodes.push(node);
|
|
7138
|
+
}
|
|
7139
|
+
return nodes;
|
|
7140
|
+
}
|
|
7141
|
+
/** Replace resolved refs in one prose text node without changing Markdown structure. */
|
|
7142
|
+
function renderResolvedMarkdownTaskRefs(node, taskLabel) {
|
|
7143
|
+
const segments = splitBrandedRefs(node.data);
|
|
7144
|
+
if (!segments.some((segment) => segment.ref?.startsWith("task:") === true && cachedResolvedTaskRef(segment.ref) !== void 0)) return;
|
|
7145
|
+
const fragment = document.createDocumentFragment();
|
|
7146
|
+
for (const segment of segments) {
|
|
7147
|
+
const taskRef = segment.ref?.startsWith("task:") === true ? segment.ref : void 0;
|
|
7148
|
+
if (taskRef === void 0) {
|
|
7149
|
+
fragment.append(segment.text);
|
|
7150
|
+
continue;
|
|
7151
|
+
}
|
|
7152
|
+
const resolved = cachedResolvedTaskRef(taskRef);
|
|
7153
|
+
if (resolved === void 0) {
|
|
7154
|
+
fragment.append(segment.text);
|
|
7155
|
+
continue;
|
|
7156
|
+
}
|
|
7157
|
+
const button = document.createElement("button");
|
|
7158
|
+
button.type = "button";
|
|
7159
|
+
if (conversation_module_css_default.refLink !== void 0) button.className = conversation_module_css_default.refLink;
|
|
7160
|
+
button.dataset.taskRef = taskRef;
|
|
7161
|
+
button.title = taskRef;
|
|
7162
|
+
button.textContent = taskLabel(resolved.taskNumber);
|
|
7163
|
+
fragment.append(button);
|
|
7164
|
+
}
|
|
7165
|
+
node.replaceWith(fragment);
|
|
7166
|
+
}
|
|
7167
|
+
/** Render one literal text run, linkifying branded refs when navigation is available. */
|
|
7168
|
+
function renderRefs(text, onOpenRef, taskLabel) {
|
|
7169
|
+
if (onOpenRef === void 0) return text;
|
|
7170
|
+
return splitBrandedRefs(text).map((segment, index) => {
|
|
7171
|
+
if (segment.ref === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: segment.text }, index);
|
|
7172
|
+
const resolved = cachedResolvedTaskRef(segment.ref);
|
|
7173
|
+
const label = resolved !== void 0 && segment.ref.startsWith("task:") ? taskLabel(resolved.taskNumber) : segment.ref;
|
|
7174
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
7175
|
+
type: "button",
|
|
7176
|
+
className: conversation_module_css_default.refLink,
|
|
7177
|
+
title: segment.ref,
|
|
7178
|
+
onClick: () => {
|
|
7179
|
+
onOpenRef(segment.ref);
|
|
7180
|
+
},
|
|
7181
|
+
children: label
|
|
7182
|
+
}, index);
|
|
7183
|
+
});
|
|
7184
|
+
}
|
|
6991
7185
|
/** One message's attachment strip: image thumbnails with a large view, or name chips when bytes are gone. */
|
|
6992
7186
|
function TeamAttachmentStrip({ attachments, loadAttachment, t }) {
|
|
6993
7187
|
const [zoomed, setZoomed] = (0, react.useState)();
|
|
@@ -7327,7 +7521,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7327
7521
|
hasMore: fresh.hasMore || current.cursor < fresh.cursor
|
|
7328
7522
|
};
|
|
7329
7523
|
}
|
|
7330
|
-
function TeamChannelPage({ workspaceId, channelRef, loadChannels, subscribeChanges, loadMembers, drafts, putAttachment, getAttachment, sendMessage, joinChannel, removeChannelMember, selectThread, backToChannels, t }) {
|
|
7524
|
+
function TeamChannelPage({ workspaceId, channelRef, loadChannels, subscribeChanges, loadMembers, drafts, putAttachment, getAttachment, sendMessage, joinChannel, removeChannelMember, selectThread, selectChannel, backToChannels, resolveTaskRefs, t }) {
|
|
7331
7525
|
const [view, setView] = (0, react.useState)();
|
|
7332
7526
|
const [members, setMembers] = (0, react.useState)([]);
|
|
7333
7527
|
const [error, setError] = (0, react.useState)();
|
|
@@ -7344,6 +7538,35 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7344
7538
|
const mountedRef = (0, react.useRef)(false);
|
|
7345
7539
|
const refreshSequenceRef = (0, react.useRef)(0);
|
|
7346
7540
|
const channelLastItem = view?.items[view.items.length - 1];
|
|
7541
|
+
const openRef = (ref) => {
|
|
7542
|
+
if (ref.startsWith("channel:")) {
|
|
7543
|
+
if (ref !== channelRef) selectChannel(ref);
|
|
7544
|
+
return;
|
|
7545
|
+
}
|
|
7546
|
+
if (ref.startsWith("task:")) {
|
|
7547
|
+
const match = view?.items.find((item) => item.task.taskRef === ref);
|
|
7548
|
+
if (match !== void 0) {
|
|
7549
|
+
selectThread(match.task.taskRef, match.thread.threadRef, channelRef, match.taskNumber);
|
|
7550
|
+
return;
|
|
7551
|
+
}
|
|
7552
|
+
resolveTaskRefs({
|
|
7553
|
+
workspaceId,
|
|
7554
|
+
taskRefs: [ref]
|
|
7555
|
+
}).then((result) => {
|
|
7556
|
+
if (!result.ok) return;
|
|
7557
|
+
const hit = result.value.resolved[0];
|
|
7558
|
+
if (hit !== void 0) selectThread(hit.taskRef, hit.threadRef, hit.channelRef, hit.taskNumber);
|
|
7559
|
+
});
|
|
7560
|
+
}
|
|
7561
|
+
};
|
|
7562
|
+
const lookupTaskRefs = (taskRefs) => resolveTaskRefs({
|
|
7563
|
+
workspaceId,
|
|
7564
|
+
taskRefs
|
|
7565
|
+
}).then((result) => {
|
|
7566
|
+
if (!result.ok) return [];
|
|
7567
|
+
for (const entry of result.value.resolved) rememberResolvedTaskRef(entry);
|
|
7568
|
+
return result.value.resolved;
|
|
7569
|
+
});
|
|
7347
7570
|
const timeline = useTimelineScroll(`${view?.items.length ?? 0}:${channelLastItem?.message.messageRef ?? ""}`);
|
|
7348
7571
|
const channel = view?.channels.find((item) => item.channelRef === channelRef);
|
|
7349
7572
|
const channelMemberIds = new Set(view?.members.filter((item) => item.channelRef === channelRef).map((item) => item.memberId) ?? []);
|
|
@@ -7689,6 +7912,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7689
7912
|
t,
|
|
7690
7913
|
occurredAt: item.message.occurredAt,
|
|
7691
7914
|
mentionNames: mentionNamesOf(item.mentions, mentionHandlesMap),
|
|
7915
|
+
onOpenRef: openRef,
|
|
7916
|
+
onResolveTaskRefs: lookupTaskRefs,
|
|
7692
7917
|
grouped: index > 0,
|
|
7693
7918
|
...senderStatus === void 0 ? {} : { senderTitle: senderStatus.member.description },
|
|
7694
7919
|
children: item.message.topLevel && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
@@ -7787,7 +8012,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7787
8012
|
return new Map(facts.map((fact) => [factKey(fact.fact), fact]));
|
|
7788
8013
|
}
|
|
7789
8014
|
function TeamThreadPage(props) {
|
|
7790
|
-
const { workspaceId, channelRef, taskRef, threadRef, taskNumber, backToWorkspace, loadChannels, readThread, loadThreadHistory, subscribeChanges, loadMembers, drafts, getAttachment, reply, changeTask, t } = props;
|
|
8015
|
+
const { workspaceId, channelRef, taskRef, threadRef, taskNumber, backToWorkspace, selectChannel, selectThread, resolveTaskRefs, putAttachment, loadChannels, readThread, loadThreadHistory, subscribeChanges, loadMembers, drafts, getAttachment, reply, changeTask, t } = props;
|
|
7791
8016
|
const [projection, setProjection] = (0, react.useState)();
|
|
7792
8017
|
const [channelView, setChannelView] = (0, react.useState)();
|
|
7793
8018
|
const [members, setMembers] = (0, react.useState)([]);
|
|
@@ -7801,6 +8026,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7801
8026
|
const draftKey = `thread:${threadRef}`;
|
|
7802
8027
|
const { draft, recipients } = (0, react.useSyncExternalStore)(drafts.subscribe, () => drafts.getSnapshot(draftKey));
|
|
7803
8028
|
const [claimsOpen, setClaimsOpen] = (0, react.useState)(false);
|
|
8029
|
+
const [confirmingAccept, setConfirmingAccept] = (0, react.useState)(false);
|
|
8030
|
+
(0, react.useEffect)(() => {
|
|
8031
|
+
if (confirmingAccept && projection?.task.resolution === "accepted") setConfirmingAccept(false);
|
|
8032
|
+
}, [confirmingAccept, projection?.task.resolution]);
|
|
7804
8033
|
const [replyRequestId, setReplyRequestId] = (0, react.useState)();
|
|
7805
8034
|
const [confirmation, setConfirmation] = (0, react.useState)();
|
|
7806
8035
|
const [statusMessage, setStatusMessage] = (0, react.useState)();
|
|
@@ -8045,6 +8274,26 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8045
8274
|
return status === void 0 ? t("memberUnknown") : `@${status.member.handle}`;
|
|
8046
8275
|
};
|
|
8047
8276
|
const messageSender = (fact) => fact.kind === "message" ? fact.message.sender : void 0;
|
|
8277
|
+
const [pendingFiles, setPendingFiles] = (0, react.useState)([]);
|
|
8278
|
+
const openRef = (ref) => {
|
|
8279
|
+
if (ref.startsWith("channel:") && ref !== channelRef) selectChannel(ref);
|
|
8280
|
+
if (ref.startsWith("task:") && ref !== taskRef) resolveTaskRefs({
|
|
8281
|
+
workspaceId,
|
|
8282
|
+
taskRefs: [ref]
|
|
8283
|
+
}).then((result) => {
|
|
8284
|
+
if (!result.ok) return;
|
|
8285
|
+
const hit = result.value.resolved[0];
|
|
8286
|
+
if (hit !== void 0) selectThread(hit.taskRef, hit.threadRef, hit.channelRef, hit.taskNumber);
|
|
8287
|
+
});
|
|
8288
|
+
};
|
|
8289
|
+
const lookupTaskRefs = (refs) => resolveTaskRefs({
|
|
8290
|
+
workspaceId,
|
|
8291
|
+
taskRefs: refs
|
|
8292
|
+
}).then((result) => {
|
|
8293
|
+
if (!result.ok) return [];
|
|
8294
|
+
for (const entry of result.value.resolved) rememberResolvedTaskRef(entry);
|
|
8295
|
+
return result.value.resolved;
|
|
8296
|
+
});
|
|
8048
8297
|
const renderFact = (fact, grouped = false) => {
|
|
8049
8298
|
if (fact.kind === "message") {
|
|
8050
8299
|
const sender = memberName(fact.message.sender);
|
|
@@ -8059,6 +8308,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8059
8308
|
t,
|
|
8060
8309
|
occurredAt: fact.message.occurredAt,
|
|
8061
8310
|
mentionNames: mentionNamesOf(fact.mentions, mentionHandlesMap),
|
|
8311
|
+
onOpenRef: openRef,
|
|
8312
|
+
onResolveTaskRefs: lookupTaskRefs,
|
|
8062
8313
|
grouped,
|
|
8063
8314
|
...senderStatus === void 0 ? {} : { senderTitle: senderStatus.member.description }
|
|
8064
8315
|
}, factKey(fact));
|
|
@@ -8190,6 +8441,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8190
8441
|
setPending(true);
|
|
8191
8442
|
setError(void 0);
|
|
8192
8443
|
try {
|
|
8444
|
+
const attachmentIds = [];
|
|
8445
|
+
for (const file of pendingFiles) {
|
|
8446
|
+
const uploaded = await putAttachment({
|
|
8447
|
+
requestId: crypto.randomUUID(),
|
|
8448
|
+
workspaceId,
|
|
8449
|
+
name: file.name,
|
|
8450
|
+
mediaType: file.type === "" ? void 0 : file.type,
|
|
8451
|
+
bytesBase64: bytesToBase64(new Uint8Array(await file.arrayBuffer()))
|
|
8452
|
+
});
|
|
8453
|
+
if (!uploaded.ok) {
|
|
8454
|
+
setError(uploaded.error.message);
|
|
8455
|
+
return;
|
|
8456
|
+
}
|
|
8457
|
+
attachmentIds.push(uploaded.value.attachmentId);
|
|
8458
|
+
}
|
|
8193
8459
|
const result = await reply({
|
|
8194
8460
|
requestId: id,
|
|
8195
8461
|
workspaceId,
|
|
@@ -8197,6 +8463,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8197
8463
|
body: draft.trim(),
|
|
8198
8464
|
baseRevision: thread.revision,
|
|
8199
8465
|
recipients: [...recipients].sort(),
|
|
8466
|
+
...attachmentIds.length === 0 ? {} : { attachments: attachmentIds },
|
|
8200
8467
|
...confirmation === void 0 ? {} : { confirmationToken: confirmation }
|
|
8201
8468
|
});
|
|
8202
8469
|
if (!result.ok) {
|
|
@@ -8221,6 +8488,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8221
8488
|
thread: committed.thread
|
|
8222
8489
|
});
|
|
8223
8490
|
drafts.clear(draftKey);
|
|
8491
|
+
setPendingFiles([]);
|
|
8224
8492
|
setReplyRequestId(void 0);
|
|
8225
8493
|
setConfirmation(void 0);
|
|
8226
8494
|
setStatusMessage(void 0);
|
|
@@ -8291,15 +8559,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8291
8559
|
})]
|
|
8292
8560
|
}), task !== void 0 && thread !== void 0 && task.resolution !== "closed" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8293
8561
|
className: conversation_module_css_default.headerActions,
|
|
8294
|
-
children: [
|
|
8295
|
-
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
-
|
|
8299
|
-
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8562
|
+
children: [(() => {
|
|
8563
|
+
const activeClaims = projection?.claims.filter((claim) => claim.taskRef === task.taskRef && claim.state === "active") ?? [];
|
|
8564
|
+
const earlyAccept = task.resolution === "open" && task.status === "in_progress" && activeClaims.length > 0;
|
|
8565
|
+
if (!(task.status === "in_review" || earlyAccept) || task.resolution !== "open") return null;
|
|
8566
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
8567
|
+
size: "sm",
|
|
8568
|
+
variant: "primary",
|
|
8569
|
+
disabled: pending,
|
|
8570
|
+
onClick: () => {
|
|
8571
|
+
if (earlyAccept) setConfirmingAccept(true);
|
|
8572
|
+
else mutateTask("accept");
|
|
8573
|
+
},
|
|
8574
|
+
children: t("acceptTask")
|
|
8575
|
+
});
|
|
8576
|
+
})(), task.resolution === "open" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
8303
8577
|
size: "sm",
|
|
8304
8578
|
variant: "outline",
|
|
8305
8579
|
disabled: pending,
|
|
@@ -8336,6 +8610,43 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8336
8610
|
] })]
|
|
8337
8611
|
}, claim.claimRef))]
|
|
8338
8612
|
}),
|
|
8613
|
+
task !== void 0 && thread !== void 0 && (() => {
|
|
8614
|
+
const activeClaims = projection?.claims.filter((claim) => claim.taskRef === task.taskRef && claim.state === "active") ?? [];
|
|
8615
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
8616
|
+
open: confirmingAccept,
|
|
8617
|
+
onClose: () => {
|
|
8618
|
+
if (!pending) setConfirmingAccept(false);
|
|
8619
|
+
},
|
|
8620
|
+
title: t("acceptEarlyTitle"),
|
|
8621
|
+
closeLabel: t("cancel"),
|
|
8622
|
+
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
8623
|
+
variant: "outline",
|
|
8624
|
+
disabled: pending,
|
|
8625
|
+
onClick: () => {
|
|
8626
|
+
setConfirmingAccept(false);
|
|
8627
|
+
},
|
|
8628
|
+
children: t("cancel")
|
|
8629
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
8630
|
+
variant: "primary",
|
|
8631
|
+
disabled: pending,
|
|
8632
|
+
onClick: () => {
|
|
8633
|
+
mutateTask("accept");
|
|
8634
|
+
},
|
|
8635
|
+
children: pending ? t("acceptingTask") : t("acceptTask")
|
|
8636
|
+
})] }),
|
|
8637
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
8638
|
+
className: conversation_module_css_default.confirmBody,
|
|
8639
|
+
children: t("acceptEarlyBody", { count: activeClaims.length })
|
|
8640
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
8641
|
+
className: conversation_module_css_default.confirmList,
|
|
8642
|
+
children: activeClaims.map((claim) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { children: [
|
|
8643
|
+
memberName(claim.owner),
|
|
8644
|
+
" · ",
|
|
8645
|
+
claim.direction
|
|
8646
|
+
] }, claim.claimRef))
|
|
8647
|
+
})]
|
|
8648
|
+
});
|
|
8649
|
+
})(),
|
|
8339
8650
|
task !== void 0 && thread !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", {
|
|
8340
8651
|
className: thread_module_css_default.workSection,
|
|
8341
8652
|
"aria-label": t("claims"),
|
|
@@ -8502,6 +8813,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8502
8813
|
onSubmit: () => {
|
|
8503
8814
|
sendReply();
|
|
8504
8815
|
},
|
|
8816
|
+
pendingFiles,
|
|
8817
|
+
onFilesChange: setPendingFiles,
|
|
8505
8818
|
t
|
|
8506
8819
|
}, draftKey) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {})
|
|
8507
8820
|
]
|
|
@@ -8509,14 +8822,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8509
8822
|
}
|
|
8510
8823
|
//#endregion
|
|
8511
8824
|
//#region src/client/TeamConversation.tsx
|
|
8512
|
-
function TeamConversation({ t, useWorkspaces, navigation, drafts, putAttachment, getAttachment, loadChannels, readThread, loadThreadHistory, subscribeChanges, loadMembers, sendMessage, joinChannel, removeChannelMember, reply, changeTask, selectThread, backToWorkspace, backToChannels }) {
|
|
8825
|
+
function TeamConversation({ t, useWorkspaces, navigation, drafts, putAttachment, getAttachment, loadChannels, readThread, loadThreadHistory, subscribeChanges, loadMembers, sendMessage, joinChannel, removeChannelMember, reply, changeTask, selectThread, selectChannel, backToWorkspace, backToChannels, resolveTaskRefs }) {
|
|
8513
8826
|
const navigationState = (0, react.useSyncExternalStore)(navigation.subscribe, navigation.getSnapshot, navigation.getSnapshot);
|
|
8514
8827
|
const current = useWorkspaces((state) => state.items).find((workspace) => workspace.workspaceId === navigationState.workspaceId);
|
|
8515
8828
|
if (current !== void 0 && navigationState.taskRef !== void 0 && navigationState.threadRef !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamThreadPage, {
|
|
8516
8829
|
workspaceId: current.workspaceId,
|
|
8830
|
+
putAttachment,
|
|
8517
8831
|
taskRef: navigationState.taskRef,
|
|
8518
8832
|
threadRef: navigationState.threadRef,
|
|
8519
8833
|
backToWorkspace,
|
|
8834
|
+
selectChannel,
|
|
8835
|
+
selectThread,
|
|
8836
|
+
resolveTaskRefs,
|
|
8520
8837
|
...navigationState.channelRef === void 0 ? {} : { channelRef: navigationState.channelRef },
|
|
8521
8838
|
...navigationState.taskNumber === void 0 ? {} : { taskNumber: navigationState.taskNumber },
|
|
8522
8839
|
drafts,
|
|
@@ -8543,7 +8860,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8543
8860
|
joinChannel,
|
|
8544
8861
|
removeChannelMember,
|
|
8545
8862
|
selectThread,
|
|
8863
|
+
selectChannel,
|
|
8546
8864
|
backToChannels,
|
|
8865
|
+
resolveTaskRefs,
|
|
8547
8866
|
t
|
|
8548
8867
|
}, navigationState.channelRef);
|
|
8549
8868
|
const welcome = current === void 0 ? {
|
|
@@ -8573,7 +8892,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8573
8892
|
}
|
|
8574
8893
|
//#endregion
|
|
8575
8894
|
//#region \0dsh-css:/home/yu/projects/dsh-agent-team/packages/client-agent-team/src/client/sidebar.module.css.mjs
|
|
8576
|
-
const css$1 = "html[data-agent-team-mode=team] button[class*=newSession]{display:none}.d0xfxa_workspaceBrowser{flex-direction:column;height:100%;min-height:0;padding:0 8px 8px;display:flex}.d0xfxa_workspaceHeader{color:var(--dsw-alias-label-tertiary);justify-content:space-between;align-items:center;min-height:28px;padding:0 4px 0 8px;font-size:13px;font-weight:600;line-height:20px;display:flex}.d0xfxa_railButton{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;display:inline-flex}.d0xfxa_railButton:hover,.d0xfxa_railButton:focus-visible{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary);outline:none}.d0xfxa_workspaceList{flex-direction:column;gap:2px;padding-bottom:2px;display:flex}.d0xfxa_workspaceRow{color:var(--dsw-alias-label-primary);cursor:pointer;text-align:left;background:0 0;border:0;border-radius:8px;align-items:center;gap:6px;width:100%;height:34px;padding:0 8px;display:flex}.d0xfxa_workspaceRow:hover,.d0xfxa_workspaceRow:focus-visible,.d0xfxa_workspaceRow[aria-current=page]{background:var(--dsw-alias-interactive-bg-hover);outline:none}.d0xfxa_workspaceRow:focus-visible{box-shadow:inset 0 0 0 1px var(--dsw-alias-border-l3)}.d0xfxa_workspaceIcon{color:var(--dsw-alias-label-tertiary);flex:0 0 16px;justify-content:center;align-items:center;height:20px;display:inline-flex}.d0xfxa_workspaceRow[data-selected] .d0xfxa_workspaceIcon{color:var(--dsw-alias-state-business-primary)}.d0xfxa_workspaceCopy{min-width:0;display:flex}.d0xfxa_workspaceCopy strong{text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:400;line-height:20px;overflow:hidden}.d0xfxa_emptyState{color:var(--dsw-alias-label-tertiary);margin:8px;font-size:12px;line-height:18px}.d0xfxa_railWorkspace{flex-direction:column;align-items:center;gap:8px;padding-top:8px;display:flex}.d0xfxa_railButton{border-radius:50%;width:36px;height:36px}.d0xfxa_railButton[data-active]{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.d0xfxa_workspaceSection{flex-direction:column;flex:1;gap:4px;min-height:0;margin-top:2px;display:flex;overflow-y:auto}.d0xfxa_section{flex-direction:column;display:flex}.d0xfxa_sectionHeader{align-items:center;min-height:26px;padding-right:2px;display:flex}.d0xfxa_sectionToggle{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;align-items:center;gap:4px;min-width:0;min-height:24px;padding:0 6px;font-size:12px;line-height:18px;display:inline-flex}.d0xfxa_sectionToggle:focus-visible{outline:none}.d0xfxa_sectionToggle:hover .d0xfxa_sectionChevron,.d0xfxa_sectionToggle:focus-visible .d0xfxa_sectionChevron{color:var(--dsw-alias-label-primary)}.d0xfxa_sectionChevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .12s,color .12s}.d0xfxa_sectionToggle[aria-expanded=false] .d0xfxa_sectionChevron{transform:rotate(-90deg)}.d0xfxa_sectionTitle{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.d0xfxa_sectionActions{align-items:center;margin-left:auto;display:inline-flex}.d0xfxa_panel{flex-direction:column;display:flex}.d0xfxa_iconButton{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:50%;justify-content:center;align-items:center;width:24px;height:24px;padding:0;display:inline-flex}.d0xfxa_iconButton:hover,.d0xfxa_iconButton:focus-visible{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary);outline:none}.d0xfxa_textButton{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:5px;padding:2px 5px;font-size:11px;line-height:18px}.d0xfxa_textButton:hover,.d0xfxa_textButton:focus-visible{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary);outline:none}.d0xfxa_textButton:disabled{cursor:not-allowed;opacity:.4}.d0xfxa_channelList,.d0xfxa_agentList{flex-direction:column;gap:1px;padding:0 4px 4px;display:flex}.d0xfxa_channelRow{color:var(--dsw-alias-label-primary);border-radius:8px;align-items:center;min-height:30px;display:flex;position:relative}.d0xfxa_channelSelect{box-sizing:border-box;color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;flex:1;align-items:center;min-width:0;min-height:30px;padding:3px 4px 3px 8px;display:flex}.d0xfxa_channelSelect:focus-visible{outline:none}.d0xfxa_channelName{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:400;line-height:18px;overflow:hidden}.d0xfxa_agentRow{color:var(--dsw-alias-label-primary);border-radius:8px;align-items:center;min-height:38px;display:flex;position:relative}.d0xfxa_agentSelect{box-sizing:border-box;color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;flex:1;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:0 8px;min-width:0;min-height:38px;padding:3px 4px 3px 8px;display:grid}.d0xfxa_agentSelect:focus-visible{outline:none}.d0xfxa_agentSelect[aria-current=page]{background:var(--dsw-alias-interactive-bg-hover);border-radius:8px}.d0xfxa_agentRow:hover .d0xfxa_agentSelect[aria-current=page],.d0xfxa_agentRow:focus-within .d0xfxa_agentSelect[aria-current=page],.d0xfxa_agentRow[data-menu-open] .d0xfxa_agentSelect[aria-current=page]{background:0 0}.d0xfxa_agentAvatar{background:hsl(var(--team-avatar-hue,212) 42% 46%);color:#fff;cursor:default;border-radius:50%;flex:0 0 24px;justify-content:center;align-items:center;width:24px;height:24px;font-size:11px;font-weight:600;display:inline-flex;position:relative}.d0xfxa_agentAvatarBadge{background:var(--dsw-specific-sidebar-fill);box-shadow:0 0 0 1px var(--dsw-specific-sidebar-fill);border-radius:50%;justify-content:center;align-items:center;width:12px;height:12px;padding:1px;line-height:0;display:inline-flex;position:absolute;bottom:-3px;right:-3px}.d0xfxa_agentCopy{flex-direction:column;min-width:0;display:flex}.d0xfxa_agentCopy strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:400;line-height:17px;overflow:hidden}.d0xfxa_agentCopy small{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:13px;overflow:hidden}.d0xfxa_unavailableDot{background:var(--dsw-alias-label-tertiary);border-radius:50%;width:7px;height:7px;display:inline-block}.d0xfxa_rowMenu{flex:none;align-items:center;padding-right:4px;display:none}.d0xfxa_channelRow:hover .d0xfxa_rowMenu,.d0xfxa_channelRow:focus-within .d0xfxa_rowMenu,.d0xfxa_channelRow[data-menu-open] .d0xfxa_rowMenu,.d0xfxa_agentRow:hover .d0xfxa_rowMenu,.d0xfxa_agentRow:focus-within .d0xfxa_rowMenu,.d0xfxa_agentRow[data-menu-open] .d0xfxa_rowMenu{display:inline-flex}.d0xfxa_channelRow[data-menu-open],.d0xfxa_agentRow[data-menu-open],.d0xfxa_channelRow:hover,.d0xfxa_agentRow:hover,.d0xfxa_channelRow:focus-within,.d0xfxa_agentRow:focus-within,.d0xfxa_channelRow[aria-current=page]{background:var(--dsw-alias-interactive-bg-hover)}.d0xfxa_rowMenuButton{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:4px;justify-content:center;align-items:center;width:20px;height:20px;padding:0;display:inline-flex}.d0xfxa_rowMenuButton:hover,.d0xfxa_rowMenuButton:focus-visible{color:var(--dsw-alias-label-primary);outline:none}.d0xfxa_retryError{color:var(--dsw-alias-state-error-primary);justify-content:space-between;align-items:center;gap:8px;padding:8px;font-size:11px;display:flex}.d0xfxa_editDescription{color:var(--dsw-alias-label-secondary);margin:0 0 10px;font-size:12px;line-height:18px}.d0xfxa_editMemberList{gap:3px;display:grid}.d0xfxa_editMemberRow{border-radius:6px;grid-template-columns:14px minmax(0,1fr) auto;align-items:center;gap:0 8px;min-height:40px;padding:3px 6px;display:grid}.d0xfxa_editMemberRowChannels{grid-template-columns:minmax(0,1fr) auto}.d0xfxa_editMemberRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.d0xfxa_editMemberCopy{min-width:0;display:grid}.d0xfxa_editMemberCopy strong{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:500;line-height:18px;overflow:hidden}.d0xfxa_editMemberCopy small{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:14px;overflow:hidden}.d0xfxa_editChannelName{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:400;line-height:18px;overflow:hidden}.d0xfxa_editMemberRow button{min-width:60px}.d0xfxa_editHint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:11px;line-height:16px}.d0xfxa_menuHint{color:var(--dsw-alias-label-tertiary);margin-left:4px;font-size:10px;line-height:14px}.d0xfxa_rowError{color:var(--dsw-alias-state-error-primary);grid-column:1/-1;margin:2px 0;font-size:11px;line-height:16px}";
|
|
8895
|
+
const css$1 = "html[data-agent-team-mode=team] button[class*=newSession]{display:none}.d0xfxa_workspaceBrowser{flex-direction:column;height:100%;min-height:0;padding:0 8px 8px;display:flex}.d0xfxa_workspaceHeader{color:var(--dsw-alias-label-tertiary);justify-content:space-between;align-items:center;min-height:28px;padding:0 4px 0 8px;font-size:13px;font-weight:600;line-height:20px;display:flex}.d0xfxa_railButton{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;display:inline-flex}.d0xfxa_railButton:hover,.d0xfxa_railButton:focus-visible{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary);outline:none}.d0xfxa_workspaceList{flex-direction:column;gap:2px;padding-bottom:2px;display:flex}.d0xfxa_workspaceRow{color:var(--dsw-alias-label-primary);cursor:pointer;text-align:left;background:0 0;border:0;border-radius:8px;align-items:center;gap:6px;width:100%;height:34px;padding:0 8px;display:flex}.d0xfxa_workspaceRow:hover,.d0xfxa_workspaceRow:focus-visible,.d0xfxa_workspaceRow[aria-current=page]{background:var(--dsw-alias-interactive-bg-hover);outline:none}.d0xfxa_workspaceRow:focus-visible{box-shadow:inset 0 0 0 1px var(--dsw-alias-border-l3)}.d0xfxa_workspaceIcon{color:var(--dsw-alias-label-tertiary);flex:0 0 16px;justify-content:center;align-items:center;height:20px;display:inline-flex}.d0xfxa_workspaceRow[data-selected] .d0xfxa_workspaceIcon{color:var(--dsw-alias-state-business-primary)}.d0xfxa_workspaceCopy{min-width:0;display:flex}.d0xfxa_workspaceCopy strong{text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:400;line-height:20px;overflow:hidden}.d0xfxa_emptyState{color:var(--dsw-alias-label-tertiary);margin:8px;font-size:12px;line-height:18px}.d0xfxa_railWorkspace{flex-direction:column;align-items:center;gap:8px;padding-top:8px;display:flex}.d0xfxa_railButton{border-radius:50%;width:36px;height:36px}.d0xfxa_railButton[data-active]{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.d0xfxa_workspaceSection{flex-direction:column;flex:1;gap:4px;min-height:0;margin-top:2px;display:flex;overflow-y:auto}.d0xfxa_section{flex-direction:column;display:flex}.d0xfxa_sectionHeader{align-items:center;min-height:26px;padding-right:2px;display:flex}.d0xfxa_sectionToggle{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;align-items:center;gap:4px;min-width:0;min-height:24px;padding:0 6px;font-size:12px;line-height:18px;display:inline-flex}.d0xfxa_sectionToggle:focus-visible{outline:none}.d0xfxa_sectionToggle:hover .d0xfxa_sectionChevron,.d0xfxa_sectionToggle:focus-visible .d0xfxa_sectionChevron{color:var(--dsw-alias-label-primary)}.d0xfxa_sectionChevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .12s,color .12s}.d0xfxa_sectionToggle[aria-expanded=false] .d0xfxa_sectionChevron{transform:rotate(-90deg)}.d0xfxa_sectionTitle{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.d0xfxa_sectionActions{align-items:center;margin-left:auto;display:inline-flex}.d0xfxa_panel{flex-direction:column;display:flex}.d0xfxa_iconButton{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:50%;justify-content:center;align-items:center;width:24px;height:24px;padding:0;display:inline-flex}.d0xfxa_iconButton:hover,.d0xfxa_iconButton:focus-visible{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary);outline:none}.d0xfxa_textButton{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:5px;padding:2px 5px;font-size:11px;line-height:18px}.d0xfxa_textButton:hover,.d0xfxa_textButton:focus-visible{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary);outline:none}.d0xfxa_textButton:disabled{cursor:not-allowed;opacity:.4}.d0xfxa_channelList,.d0xfxa_agentList{flex-direction:column;gap:1px;padding:0 4px 4px;display:flex}.d0xfxa_sidebarRowDragging{opacity:.5}.d0xfxa_sidebarRowDropBefore,.d0xfxa_sidebarRowDropAfter{position:relative}.d0xfxa_sidebarRowDropBefore:before,.d0xfxa_sidebarRowDropAfter:after{content:\"\";z-index:1;background:linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat, linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat, linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;pointer-events:none;height:12px;position:absolute;left:0;right:4px}.d0xfxa_sidebarRowDropBefore:before{top:-7px}.d0xfxa_sidebarRowDropAfter:after{bottom:-7px}.d0xfxa_channelRow{color:var(--dsw-alias-label-primary);border-radius:8px;align-items:center;min-height:30px;display:flex;position:relative}.d0xfxa_channelSelect{box-sizing:border-box;color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;flex:1;align-items:center;min-width:0;min-height:30px;padding:3px 4px 3px 8px;display:flex}.d0xfxa_channelSelect:focus-visible{outline:none}.d0xfxa_channelName{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:400;line-height:18px;overflow:hidden}.d0xfxa_agentRow{color:var(--dsw-alias-label-primary);border-radius:8px;align-items:center;min-height:38px;display:flex;position:relative}.d0xfxa_agentSelect{box-sizing:border-box;color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;flex:1;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:0 8px;min-width:0;min-height:38px;padding:3px 4px 3px 8px;display:grid}.d0xfxa_agentSelect:focus-visible{outline:none}.d0xfxa_agentSelect[aria-current=page]{background:var(--dsw-alias-interactive-bg-hover);border-radius:8px}.d0xfxa_agentRow:hover .d0xfxa_agentSelect[aria-current=page],.d0xfxa_agentRow:focus-within .d0xfxa_agentSelect[aria-current=page],.d0xfxa_agentRow[data-menu-open] .d0xfxa_agentSelect[aria-current=page]{background:0 0}.d0xfxa_agentAvatar{background:hsl(var(--team-avatar-hue,212) 42% 46%);color:#fff;cursor:default;border-radius:50%;flex:0 0 24px;justify-content:center;align-items:center;width:24px;height:24px;font-size:11px;font-weight:600;display:inline-flex;position:relative}.d0xfxa_agentAvatarBadge{background:var(--dsw-specific-sidebar-fill);box-shadow:0 0 0 1px var(--dsw-specific-sidebar-fill);border-radius:50%;justify-content:center;align-items:center;width:12px;height:12px;padding:1px;line-height:0;display:inline-flex;position:absolute;bottom:-3px;right:-3px}.d0xfxa_agentCopy{flex-direction:column;min-width:0;display:flex}.d0xfxa_agentCopy strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:400;line-height:17px;overflow:hidden}.d0xfxa_agentCopy small{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:13px;overflow:hidden}.d0xfxa_unavailableDot{background:var(--dsw-alias-label-tertiary);border-radius:50%;width:7px;height:7px;display:inline-block}.d0xfxa_rowMenu{flex:none;align-items:center;padding-right:4px;display:none}.d0xfxa_channelRow:hover .d0xfxa_rowMenu,.d0xfxa_channelRow:focus-within .d0xfxa_rowMenu,.d0xfxa_channelRow[data-menu-open] .d0xfxa_rowMenu,.d0xfxa_agentRow:hover .d0xfxa_rowMenu,.d0xfxa_agentRow:focus-within .d0xfxa_rowMenu,.d0xfxa_agentRow[data-menu-open] .d0xfxa_rowMenu{display:inline-flex}.d0xfxa_channelRow[data-menu-open],.d0xfxa_agentRow[data-menu-open],.d0xfxa_channelRow:hover,.d0xfxa_agentRow:hover,.d0xfxa_channelRow:focus-within,.d0xfxa_agentRow:focus-within,.d0xfxa_channelRow[aria-current=page]{background:var(--dsw-alias-interactive-bg-hover)}.d0xfxa_rowMenuButton{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:4px;justify-content:center;align-items:center;width:20px;height:20px;padding:0;display:inline-flex}.d0xfxa_rowMenuButton:hover,.d0xfxa_rowMenuButton:focus-visible{color:var(--dsw-alias-label-primary);outline:none}.d0xfxa_retryError{color:var(--dsw-alias-state-error-primary);justify-content:space-between;align-items:center;gap:8px;padding:8px;font-size:11px;display:flex}.d0xfxa_editDescription{color:var(--dsw-alias-label-secondary);margin:0 0 10px;font-size:12px;line-height:18px}.d0xfxa_editMemberList{gap:3px;display:grid}.d0xfxa_editMemberRow{border-radius:6px;grid-template-columns:14px minmax(0,1fr) auto;align-items:center;gap:0 8px;min-height:40px;padding:3px 6px;display:grid}.d0xfxa_editMemberRowChannels{grid-template-columns:minmax(0,1fr) auto}.d0xfxa_editMemberRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.d0xfxa_editMemberCopy{min-width:0;display:grid}.d0xfxa_editMemberCopy strong{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:500;line-height:18px;overflow:hidden}.d0xfxa_editMemberCopy small{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:14px;overflow:hidden}.d0xfxa_editChannelName{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:400;line-height:18px;overflow:hidden}.d0xfxa_editMemberRow button{min-width:60px}.d0xfxa_editHint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:11px;line-height:16px}.d0xfxa_menuHint{color:var(--dsw-alias-label-tertiary);margin-left:4px;font-size:10px;line-height:14px}.d0xfxa_rowError{color:var(--dsw-alias-state-error-primary);grid-column:1/-1;margin:2px 0;font-size:11px;line-height:16px}";
|
|
8577
8896
|
const tagId$1 = "@wowyuarm/dsh-agent-team/sidebar.module.css";
|
|
8578
8897
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
8579
8898
|
const tag = document.createElement("style");
|
|
@@ -8616,6 +8935,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8616
8935
|
"sectionHeader": "d0xfxa_sectionHeader",
|
|
8617
8936
|
"sectionTitle": "d0xfxa_sectionTitle",
|
|
8618
8937
|
"sectionToggle": "d0xfxa_sectionToggle",
|
|
8938
|
+
"sidebarRowDragging": "d0xfxa_sidebarRowDragging",
|
|
8939
|
+
"sidebarRowDropAfter": "d0xfxa_sidebarRowDropAfter",
|
|
8940
|
+
"sidebarRowDropBefore": "d0xfxa_sidebarRowDropBefore",
|
|
8619
8941
|
"textButton": "d0xfxa_textButton",
|
|
8620
8942
|
"unavailableDot": "d0xfxa_unavailableDot",
|
|
8621
8943
|
"workspaceBrowser": "d0xfxa_workspaceBrowser",
|
|
@@ -8678,6 +9000,237 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8678
9000
|
});
|
|
8679
9001
|
}
|
|
8680
9002
|
//#endregion
|
|
9003
|
+
//#region src/client/sidebar-drag.tsx
|
|
9004
|
+
/**
|
|
9005
|
+
* Native whole-row drag for the Team sidebar lists. Unlike the Harness
|
|
9006
|
+
* workspace list there is no document-level acceptance here: hovering another
|
|
9007
|
+
* row shows the before/after insertion marker and releasing on a row commits
|
|
9008
|
+
* exactly once per gesture, while a release outside any row — including over
|
|
9009
|
+
* the other sidebar list, whose panel never responds — just cancels without
|
|
9010
|
+
* committing.
|
|
9011
|
+
*/
|
|
9012
|
+
/**
|
|
9013
|
+
* One drag gesture per panel instance. `onCommit` receives the moved ref,
|
|
9014
|
+
* the drop target and the insertion side exactly once per completed gesture;
|
|
9015
|
+
* releases outside the list never reach it.
|
|
9016
|
+
*/
|
|
9017
|
+
function useSidebarRowDrag({ refs, onCommit }) {
|
|
9018
|
+
const [state, setState] = (0, react.useState)(null);
|
|
9019
|
+
const committed = (0, react.useRef)(false);
|
|
9020
|
+
const half = (event) => {
|
|
9021
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
9022
|
+
return event.clientY - rect.top < rect.height / 2 ? "before" : "after";
|
|
9023
|
+
};
|
|
9024
|
+
return { rowProps: (orderKey) => ({
|
|
9025
|
+
draggable: true,
|
|
9026
|
+
className: state === null ? void 0 : state.active === orderKey ? sidebar_module_css_default.sidebarRowDragging : state.over === orderKey ? state.marker === "before" ? sidebar_module_css_default.sidebarRowDropBefore : sidebar_module_css_default.sidebarRowDropAfter : void 0,
|
|
9027
|
+
onDragStart: (event) => {
|
|
9028
|
+
if (event.dataTransfer === null) return;
|
|
9029
|
+
event.dataTransfer.effectAllowed = "move";
|
|
9030
|
+
event.dataTransfer.setData("text/plain", orderKey);
|
|
9031
|
+
committed.current = false;
|
|
9032
|
+
setState({
|
|
9033
|
+
active: orderKey,
|
|
9034
|
+
over: orderKey,
|
|
9035
|
+
marker: "after"
|
|
9036
|
+
});
|
|
9037
|
+
},
|
|
9038
|
+
onDragEnd: () => {
|
|
9039
|
+
setState(null);
|
|
9040
|
+
},
|
|
9041
|
+
onDragOver: (event) => {
|
|
9042
|
+
if (state === null || !refs.includes(orderKey)) return;
|
|
9043
|
+
event.preventDefault();
|
|
9044
|
+
if (event.dataTransfer !== null) event.dataTransfer.dropEffect = "move";
|
|
9045
|
+
const marker = half(event);
|
|
9046
|
+
if (state.over !== orderKey || state.marker !== marker) setState({
|
|
9047
|
+
...state,
|
|
9048
|
+
over: orderKey,
|
|
9049
|
+
marker
|
|
9050
|
+
});
|
|
9051
|
+
},
|
|
9052
|
+
onDrop: (event) => {
|
|
9053
|
+
if (state === null || !refs.includes(orderKey)) return;
|
|
9054
|
+
event.preventDefault();
|
|
9055
|
+
if (committed.current) return;
|
|
9056
|
+
committed.current = true;
|
|
9057
|
+
onCommit(state.active, orderKey, half(event));
|
|
9058
|
+
}
|
|
9059
|
+
}) };
|
|
9060
|
+
}
|
|
9061
|
+
/**
|
|
9062
|
+
* Transparent wrapper that owns the drop-marker styling for one draggable
|
|
9063
|
+
* sidebar row. It adds no layout of its own; the styled row stays inside so
|
|
9064
|
+
* hover/focus descendant selectors keep working.
|
|
9065
|
+
*/
|
|
9066
|
+
function SortableRow({ drag, orderKey, children }) {
|
|
9067
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9068
|
+
...drag.rowProps(orderKey),
|
|
9069
|
+
children
|
|
9070
|
+
});
|
|
9071
|
+
}
|
|
9072
|
+
//#endregion
|
|
9073
|
+
//#region src/client/sidebar-order.ts
|
|
9074
|
+
/**
|
|
9075
|
+
* Human presentation preference for the Team sidebar: the row order of the
|
|
9076
|
+
* Channels and Agents lists. The order lives in this browser only — it is UI
|
|
9077
|
+
* taste, never a shared Team fact, so nothing here touches the ledger.
|
|
9078
|
+
*
|
|
9079
|
+
* One deep module owns the whole concern: storage, reconcile against the
|
|
9080
|
+
* current Remote order (drop removed refs, keep the user's relative order,
|
|
9081
|
+
* append newcomers in default order), the single `moveSidebarItem` mutation
|
|
9082
|
+
* behind whole-row drag, and a small subscription hook with snapshot-stable
|
|
9083
|
+
* results for `useSyncExternalStore`.
|
|
9084
|
+
*/
|
|
9085
|
+
const STORAGE_KEY = "dsh.agent-team.sidebar-order";
|
|
9086
|
+
function listKey(workspaceId, kind) {
|
|
9087
|
+
return workspaceId === void 0 ? void 0 : `${workspaceId}|${kind}`;
|
|
9088
|
+
}
|
|
9089
|
+
const MEMORY_ONLY = Symbol("sidebar-order.memory");
|
|
9090
|
+
/**
|
|
9091
|
+
* Read-through parse cache over the raw persisted payload: repeated snapshots
|
|
9092
|
+
* skip re-validating an unchanged payload, while anything written outside this
|
|
9093
|
+
* module — another tab, devtools, a cleared store — is picked up because the
|
|
9094
|
+
* raw comparison misses.
|
|
9095
|
+
*/
|
|
9096
|
+
let cachedRaw;
|
|
9097
|
+
let cachedOrders = {};
|
|
9098
|
+
/**
|
|
9099
|
+
* Parse persisted orders defensively: private mode, quota errors, and stale
|
|
9100
|
+
* or corrupted payloads all degrade to "no preference" instead of breaking
|
|
9101
|
+
* the sidebar.
|
|
9102
|
+
*/
|
|
9103
|
+
function storedOrders() {
|
|
9104
|
+
let raw = null;
|
|
9105
|
+
try {
|
|
9106
|
+
raw = typeof localStorage === "undefined" ? null : localStorage.getItem(STORAGE_KEY);
|
|
9107
|
+
} catch {
|
|
9108
|
+
raw = null;
|
|
9109
|
+
}
|
|
9110
|
+
if (cachedRaw !== void 0 && raw !== null && raw === cachedRaw) return cachedOrders;
|
|
9111
|
+
if (raw === null) {
|
|
9112
|
+
if (cachedRaw === MEMORY_ONLY) return cachedOrders;
|
|
9113
|
+
cachedRaw = raw;
|
|
9114
|
+
cachedOrders = {};
|
|
9115
|
+
return cachedOrders;
|
|
9116
|
+
}
|
|
9117
|
+
try {
|
|
9118
|
+
const parsed = JSON.parse(raw);
|
|
9119
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("not an object");
|
|
9120
|
+
const clean = {};
|
|
9121
|
+
for (const [key, value] of Object.entries(parsed)) {
|
|
9122
|
+
if (!Array.isArray(value) || !value.every((entry) => typeof entry === "string")) continue;
|
|
9123
|
+
clean[key] = value;
|
|
9124
|
+
}
|
|
9125
|
+
cachedRaw = raw;
|
|
9126
|
+
cachedOrders = clean;
|
|
9127
|
+
return cachedOrders;
|
|
9128
|
+
} catch {
|
|
9129
|
+
return {};
|
|
9130
|
+
}
|
|
9131
|
+
}
|
|
9132
|
+
function saveOrder(key, refs) {
|
|
9133
|
+
const next = {
|
|
9134
|
+
...structuredClone(storedOrders()),
|
|
9135
|
+
[key]: refs
|
|
9136
|
+
};
|
|
9137
|
+
cachedOrders = next;
|
|
9138
|
+
try {
|
|
9139
|
+
if (typeof localStorage !== "undefined") {
|
|
9140
|
+
const raw = JSON.stringify(next);
|
|
9141
|
+
localStorage.setItem(STORAGE_KEY, raw);
|
|
9142
|
+
cachedRaw = raw;
|
|
9143
|
+
return;
|
|
9144
|
+
}
|
|
9145
|
+
} catch {}
|
|
9146
|
+
cachedRaw = MEMORY_ONLY;
|
|
9147
|
+
}
|
|
9148
|
+
/**
|
|
9149
|
+
* Merge the saved personal order into the current Remote order: kept refs
|
|
9150
|
+
* stay in the user's relative order with duplicates collapsed, removed refs
|
|
9151
|
+
* disappear, and new refs join in their Remote default positions after the
|
|
9152
|
+
* known ones.
|
|
9153
|
+
*/
|
|
9154
|
+
function reconcileSidebarOrder(saved, current) {
|
|
9155
|
+
const present = new Set(current);
|
|
9156
|
+
const seen = /* @__PURE__ */ new Set();
|
|
9157
|
+
const merged = [];
|
|
9158
|
+
for (const ref of saved) {
|
|
9159
|
+
if (seen.has(ref) || !present.has(ref)) continue;
|
|
9160
|
+
seen.add(ref);
|
|
9161
|
+
merged.push(ref);
|
|
9162
|
+
}
|
|
9163
|
+
for (const ref of current) {
|
|
9164
|
+
if (seen.has(ref)) continue;
|
|
9165
|
+
seen.add(ref);
|
|
9166
|
+
merged.push(ref);
|
|
9167
|
+
}
|
|
9168
|
+
return merged;
|
|
9169
|
+
}
|
|
9170
|
+
let revision = 0;
|
|
9171
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
9172
|
+
const snapshots = /* @__PURE__ */ new Map();
|
|
9173
|
+
function savedFingerprint(key) {
|
|
9174
|
+
const saved = storedOrders()[key];
|
|
9175
|
+
return saved === void 0 ? "" : `f${saved.length}:${saved.join(",")}`;
|
|
9176
|
+
}
|
|
9177
|
+
function emitChange() {
|
|
9178
|
+
revision += 1;
|
|
9179
|
+
for (const listener of listeners) listener();
|
|
9180
|
+
}
|
|
9181
|
+
function orderedSnapshot(workspaceId, kind, refs) {
|
|
9182
|
+
const key = listKey(workspaceId, kind);
|
|
9183
|
+
if (key === void 0) return refs;
|
|
9184
|
+
const signature = refs.join("\0");
|
|
9185
|
+
const fingerprint = savedFingerprint(key);
|
|
9186
|
+
const hit = snapshots.get(key);
|
|
9187
|
+
if (hit !== void 0 && hit.atRevision === revision && hit.signature === signature && hit.savedFingerprint === fingerprint) return hit.result;
|
|
9188
|
+
const result = reconcileSidebarOrder(storedOrders()[key] ?? [], refs);
|
|
9189
|
+
snapshots.set(key, {
|
|
9190
|
+
atRevision: revision,
|
|
9191
|
+
signature,
|
|
9192
|
+
savedFingerprint: fingerprint,
|
|
9193
|
+
result
|
|
9194
|
+
});
|
|
9195
|
+
return result;
|
|
9196
|
+
}
|
|
9197
|
+
/**
|
|
9198
|
+
* Effective row order for one sidebar list: the user's saved order folded
|
|
9199
|
+
* into the given Remote default order. Identity-stable across renders while
|
|
9200
|
+
* neither the data nor this browser's preference changes.
|
|
9201
|
+
*/
|
|
9202
|
+
function useSidebarOrder(workspaceId, kind, refs) {
|
|
9203
|
+
return (0, react.useSyncExternalStore)((0, react.useCallback)((listener) => {
|
|
9204
|
+
listeners.add(listener);
|
|
9205
|
+
return () => {
|
|
9206
|
+
listeners.delete(listener);
|
|
9207
|
+
};
|
|
9208
|
+
}, []), () => orderedSnapshot(workspaceId, kind, refs), () => orderedSnapshot(workspaceId, kind, refs));
|
|
9209
|
+
}
|
|
9210
|
+
/**
|
|
9211
|
+
* The only mutation path: move `movedRef` to the given side of `targetRef`
|
|
9212
|
+
* inside the list's current effective order. Returns the new order, or
|
|
9213
|
+
* `undefined` when the request cannot change anything (unknown refs, dropping
|
|
9214
|
+
* a row onto itself, or an adjacent marker that would put it right back).
|
|
9215
|
+
* Persistence and subscriber notification happen here.
|
|
9216
|
+
*/
|
|
9217
|
+
function moveSidebarItem(workspaceId, kind, refs, movedRef, targetRef, marker) {
|
|
9218
|
+
const key = listKey(workspaceId, kind);
|
|
9219
|
+
const from = refs.indexOf(movedRef);
|
|
9220
|
+
const nextFromTarget = refs.indexOf(targetRef);
|
|
9221
|
+
if (key === void 0 || from < 0 || nextFromTarget < 0 || movedRef === targetRef) return void 0;
|
|
9222
|
+
const next = [...refs];
|
|
9223
|
+
const [item] = next.splice(from, 1);
|
|
9224
|
+
if (item === void 0) return void 0;
|
|
9225
|
+
const insertAt = next.indexOf(targetRef) + (marker === "after" ? 1 : 0);
|
|
9226
|
+
if (insertAt === from) return void 0;
|
|
9227
|
+
next.splice(insertAt, 0, item);
|
|
9228
|
+
saveOrder(key, next);
|
|
9229
|
+
snapshots.delete(key);
|
|
9230
|
+
emitChange();
|
|
9231
|
+
return next;
|
|
9232
|
+
}
|
|
9233
|
+
//#endregion
|
|
8681
9234
|
//#region src/client/TeamRowMenu.tsx
|
|
8682
9235
|
/**
|
|
8683
9236
|
* Row-level overflow menu shared by sidebar Channel and Agent rows, mirroring
|
|
@@ -8838,7 +9391,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8838
9391
|
}
|
|
8839
9392
|
//#endregion
|
|
8840
9393
|
//#region src/client/TeamAgentsPanel.tsx
|
|
8841
|
-
function TeamAgentsPanel({ workspaceId, loadMembers, subscribeChanges, loadChannels, addMember, updateMember, recoverMember,
|
|
9394
|
+
function TeamAgentsPanel({ workspaceId, loadMembers, subscribeChanges, loadChannels, addMember, updateMember, recoverMember, joinChannel, removeChannelMember, loadModels, memberSessionId, openMemberSession, onCreatingChange, t }) {
|
|
8842
9395
|
const [members, setMembers] = (0, react.useState)([]);
|
|
8843
9396
|
const [channels, setChannels] = (0, react.useState)([]);
|
|
8844
9397
|
const [channelRefs, setChannelRefs] = (0, react.useState)([]);
|
|
@@ -8851,6 +9404,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8851
9404
|
const [creating, setCreating] = (0, react.useState)(false);
|
|
8852
9405
|
const [retryRequest, setRetryRequest] = (0, react.useState)();
|
|
8853
9406
|
const triggerRef = (0, react.useRef)(null);
|
|
9407
|
+
const orderedAgentRefs = useSidebarOrder(workspaceId, "agents", (0, react.useMemo)(() => members.map((status) => status.member.memberId), [members]));
|
|
9408
|
+
const orderedMembers = (0, react.useMemo)(() => {
|
|
9409
|
+
const byId = new Map(members.map((status) => [status.member.memberId, status]));
|
|
9410
|
+
return orderedAgentRefs.map((memberId) => byId.get(memberId)).filter((status) => status !== void 0);
|
|
9411
|
+
}, [orderedAgentRefs, members]);
|
|
9412
|
+
const applyMove = (movedRef, targetRef, marker) => {
|
|
9413
|
+
moveSidebarItem(workspaceId, "agents", orderedAgentRefs, movedRef, targetRef, marker);
|
|
9414
|
+
};
|
|
9415
|
+
const drag = useSidebarRowDrag({
|
|
9416
|
+
refs: orderedAgentRefs,
|
|
9417
|
+
onCommit: applyMove
|
|
9418
|
+
});
|
|
8854
9419
|
const refresh = (0, react.useCallback)(async () => {
|
|
8855
9420
|
setLoading(true);
|
|
8856
9421
|
const result = await loadMembers({ workspaceId });
|
|
@@ -9059,22 +9624,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9059
9624
|
}),
|
|
9060
9625
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9061
9626
|
className: sidebar_module_css_default.agentList,
|
|
9062
|
-
children:
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9627
|
+
children: orderedMembers.map((status) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SortableRow, {
|
|
9628
|
+
drag,
|
|
9629
|
+
orderKey: status.member.memberId,
|
|
9630
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AgentRow, {
|
|
9631
|
+
status,
|
|
9632
|
+
...memberSessionId === void 0 ? {} : { current: status.member.sessionId === memberSessionId },
|
|
9633
|
+
channels,
|
|
9634
|
+
loadChannels,
|
|
9635
|
+
updateMember,
|
|
9636
|
+
recoverMember,
|
|
9637
|
+
joinChannel,
|
|
9638
|
+
removeChannelMember,
|
|
9639
|
+
loadModels,
|
|
9640
|
+
openMemberSession,
|
|
9641
|
+
onUpdated: () => {
|
|
9642
|
+
refresh();
|
|
9643
|
+
},
|
|
9644
|
+
t
|
|
9645
|
+
})
|
|
9078
9646
|
}, status.member.memberId))
|
|
9079
9647
|
})
|
|
9080
9648
|
]
|
|
@@ -9100,7 +9668,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9100
9668
|
* conversation page, the avatar carries identity plus the presence badge, and
|
|
9101
9669
|
* the row menu opens the editor.
|
|
9102
9670
|
*/
|
|
9103
|
-
function AgentRow({ status, current, channels, loadChannels, updateMember, recoverMember,
|
|
9671
|
+
function AgentRow({ status, current, channels, loadChannels, updateMember, recoverMember, joinChannel, removeChannelMember, loadModels, openMemberSession, onUpdated, t }) {
|
|
9104
9672
|
const [menuOpen, setMenuOpen] = (0, react.useState)(false);
|
|
9105
9673
|
const [editing, setEditing] = (0, react.useState)(false);
|
|
9106
9674
|
const resume = async () => {
|
|
@@ -9111,14 +9679,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9111
9679
|
});
|
|
9112
9680
|
await onUpdated();
|
|
9113
9681
|
};
|
|
9114
|
-
const restart = async () => {
|
|
9115
|
-
await restartMember({
|
|
9116
|
-
requestId: crypto.randomUUID(),
|
|
9117
|
-
workspaceId: status.member.workspaceId,
|
|
9118
|
-
memberId: status.member.memberId
|
|
9119
|
-
});
|
|
9120
|
-
await onUpdated();
|
|
9121
|
-
};
|
|
9122
9682
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
9123
9683
|
className: sidebar_module_css_default.agentRow,
|
|
9124
9684
|
"data-menu-open": menuOpen || void 0,
|
|
@@ -9127,6 +9687,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9127
9687
|
className: sidebar_module_css_default.agentSelect,
|
|
9128
9688
|
"aria-label": t("openAgentSession", { name: status.member.handle }),
|
|
9129
9689
|
"aria-current": current ? "page" : void 0,
|
|
9690
|
+
disabled: status.availability !== "active",
|
|
9130
9691
|
onClick: () => {
|
|
9131
9692
|
openMemberSession(status.member.sessionId);
|
|
9132
9693
|
},
|
|
@@ -9141,26 +9702,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9141
9702
|
className: sidebar_module_css_default.rowMenu,
|
|
9142
9703
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamRowMenu, {
|
|
9143
9704
|
label: t("actionsAgent", { name: status.member.handle }),
|
|
9144
|
-
items: [
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlayOutline16, {})
|
|
9154
|
-
}] : [],
|
|
9155
|
-
{
|
|
9156
|
-
id: "restart",
|
|
9157
|
-
label: t("restartAgent"),
|
|
9158
|
-
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutline14, {})
|
|
9159
|
-
}
|
|
9160
|
-
],
|
|
9705
|
+
items: [{
|
|
9706
|
+
id: "edit",
|
|
9707
|
+
label: t("editAgent"),
|
|
9708
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutline16, {})
|
|
9709
|
+
}, ...status.presence === "error" ? [{
|
|
9710
|
+
id: "resume",
|
|
9711
|
+
label: t("resumeAgent"),
|
|
9712
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlayOutline16, {})
|
|
9713
|
+
}] : []],
|
|
9161
9714
|
onSelect: (id) => {
|
|
9162
9715
|
if (id === "resume") resume();
|
|
9163
|
-
else if (id === "restart") restart();
|
|
9164
9716
|
else setEditing(true);
|
|
9165
9717
|
},
|
|
9166
9718
|
onOpenChange: setMenuOpen
|
|
@@ -9555,6 +10107,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9555
10107
|
const [pendingCreate, setPendingCreate] = (0, react.useState)();
|
|
9556
10108
|
const previousCreatingKey = (0, react.useRef)(creatingAgents.map((request) => request.requestId).join(","));
|
|
9557
10109
|
const triggerRef = (0, react.useRef)(null);
|
|
10110
|
+
const orderedChannelRefs = useSidebarOrder(workspaceId, "channels", (0, react.useMemo)(() => view?.channels.map((channel) => channel.channelRef) ?? [], [view]));
|
|
10111
|
+
const orderedChannels = (0, react.useMemo)(() => {
|
|
10112
|
+
const byRef = new Map((view?.channels ?? []).map((channel) => [channel.channelRef, channel]));
|
|
10113
|
+
return orderedChannelRefs.map((channelRef) => byRef.get(channelRef)).filter((channel) => channel !== void 0);
|
|
10114
|
+
}, [orderedChannelRefs, view]);
|
|
10115
|
+
const applyMove = (movedRef, targetRef, marker) => {
|
|
10116
|
+
moveSidebarItem(workspaceId, "channels", orderedChannelRefs, movedRef, targetRef, marker);
|
|
10117
|
+
};
|
|
10118
|
+
const drag = useSidebarRowDrag({
|
|
10119
|
+
refs: orderedChannelRefs,
|
|
10120
|
+
onCommit: applyMove
|
|
10121
|
+
});
|
|
9558
10122
|
const refresh = (0, react.useCallback)(async () => {
|
|
9559
10123
|
setLoading(true);
|
|
9560
10124
|
const [channelResult, memberResult] = await Promise.all([loadChannels({
|
|
@@ -9773,20 +10337,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9773
10337
|
}),
|
|
9774
10338
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9775
10339
|
className: sidebar_module_css_default.channelList,
|
|
9776
|
-
children:
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
10340
|
+
children: orderedChannels.map((channel) => {
|
|
10341
|
+
const joined = membership.get(channel.channelRef) ?? /* @__PURE__ */ new Set();
|
|
10342
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SortableRow, {
|
|
10343
|
+
drag,
|
|
10344
|
+
orderKey: channel.channelRef,
|
|
10345
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChannelRow, {
|
|
10346
|
+
channel,
|
|
10347
|
+
members,
|
|
10348
|
+
joinedIds: joined,
|
|
10349
|
+
selected: selectedChannelRef === channel.channelRef,
|
|
10350
|
+
updateChannel,
|
|
10351
|
+
joinChannel: props.joinChannel,
|
|
10352
|
+
removeChannelMember: props.removeChannelMember,
|
|
10353
|
+
onCommitted: () => {
|
|
10354
|
+
refresh();
|
|
10355
|
+
},
|
|
10356
|
+
selectChannel,
|
|
10357
|
+
t
|
|
10358
|
+
})
|
|
9790
10359
|
}, channel.channelRef);
|
|
9791
10360
|
})
|
|
9792
10361
|
})
|
|
@@ -10001,7 +10570,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10001
10570
|
}
|
|
10002
10571
|
//#endregion
|
|
10003
10572
|
//#region src/client/TeamWorkspaceBrowser.tsx
|
|
10004
|
-
function TeamWorkspaceBrowser({ wide, expandSidebar, navigation, selectWorkspace, selectChannel, t, useWorkspaces, loadMembers, subscribeChanges, addMember, loadChannels, createChannel, updateChannel, updateMember, recoverMember,
|
|
10573
|
+
function TeamWorkspaceBrowser({ wide, expandSidebar, navigation, selectWorkspace, selectChannel, t, useWorkspaces, loadMembers, subscribeChanges, addMember, loadChannels, createChannel, updateChannel, updateMember, recoverMember, joinChannel, removeChannelMember, loadModels, openMemberSession }) {
|
|
10005
10574
|
const navigationState = (0, react.useSyncExternalStore)(navigation.subscribe, navigation.getSnapshot, navigation.getSnapshot);
|
|
10006
10575
|
const workspaces = useWorkspaces((state) => state.items);
|
|
10007
10576
|
const selected = navigationState.workspaceId;
|
|
@@ -10108,7 +10677,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10108
10677
|
addMember,
|
|
10109
10678
|
updateMember,
|
|
10110
10679
|
recoverMember,
|
|
10111
|
-
restartMember,
|
|
10112
10680
|
joinChannel,
|
|
10113
10681
|
removeChannelMember,
|
|
10114
10682
|
loadModels,
|
|
@@ -10165,7 +10733,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10165
10733
|
editChannel: "编辑频道",
|
|
10166
10734
|
editAgent: "编辑 Agent",
|
|
10167
10735
|
resumeAgent: "恢复",
|
|
10168
|
-
restartAgent: "重启会话",
|
|
10169
10736
|
optionalSuffix: "(可选)",
|
|
10170
10737
|
agentDescriptionPlaceholder: "留空则暂无描述",
|
|
10171
10738
|
channelsPickerEmpty: "选择初始频道",
|
|
@@ -10243,6 +10810,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10243
10810
|
activityClaimReleased: "{actor} 释放了「{direction}」",
|
|
10244
10811
|
activityClaimsReleased: "{actor} 因成员权限变化释放了 {count} 个 Claim",
|
|
10245
10812
|
activityAccepted: "{actor} 验收了此 Task",
|
|
10813
|
+
activityAcceptedWithClaims: "{actor} 验收了此 Task,并一并完成了 {count} 个未完成 Claim",
|
|
10814
|
+
acceptEarlyTitle: "提前验收任务",
|
|
10815
|
+
acceptEarlyBody: "将验收本 Task,并把以下 {count} 个未完成的 Claim 一并标记为完成:",
|
|
10816
|
+
acceptingTask: "验收中…",
|
|
10246
10817
|
activityClosed: "{actor} 关闭了此 Task",
|
|
10247
10818
|
activityReopened: "{actor} 重新打开了此 Task",
|
|
10248
10819
|
mentionConfirmation: "提及未关注成员需要确认,再次发送以继续",
|
|
@@ -10290,7 +10861,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10290
10861
|
editChannel: "Edit Channel",
|
|
10291
10862
|
editAgent: "Edit Agent",
|
|
10292
10863
|
resumeAgent: "Resume",
|
|
10293
|
-
restartAgent: "Restart session",
|
|
10294
10864
|
optionalSuffix: " (optional)",
|
|
10295
10865
|
agentDescriptionPlaceholder: "Leave empty if not needed",
|
|
10296
10866
|
channelsPickerEmpty: "Choose initial channels",
|
|
@@ -10368,6 +10938,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10368
10938
|
activityClaimReleased: "{actor} released “{direction}”",
|
|
10369
10939
|
activityClaimsReleased: "{actor} released {count} Claim(s) after a membership change",
|
|
10370
10940
|
activityAccepted: "{actor} accepted this Task",
|
|
10941
|
+
activityAcceptedWithClaims: "{actor} accepted this Task and completed {count} unfinished Claims with it",
|
|
10942
|
+
acceptEarlyTitle: "Accept Task early",
|
|
10943
|
+
acceptEarlyBody: "This accepts the Task and marks the following {count} unfinished Claims as done:",
|
|
10944
|
+
acceptingTask: "Accepting…",
|
|
10371
10945
|
activityClosed: "{actor} closed this Task",
|
|
10372
10946
|
activityReopened: "{actor} reopened this Task",
|
|
10373
10947
|
mentionConfirmation: "Mentioning an unfollowed member requires confirmation; send again to continue",
|
|
@@ -10398,7 +10972,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10398
10972
|
updateChannel: (request) => ctx.remote.agentTeam.updateChannel(request),
|
|
10399
10973
|
updateMember: (request) => ctx.remote.agentTeam.updateMember(request),
|
|
10400
10974
|
recoverMember: (request) => ctx.remote.agentTeam.recoverMember(request),
|
|
10401
|
-
restartMember: (request) => ctx.remote.agentTeam.restartMember(request),
|
|
10402
10975
|
loadModels: async () => {
|
|
10403
10976
|
return (await ctx.get("connection").api.llm.models({})).result;
|
|
10404
10977
|
},
|
|
@@ -10432,7 +11005,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10432
11005
|
putAttachment: (request) => ctx.remote.agentTeam.putAttachment(request),
|
|
10433
11006
|
getAttachment: (request) => ctx.remote.agentTeam.getAttachment(request),
|
|
10434
11007
|
reply: (request) => ctx.remote.agentTeam.reply(request),
|
|
10435
|
-
changeTask: (request) => ctx.remote.agentTeam.changeTask(request)
|
|
11008
|
+
changeTask: (request) => ctx.remote.agentTeam.changeTask(request),
|
|
11009
|
+
resolveTaskRefs: (request) => ctx.remote.agentTeam.resolveTaskRefs(request)
|
|
10436
11010
|
} : {},
|
|
10437
11011
|
...name === "sidebar.workspaces" ? {
|
|
10438
11012
|
addMember: (request) => ctx.remote.agentTeam.addMember(request),
|