@activecollab/components 2.0.596 → 2.0.597
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Accordion/AccordionItemBody.js +31 -3
- package/dist/cjs/components/Accordion/AccordionItemBody.js.map +1 -1
- package/dist/cjs/presentation/appsAndIntegrations/McpIntegration.js +308 -68
- package/dist/cjs/presentation/appsAndIntegrations/McpIntegration.js.map +1 -1
- package/dist/cjs/presentation/appsAndIntegrations/layout.js +89 -0
- package/dist/cjs/presentation/appsAndIntegrations/layout.js.map +1 -0
- package/dist/cjs/presentation/appsAndIntegrations/mcpData.js +36 -2
- package/dist/cjs/presentation/appsAndIntegrations/mcpData.js.map +1 -1
- package/dist/cjs/presentation/shared/index.js +7 -0
- package/dist/cjs/presentation/shared/index.js.map +1 -1
- package/dist/cjs/presentation/shared/selfHostedUpgrade.js +2 -2
- package/dist/cjs/presentation/shared/selfHostedUpgrade.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/keyboardShortcuts.js +212 -0
- package/dist/cjs/presentation/whiteboard/keyboardShortcuts.js.map +1 -0
- package/dist/cjs/presentation/whiteboard/outline.js +10 -4
- package/dist/cjs/presentation/whiteboard/outline.js.map +1 -1
- package/dist/cjs/presentation/whiteboardModern/toolDock.js +37 -16
- package/dist/cjs/presentation/whiteboardModern/toolDock.js.map +1 -1
- package/dist/esm/components/Accordion/AccordionItemBody.d.ts.map +1 -1
- package/dist/esm/components/Accordion/AccordionItemBody.js +21 -4
- package/dist/esm/components/Accordion/AccordionItemBody.js.map +1 -1
- package/dist/esm/presentation/appsAndIntegrations/McpIntegration.d.ts +5 -4
- package/dist/esm/presentation/appsAndIntegrations/McpIntegration.d.ts.map +1 -1
- package/dist/esm/presentation/appsAndIntegrations/McpIntegration.js +290 -67
- package/dist/esm/presentation/appsAndIntegrations/McpIntegration.js.map +1 -1
- package/dist/esm/presentation/appsAndIntegrations/layout.d.ts +32 -0
- package/dist/esm/presentation/appsAndIntegrations/layout.d.ts.map +1 -0
- package/dist/esm/presentation/appsAndIntegrations/layout.js +83 -0
- package/dist/esm/presentation/appsAndIntegrations/layout.js.map +1 -0
- package/dist/esm/presentation/appsAndIntegrations/mcpData.d.ts +15 -0
- package/dist/esm/presentation/appsAndIntegrations/mcpData.d.ts.map +1 -1
- package/dist/esm/presentation/appsAndIntegrations/mcpData.js +35 -1
- package/dist/esm/presentation/appsAndIntegrations/mcpData.js.map +1 -1
- package/dist/esm/presentation/shared/index.d.ts +1 -1
- package/dist/esm/presentation/shared/index.d.ts.map +1 -1
- package/dist/esm/presentation/shared/index.js +1 -1
- package/dist/esm/presentation/shared/index.js.map +1 -1
- package/dist/esm/presentation/shared/selfHostedUpgrade.d.ts +2 -0
- package/dist/esm/presentation/shared/selfHostedUpgrade.d.ts.map +1 -1
- package/dist/esm/presentation/shared/selfHostedUpgrade.js +1 -1
- package/dist/esm/presentation/shared/selfHostedUpgrade.js.map +1 -1
- package/dist/esm/presentation/whiteboard/keyboardShortcuts.d.ts +16 -0
- package/dist/esm/presentation/whiteboard/keyboardShortcuts.d.ts.map +1 -0
- package/dist/esm/presentation/whiteboard/keyboardShortcuts.js +198 -0
- package/dist/esm/presentation/whiteboard/keyboardShortcuts.js.map +1 -0
- package/dist/esm/presentation/whiteboard/outline.d.ts +5 -2
- package/dist/esm/presentation/whiteboard/outline.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/outline.js +10 -4
- package/dist/esm/presentation/whiteboard/outline.js.map +1 -1
- package/dist/esm/presentation/whiteboardModern/toolDock.d.ts +4 -0
- package/dist/esm/presentation/whiteboardModern/toolDock.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboardModern/toolDock.js +34 -15
- package/dist/esm/presentation/whiteboardModern/toolDock.js.map +1 -1
- package/dist/index.js +24 -2
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["tokens", "
|
|
3
|
+
const _excluded = ["tokens", "onDisconnectAll", "connection", "onAddToken"];
|
|
4
4
|
import React, { useMemo, useState } from "react";
|
|
5
5
|
import styled from "styled-components";
|
|
6
6
|
import { MCP_EXAMPLES, MCP_PRO_TIPS, MCP_TOKEN_DETAILS } from "./mcpData";
|
|
@@ -13,16 +13,16 @@ import { ConfirmDialog } from "../../components/ConfirmDialog";
|
|
|
13
13
|
import { Dialog } from "../../components/Dialog";
|
|
14
14
|
import { Dot } from "../../components/Dot";
|
|
15
15
|
import { IconButton } from "../../components/IconButton";
|
|
16
|
-
import { CopyIcon, HelpIcon, InfoIcon, MoveIcon, TrashIcon } from "../../components/Icons";
|
|
16
|
+
import { CopyIcon, DownloadIcon, HelpIcon, InfoIcon, InsertLinkIcon, KeyIcon, MoveIcon, PuzzleIcon, TrashIcon } from "../../components/Icons";
|
|
17
|
+
import { InfoBox } from "../../components/InfoBox";
|
|
17
18
|
import { Input, InputPassword } from "../../components/Input";
|
|
18
19
|
import { Label } from "../../components/Label";
|
|
19
20
|
import { Link } from "../../components/Links";
|
|
20
21
|
import { Select } from "../../components/Select";
|
|
21
22
|
import { SelectTrigger } from "../../components/SelectTrigger";
|
|
22
23
|
import { Tooltip } from "../../components/Tooltip";
|
|
23
|
-
import { Trigger } from "../../components/Trigger";
|
|
24
24
|
import { Body2, Caption1, Header3 } from "../../components/Typography";
|
|
25
|
-
import { CopySnippet, LG, MONO } from "../shared";
|
|
25
|
+
import { CopySnippet, LG, MONO, copyText } from "../shared";
|
|
26
26
|
|
|
27
27
|
/* ------------------------------------------------------------------ */
|
|
28
28
|
/* Render-time helpers (mirror groupMcpTokens.js, useMcpDateFormatters) */
|
|
@@ -98,7 +98,7 @@ const ClientLabel = _ref => {
|
|
|
98
98
|
const StyledTable = styled.div.withConfig({
|
|
99
99
|
displayName: "McpIntegration__StyledTable",
|
|
100
100
|
componentId: "sc-x8hck0-0"
|
|
101
|
-
})(["border:1px solid var(--color-theme-400);border-radius:8px;.mt-scroll{overflow-x:auto;}.mt-inner{min-width:974px;}.mt-row{box-sizing:border-box;display:flex;align-items:center;gap:24px;min-height:48px;padding:0 16px 0 20px;}.mt-row.grouped .col-client{padding-left:20px;}.mt-head{background-color:var(--color-theme-200);border-radius:8px 8px 0 0;}.mt-bordered{border-top:1px solid var(--color-theme-400);}.col-client{box-sizing:border-box;display:flex;flex:1;flex-direction:column;justify-content:center;min-width:250px;width:100%;overflow:hidden;padding:4px 0;}.col-date{width:100px;flex-shrink:0;}.col-token{display:flex;align-items:center;width:140px;flex-shrink:0;overflow:hidden;user-select:none;}.col-token .c-dot{margin:2px 0 0 4px;flex-shrink:0;}.col-icon{width:32px;flex-shrink:0;}.col-access{width:140px;flex-shrink:0;}.col-access .access-trigger{box-sizing:border-box;width:100%;padding:0;}.identity-line{display:flex;align-items:center;gap:8px;overflow:hidden;}.hostname{word-break:break-all;font-family:", ";}.expired-line{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;}.group-head{box-sizing:border-box;display:flex;align-items:center;gap:16px;min-height:48px;padding:4px 16px 4px 20px;}.group-head .identity{display:flex;flex:1;flex-direction:column;justify-content:center;min-width:0;overflow:hidden;}
|
|
101
|
+
})(["border:1px solid var(--color-theme-400);border-radius:8px;.mt-scroll{overflow-x:auto;}.mt-inner{min-width:974px;}.mt-row{box-sizing:border-box;display:flex;align-items:center;gap:24px;min-height:48px;padding:0 16px 0 20px;}.mt-row.grouped .col-client{padding-left:20px;}.mt-head{background-color:var(--color-theme-200);border-radius:8px 8px 0 0;}.mt-bordered{border-top:1px solid var(--color-theme-400);}.mt-shortcuts{box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-height:48px;padding:8px 12px;}.col-client{box-sizing:border-box;display:flex;flex:1;flex-direction:column;justify-content:center;min-width:250px;width:100%;overflow:hidden;padding:4px 0;}.col-date{width:100px;flex-shrink:0;}.col-token{display:flex;align-items:center;width:140px;flex-shrink:0;overflow:hidden;user-select:none;}.col-token .c-dot{margin:2px 0 0 4px;flex-shrink:0;}.col-icon{width:32px;flex-shrink:0;}.col-access{width:140px;flex-shrink:0;}.col-access .access-trigger{box-sizing:border-box;width:100%;padding:0;}.identity-line{display:flex;align-items:center;gap:8px;overflow:hidden;}.hostname{word-break:break-all;font-family:", ";}.expired-line{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;}.group-head{box-sizing:border-box;display:flex;align-items:center;gap:16px;min-height:48px;padding:4px 16px 4px 20px;}.group-head .identity{display:flex;flex:1;flex-direction:column;justify-content:center;min-width:0;overflow:hidden;}"], MONO);
|
|
102
102
|
const StatusChip = _ref2 => {
|
|
103
103
|
let label = _ref2.label;
|
|
104
104
|
return /*#__PURE__*/React.createElement(Chip, {
|
|
@@ -247,11 +247,34 @@ const TokenItem = _ref6 => {
|
|
|
247
247
|
onClick: () => onDelete(item)
|
|
248
248
|
}, /*#__PURE__*/React.createElement(TrashIcon, null))))));
|
|
249
249
|
};
|
|
250
|
-
const
|
|
251
|
-
let
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
250
|
+
const TableShortcuts = _ref7 => {
|
|
251
|
+
let connection = _ref7.connection,
|
|
252
|
+
onAddToken = _ref7.onAddToken;
|
|
253
|
+
const isOAuth = connection.is_oauth_enabled;
|
|
254
|
+
const pluginUrl = isOAuth ? connection.plugin_download_url : null;
|
|
255
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, pluginUrl ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
256
|
+
title: "Download the ActiveCollab AI Plugin for agents that support plugins"
|
|
257
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
258
|
+
variant: "text colored",
|
|
259
|
+
onClick: () => window.open(pluginUrl, "_blank")
|
|
260
|
+
}, /*#__PURE__*/React.createElement(DownloadIcon, null), "Download Plugin")) : null, isOAuth ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
261
|
+
title: "Copy the MCP server URL to connect an agent that supports sign-in (OAuth)"
|
|
262
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
263
|
+
variant: "text colored",
|
|
264
|
+
onClick: () => copyText(connection.api_url)
|
|
265
|
+
}, /*#__PURE__*/React.createElement(CopyIcon, null), "Copy MCP URL")) : null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
266
|
+
title: isOAuth ? "Create a token for agents that do not support sign-in (OAuth) yet" : "Create a token to connect an AI agent"
|
|
267
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
268
|
+
variant: "text colored",
|
|
269
|
+
onClick: onAddToken
|
|
270
|
+
}, /*#__PURE__*/React.createElement(KeyIcon, null), "Add Token")));
|
|
271
|
+
};
|
|
272
|
+
const TokensTable = _ref8 => {
|
|
273
|
+
let tokens = _ref8.tokens,
|
|
274
|
+
onDisconnectAll = _ref8.onDisconnectAll,
|
|
275
|
+
connection = _ref8.connection,
|
|
276
|
+
onAddToken = _ref8.onAddToken,
|
|
277
|
+
itemProps = _objectWithoutPropertiesLoose(_ref8, _excluded);
|
|
255
278
|
const rows = useMemo(() => groupRows(tokens), [tokens]);
|
|
256
279
|
return /*#__PURE__*/React.createElement(StyledTable, null, /*#__PURE__*/React.createElement("div", {
|
|
257
280
|
className: "mt-scroll"
|
|
@@ -299,15 +322,11 @@ const TokensTable = _ref7 => {
|
|
|
299
322
|
key: row.key,
|
|
300
323
|
item: row.item
|
|
301
324
|
}, itemProps))))), /*#__PURE__*/React.createElement("div", {
|
|
302
|
-
className: "mt-bordered"
|
|
303
|
-
}, /*#__PURE__*/React.createElement(
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
}
|
|
307
|
-
className: "add-row"
|
|
308
|
-
}, /*#__PURE__*/React.createElement(Body2, {
|
|
309
|
-
color: "theme-primary"
|
|
310
|
-
}, "+ Add Token")))));
|
|
325
|
+
className: "mt-bordered mt-shortcuts"
|
|
326
|
+
}, /*#__PURE__*/React.createElement(TableShortcuts, {
|
|
327
|
+
connection: connection,
|
|
328
|
+
onAddToken: onAddToken
|
|
329
|
+
})));
|
|
311
330
|
};
|
|
312
331
|
|
|
313
332
|
/* ------------------------------------------------------------------ */
|
|
@@ -343,7 +362,7 @@ const TipsAndExamples = () => /*#__PURE__*/React.createElement(StyledTips, null,
|
|
|
343
362
|
key: tip
|
|
344
363
|
}, tip)))), /*#__PURE__*/React.createElement(Body2, {
|
|
345
364
|
italic: true
|
|
346
|
-
}, "Copy these prompts,
|
|
365
|
+
}, "Copy these prompts, change the project names and people, and start to manage your work through conversation.")));
|
|
347
366
|
|
|
348
367
|
/* ------------------------------------------------------------------ */
|
|
349
368
|
/* Add MCP Client dialog (mirrors McpTokenAddDialog.jsx) */
|
|
@@ -354,6 +373,11 @@ const CLIENT_OPTIONS = [{
|
|
|
354
373
|
name: "Claude",
|
|
355
374
|
client_name: "Claude",
|
|
356
375
|
vendor: "Anthropic"
|
|
376
|
+
}, {
|
|
377
|
+
id: "chatgpt",
|
|
378
|
+
name: "ChatGPT",
|
|
379
|
+
client_name: "ChatGPT",
|
|
380
|
+
vendor: "OpenAI"
|
|
357
381
|
}, {
|
|
358
382
|
id: "langdock",
|
|
359
383
|
name: "Langdock",
|
|
@@ -373,10 +397,10 @@ const DialogBody = styled.div.withConfig({
|
|
|
373
397
|
displayName: "McpIntegration__DialogBody",
|
|
374
398
|
componentId: "sc-x8hck0-3"
|
|
375
399
|
})(["display:flex;flex-direction:column;gap:16px;.field{display:flex;flex-direction:column;gap:4px;}.field .c-input-wrapper{width:100%;max-width:360px;}.chooser-label{margin-bottom:8px;}.checkbox-row{display:flex;align-items:center;gap:8px;}.checkbox-row label{margin-bottom:0;cursor:pointer;}"]);
|
|
376
|
-
const AddClientDialog =
|
|
377
|
-
let open =
|
|
378
|
-
onClose =
|
|
379
|
-
onAdd =
|
|
400
|
+
const AddClientDialog = _ref9 => {
|
|
401
|
+
let open = _ref9.open,
|
|
402
|
+
onClose = _ref9.onClose,
|
|
403
|
+
onAdd = _ref9.onAdd;
|
|
380
404
|
const _useState = useState(""),
|
|
381
405
|
password = _useState[0],
|
|
382
406
|
setPassword = _useState[1];
|
|
@@ -450,9 +474,9 @@ const AddClientDialog = _ref8 => {
|
|
|
450
474
|
weight: "bold"
|
|
451
475
|
}, "Chat Client"), /*#__PURE__*/React.createElement(ChooseV2, {
|
|
452
476
|
required: true,
|
|
453
|
-
options: CLIENT_OPTIONS.map(
|
|
454
|
-
let id =
|
|
455
|
-
label =
|
|
477
|
+
options: CLIENT_OPTIONS.map(_ref0 => {
|
|
478
|
+
let id = _ref0.id,
|
|
479
|
+
label = _ref0.name;
|
|
456
480
|
return {
|
|
457
481
|
id,
|
|
458
482
|
name: label
|
|
@@ -517,9 +541,9 @@ const StyledCopyField = styled.div.withConfig({
|
|
|
517
541
|
})(["display:flex;flex-direction:column;gap:4px;.cf-row{display:flex;align-items:center;gap:16px;}.cf-box{box-sizing:border-box;display:flex;align-items:center;width:100%;max-width:360px;height:32px;border:1px solid var(--color-theme-500);border-radius:6px;overflow:hidden;}.cf-value{display:flex;align-items:center;min-width:0;margin:0 8px;user-select:none;}.cf-value .c-dot{margin:2px 0 0 4px;flex-shrink:0;}"]);
|
|
518
542
|
|
|
519
543
|
/** Mirrors CopyToClipboard/CopyField.jsx. */
|
|
520
|
-
const CopyField =
|
|
521
|
-
let label =
|
|
522
|
-
children =
|
|
544
|
+
const CopyField = _ref1 => {
|
|
545
|
+
let label = _ref1.label,
|
|
546
|
+
children = _ref1.children;
|
|
523
547
|
return /*#__PURE__*/React.createElement(StyledCopyField, null, /*#__PURE__*/React.createElement(Caption1, {
|
|
524
548
|
weight: "bold"
|
|
525
549
|
}, label), /*#__PURE__*/React.createElement("div", {
|
|
@@ -542,20 +566,21 @@ const UseTokenBody = styled.div.withConfig({
|
|
|
542
566
|
displayName: "McpIntegration__UseTokenBody",
|
|
543
567
|
componentId: "sc-x8hck0-5"
|
|
544
568
|
})(["display:flex;flex-direction:column;gap:16px;.instructions{display:flex;flex-direction:column;gap:12px;margin-top:8px;}.instructions p{margin:0 0 14px;}"]);
|
|
545
|
-
const configSnippet = (url, token) => "{\n \u2026\n \"mcpServers\": {\n \"ActiveCollab Project Management\": {\n \"
|
|
546
|
-
const
|
|
547
|
-
|
|
569
|
+
const configSnippet = (url, token) => "{\n \u2026\n \"mcpServers\": {\n \"ActiveCollab Project Management\": {\n \"type\": \"http\",\n \"url\": \"" + url + "\",\n \"headers\": {\n \"Authorization\": \"Bearer " + token + "\"\n }\n }\n }\n \u2026\n}";
|
|
570
|
+
const claudeCommand = (url, token) => "claude mcp add --transport http activecollab " + url + " --header \"Authorization: Bearer " + token + "\"";
|
|
571
|
+
const ClientInstructions = _ref10 => {
|
|
572
|
+
let clientName = _ref10.clientName;
|
|
548
573
|
if (clientName === "Langdock") {
|
|
549
574
|
return /*#__PURE__*/React.createElement(Body2, null, /*#__PURE__*/React.createElement("p", null, "Open Langdock and select ", /*#__PURE__*/React.createElement("b", null, "Integrations"), " from the main menu."), /*#__PURE__*/React.createElement("p", null, "In the upper-right corner, click ", /*#__PURE__*/React.createElement("b", null, "Add Integration"), ", then choose", " ", /*#__PURE__*/React.createElement("b", null, "From Scratch"), "."), /*#__PURE__*/React.createElement("p", null, "A dialog will open. Select ", /*#__PURE__*/React.createElement("b", null, "Connect remote MCP"), ". Paste the", " ", /*#__PURE__*/React.createElement("b", null, "ActiveCollab MCP server URL"), " and select ", /*#__PURE__*/React.createElement("b", null, "API key"), " as the authorization method."), /*#__PURE__*/React.createElement("p", null, "A new integration will be created. Click ", /*#__PURE__*/React.createElement("b", null, "Test Connect"), " to verify the connection. If the test succeeds, Langdock will display a list of actions available from ActiveCollab."), /*#__PURE__*/React.createElement("p", null, "Select the actions you want Langdock to be able to access and use."));
|
|
550
575
|
}
|
|
551
576
|
if (clientName === "Claude") {
|
|
552
|
-
return /*#__PURE__*/React.createElement(Body2, null, "
|
|
577
|
+
return /*#__PURE__*/React.createElement(Body2, null, "Claude connects best with sign-in (OAuth). Use the ActiveCollab AI Plugin, or Connect Without a Plugin, on the MCP page. If you need a token, for example in Claude Code, run this command:");
|
|
553
578
|
}
|
|
554
579
|
return /*#__PURE__*/React.createElement(Body2, null, /*#__PURE__*/React.createElement("p", null, "Refer to your client or tool documentation for specific instructions on connecting to an MCP server."), /*#__PURE__*/React.createElement("p", null, "The credentials provided above are intended for use with the streamable HTTP transport protocol."), "If your client requires a JSON configuration to define MCP servers, use the appropriate fields (such as server URL, transport type, and authentication token) based on the example below. Ensure the configuration matches your client's expected schema and supports streamable HTTP transport.");
|
|
555
580
|
};
|
|
556
|
-
const UseTokenDialog =
|
|
557
|
-
let token =
|
|
558
|
-
onClose =
|
|
581
|
+
const UseTokenDialog = _ref11 => {
|
|
582
|
+
let token = _ref11.token,
|
|
583
|
+
onClose = _ref11.onClose;
|
|
559
584
|
const details = MCP_TOKEN_DETAILS;
|
|
560
585
|
const isLangdock = (token == null ? void 0 : token.client_name) === "Langdock";
|
|
561
586
|
return /*#__PURE__*/React.createElement(Dialog, {
|
|
@@ -580,7 +605,7 @@ const UseTokenDialog = _ref10 => {
|
|
|
580
605
|
}, /*#__PURE__*/React.createElement(ClientInstructions, {
|
|
581
606
|
clientName: token == null ? void 0 : token.client_name
|
|
582
607
|
}), isLangdock ? null : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CopySnippet, {
|
|
583
|
-
code: configSnippet(details.api_url, details.token)
|
|
608
|
+
code: (token == null ? void 0 : token.client_name) === "Claude" ? claudeCommand(details.api_url, details.token) : configSnippet(details.api_url, details.token)
|
|
584
609
|
}), /*#__PURE__*/React.createElement(Body2, null, /*#__PURE__*/React.createElement(Link, {
|
|
585
610
|
variant: "text link-primary",
|
|
586
611
|
as: "a",
|
|
@@ -589,44 +614,235 @@ const UseTokenDialog = _ref10 => {
|
|
|
589
614
|
};
|
|
590
615
|
|
|
591
616
|
/* ------------------------------------------------------------------ */
|
|
592
|
-
/*
|
|
617
|
+
/* Connect your AI agent (plugin, OAuth without a plugin, token) */
|
|
593
618
|
/* ------------------------------------------------------------------ */
|
|
594
619
|
|
|
595
|
-
const
|
|
596
|
-
|
|
620
|
+
const vsCodeInstallUrl = url => "https://vscode.dev/redirect/mcp/install?name=activecollab&config=" + encodeURIComponent(JSON.stringify({
|
|
621
|
+
type: "http",
|
|
622
|
+
url
|
|
623
|
+
}));
|
|
624
|
+
const StyledConnectAgent = styled.div.withConfig({
|
|
625
|
+
displayName: "McpIntegration__StyledConnectAgent",
|
|
597
626
|
componentId: "sc-x8hck0-6"
|
|
598
|
-
})(["display:flex;flex-direction:column;align-items:flex-start;gap:16px;"]);
|
|
627
|
+
})(["display:flex;flex-direction:column;gap:16px;width:100%;max-width:720px;.connect-intro{display:flex;flex-direction:column;gap:4px;}.connect-accordion{width:100%;}.ca-head{display:flex;align-items:flex-start;gap:12px;padding:4px 0;}.ca-head-icon{display:flex;flex-shrink:0;padding-top:2px;}.ca-head-text{display:flex;flex-direction:column;gap:2px;min-width:0;}.ca-head-title{display:flex;align-items:center;gap:8px;}.ca-body{display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:4px 0 16px 32px;}.ca-body ul{display:flex;flex-direction:column;gap:4px;margin:0;padding-left:20px;}.ca-list{display:flex;flex-direction:column;gap:4px;}.ca-actions{display:flex;align-items:center;gap:16px;}.ca-client{box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;gap:12px;width:100%;padding:16px;border:1px solid var(--border-primary);border-radius:8px;}.ca-client > div{width:100%;}"]);
|
|
628
|
+
const OAuthInfoBox = styled(InfoBox).withConfig({
|
|
629
|
+
displayName: "McpIntegration__OAuthInfoBox",
|
|
630
|
+
componentId: "sc-x8hck0-7"
|
|
631
|
+
})(["box-sizing:border-box;.oauth-body{display:flex;flex-direction:column;align-items:flex-start;gap:12px;}"]);
|
|
632
|
+
const HEAD_ICON_STYLE = {
|
|
633
|
+
width: 20,
|
|
634
|
+
height: 20,
|
|
635
|
+
fill: "var(--color-theme-700)"
|
|
636
|
+
};
|
|
637
|
+
const ConnectItemHead = _ref12 => {
|
|
638
|
+
let icon = _ref12.icon,
|
|
639
|
+
title = _ref12.title,
|
|
640
|
+
description = _ref12.description,
|
|
641
|
+
chip = _ref12.chip;
|
|
642
|
+
return /*#__PURE__*/React.createElement(AccordionItemHead, null, /*#__PURE__*/React.createElement("div", {
|
|
643
|
+
className: "ca-head"
|
|
644
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
645
|
+
className: "ca-head-icon"
|
|
646
|
+
}, icon), /*#__PURE__*/React.createElement("div", {
|
|
647
|
+
className: "ca-head-text"
|
|
648
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
649
|
+
className: "ca-head-title"
|
|
650
|
+
}, /*#__PURE__*/React.createElement(Body2, {
|
|
651
|
+
weight: "bold"
|
|
652
|
+
}, title), chip), /*#__PURE__*/React.createElement(Body2, {
|
|
653
|
+
color: "secondary"
|
|
654
|
+
}, description))));
|
|
655
|
+
};
|
|
656
|
+
const StepByStepLink = () => /*#__PURE__*/React.createElement(Link, {
|
|
657
|
+
variant: "text link-gray",
|
|
658
|
+
as: "a",
|
|
659
|
+
href: "#"
|
|
660
|
+
}, "Step-by-Step Instructions");
|
|
661
|
+
const AGENT_OPTIONS = [{
|
|
662
|
+
id: "claude",
|
|
663
|
+
name: "Claude"
|
|
664
|
+
}, {
|
|
665
|
+
id: "chatgpt",
|
|
666
|
+
name: "ChatGPT"
|
|
667
|
+
}, {
|
|
668
|
+
id: "vscode",
|
|
669
|
+
name: "VS Code"
|
|
670
|
+
}, {
|
|
671
|
+
id: "codex",
|
|
672
|
+
name: "Codex"
|
|
673
|
+
}, {
|
|
674
|
+
id: "other",
|
|
675
|
+
name: "Other"
|
|
676
|
+
}];
|
|
677
|
+
const AgentInstructions = _ref13 => {
|
|
678
|
+
let agent = _ref13.agent,
|
|
679
|
+
url = _ref13.url;
|
|
680
|
+
switch (agent) {
|
|
681
|
+
case "claude":
|
|
682
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Body2, null, "In Claude, add a custom connector and paste the MCP server URL. Claude asks you to sign in to ActiveCollab."), /*#__PURE__*/React.createElement(CopyField, {
|
|
683
|
+
label: "MCP Server URL"
|
|
684
|
+
}, url), /*#__PURE__*/React.createElement(StepByStepLink, null));
|
|
685
|
+
case "chatgpt":
|
|
686
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Body2, null, "In ChatGPT, add a custom MCP server and paste the MCP server URL. Select OAuth as the authentication method."), /*#__PURE__*/React.createElement(CopyField, {
|
|
687
|
+
label: "MCP Server URL"
|
|
688
|
+
}, url), /*#__PURE__*/React.createElement(StepByStepLink, null));
|
|
689
|
+
case "vscode":
|
|
690
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Body2, null, "Add the server to VS Code with one click. VS Code asks you to sign in to ActiveCollab the first time it uses the server."), /*#__PURE__*/React.createElement(Button, {
|
|
691
|
+
variant: "text gray",
|
|
692
|
+
onClick: () => window.open(vsCodeInstallUrl(url), "_blank")
|
|
693
|
+
}, "Add to VS Code"), /*#__PURE__*/React.createElement(StepByStepLink, null));
|
|
694
|
+
case "codex":
|
|
695
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Body2, null, "Run this command, then sign in to ActiveCollab when Codex asks."), /*#__PURE__*/React.createElement(CopySnippet, {
|
|
696
|
+
code: "codex mcp add activecollab --url " + url
|
|
697
|
+
}), /*#__PURE__*/React.createElement(StepByStepLink, null));
|
|
698
|
+
case "other":
|
|
699
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Body2, null, "Check the documentation of your AI agent to see how it connects to remote MCP servers. Then use this URL. If your agent supports OAuth, it asks you to sign in to ActiveCollab."), /*#__PURE__*/React.createElement(CopyField, {
|
|
700
|
+
label: "MCP Server URL"
|
|
701
|
+
}, url));
|
|
702
|
+
default:
|
|
703
|
+
return null;
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
const ConnectWithoutPlugin = _ref14 => {
|
|
707
|
+
let url = _ref14.url;
|
|
708
|
+
const _useState7 = useState([]),
|
|
709
|
+
selected = _useState7[0],
|
|
710
|
+
setSelected = _useState7[1];
|
|
711
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Body2, null, "Select your AI agent to see how to connect it."), /*#__PURE__*/React.createElement(ChooseV2, {
|
|
712
|
+
options: AGENT_OPTIONS,
|
|
713
|
+
selected: selected,
|
|
714
|
+
onChange: setSelected
|
|
715
|
+
}), selected.length ? /*#__PURE__*/React.createElement("div", {
|
|
716
|
+
className: "ca-client"
|
|
717
|
+
}, /*#__PURE__*/React.createElement(AgentInstructions, {
|
|
718
|
+
agent: selected[0],
|
|
719
|
+
url: url
|
|
720
|
+
})) : null);
|
|
721
|
+
};
|
|
722
|
+
/**
|
|
723
|
+
* Connect block of the MCP page: plugin (OAuth on and a plugin to download),
|
|
724
|
+
* connect without a plugin (OAuth on), and connect with a token (always).
|
|
725
|
+
*/
|
|
726
|
+
const ConnectAgent = _ref15 => {
|
|
727
|
+
let connection = _ref15.connection,
|
|
728
|
+
heading = _ref15.heading,
|
|
729
|
+
collapsed = _ref15.collapsed,
|
|
730
|
+
onAddToken = _ref15.onAddToken;
|
|
731
|
+
const isOAuth = connection.is_oauth_enabled;
|
|
732
|
+
const pluginUrl = isOAuth ? connection.plugin_download_url : null;
|
|
733
|
+
const showOwnerBox = !isOAuth && connection.can_manage_oauth;
|
|
734
|
+
const showMemberHint = !isOAuth && !connection.can_manage_oauth;
|
|
735
|
+
const tokenButtonVariant = pluginUrl || showOwnerBox ? "text gray" : "text colored";
|
|
736
|
+
const defaultOpen = isOAuth ? pluginUrl ? "plugin" : "oauth" : "token";
|
|
737
|
+
const preExpanded = collapsed ? [] : [defaultOpen];
|
|
738
|
+
return /*#__PURE__*/React.createElement(StyledConnectAgent, null, /*#__PURE__*/React.createElement("div", {
|
|
739
|
+
className: "connect-intro"
|
|
740
|
+
}, /*#__PURE__*/React.createElement(Header3, null, heading), /*#__PURE__*/React.createElement(Body2, null, "Let an AI agent work with your projects, tasks, notes, and time records. ActiveCollab works with any AI agent that supports MCP. Choose the way to connect that your agent supports."), showMemberHint ? /*#__PURE__*/React.createElement(Body2, {
|
|
741
|
+
color: "secondary"
|
|
742
|
+
}, "To connect AI agents by signing in, ask an Owner to turn on OAuth in Security settings.") : null), showOwnerBox ? /*#__PURE__*/React.createElement(OAuthInfoBox, {
|
|
743
|
+
title: "Turn On OAuth for AI Agents"
|
|
744
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
745
|
+
className: "oauth-body"
|
|
746
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "With OAuth, people connect AI agents by signing in to ActiveCollab. Nobody has to copy or keep tokens, and each person can see and disconnect their own agents. OAuth also makes the ActiveCollab AI Plugin available."), /*#__PURE__*/React.createElement(Button, {
|
|
747
|
+
variant: "text colored"
|
|
748
|
+
}, "Set Up OAuth"))) : null, /*#__PURE__*/React.createElement(Accordion, {
|
|
749
|
+
className: "connect-accordion",
|
|
750
|
+
allowZeroExpanded: true,
|
|
751
|
+
preExpanded: preExpanded
|
|
752
|
+
}, pluginUrl ? /*#__PURE__*/React.createElement(AccordionItem, {
|
|
753
|
+
id: "plugin"
|
|
754
|
+
}, /*#__PURE__*/React.createElement(ConnectItemHead, {
|
|
755
|
+
icon: /*#__PURE__*/React.createElement(PuzzleIcon, {
|
|
756
|
+
style: HEAD_ICON_STYLE
|
|
757
|
+
}),
|
|
758
|
+
title: "ActiveCollab AI Plugin",
|
|
759
|
+
chip: /*#__PURE__*/React.createElement(Chip, {
|
|
760
|
+
label: "Recommended",
|
|
761
|
+
size: "tiny",
|
|
762
|
+
shape: "soft",
|
|
763
|
+
tone: "primary"
|
|
764
|
+
}),
|
|
765
|
+
description: "Use this when your AI agent supports plugins. You get the connection, plus skills that teach the agent how ActiveCollab works."
|
|
766
|
+
}), /*#__PURE__*/React.createElement(AccordionItemBody, null, /*#__PURE__*/React.createElement("div", {
|
|
767
|
+
className: "ca-body"
|
|
768
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "The plugin is a package that you add to your AI agent. It connects the agent to this account and teaches it how to work in ActiveCollab, so it makes fewer mistakes and needs fewer instructions from you."), /*#__PURE__*/React.createElement("div", {
|
|
769
|
+
className: "ca-list"
|
|
770
|
+
}, /*#__PURE__*/React.createElement(Body2, {
|
|
771
|
+
weight: "bold"
|
|
772
|
+
}, "The plugin includes:"), /*#__PURE__*/React.createElement(Body2, null, /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("b", null, "Connection to this account."), " You sign in once, with no token to copy."), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("b", null, "Use ActiveCollab skill."), " How to find projects, tasks, and people, and how to link to them."), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("b", null, "ActiveCollab HTML Formatting skill."), " How to write task descriptions, comments, and notes that display correctly in ActiveCollab.")))), /*#__PURE__*/React.createElement("div", {
|
|
773
|
+
className: "ca-list"
|
|
774
|
+
}, /*#__PURE__*/React.createElement(Body2, {
|
|
775
|
+
weight: "bold"
|
|
776
|
+
}, "Ask your agent to:"), /*#__PURE__*/React.createElement(Body2, null, /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Tell you what changed since your last visit."), /*#__PURE__*/React.createElement("li", null, "Prepare a weekly report for a project or for your team."), /*#__PURE__*/React.createElement("li", null, "Turn meeting notes into tasks, and log the time you spent."), /*#__PURE__*/React.createElement("li", null, "Implement a task, from the task description to a pull request that is ready for review.")))), /*#__PURE__*/React.createElement(Body2, {
|
|
777
|
+
color: "secondary"
|
|
778
|
+
}, "The plugin works in AI agents that support plugins, such as Claude, Codex, and GitHub Copilot. Agents without plugin support can connect without it."), /*#__PURE__*/React.createElement("div", {
|
|
779
|
+
className: "ca-actions"
|
|
780
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
781
|
+
variant: "text colored",
|
|
782
|
+
onClick: () => window.open(pluginUrl, "_blank")
|
|
783
|
+
}, /*#__PURE__*/React.createElement(DownloadIcon, null), "Download Plugin"), /*#__PURE__*/React.createElement(Link, {
|
|
784
|
+
variant: "text link-gray",
|
|
785
|
+
as: "a",
|
|
786
|
+
href: "#"
|
|
787
|
+
}, "How to Install the Plugin"))))) : null, isOAuth ? /*#__PURE__*/React.createElement(AccordionItem, {
|
|
788
|
+
id: "oauth"
|
|
789
|
+
}, /*#__PURE__*/React.createElement(ConnectItemHead, {
|
|
790
|
+
icon: /*#__PURE__*/React.createElement(InsertLinkIcon, {
|
|
791
|
+
style: HEAD_ICON_STYLE
|
|
792
|
+
}),
|
|
793
|
+
title: "Connect Without a Plugin",
|
|
794
|
+
description: "Use this when your AI agent supports MCP with sign-in (OAuth), but not plugins. You get the connection, without the skills."
|
|
795
|
+
}), /*#__PURE__*/React.createElement(AccordionItemBody, null, /*#__PURE__*/React.createElement("div", {
|
|
796
|
+
className: "ca-body"
|
|
797
|
+
}, /*#__PURE__*/React.createElement(ConnectWithoutPlugin, {
|
|
798
|
+
url: connection.api_url
|
|
799
|
+
})))) : null, /*#__PURE__*/React.createElement(AccordionItem, {
|
|
800
|
+
id: "token"
|
|
801
|
+
}, /*#__PURE__*/React.createElement(ConnectItemHead, {
|
|
802
|
+
icon: /*#__PURE__*/React.createElement(KeyIcon, {
|
|
803
|
+
style: HEAD_ICON_STYLE
|
|
804
|
+
}),
|
|
805
|
+
title: "Connect With a Token",
|
|
806
|
+
description: isOAuth ? "Use this when your AI agent does not support sign-in (OAuth) yet." : "Use this to connect any AI agent that supports MCP."
|
|
807
|
+
}), /*#__PURE__*/React.createElement(AccordionItemBody, null, /*#__PURE__*/React.createElement("div", {
|
|
808
|
+
className: "ca-body"
|
|
809
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "A token gives your AI agent access to ActiveCollab until you delete it. Keep it safe, and do not share it."), /*#__PURE__*/React.createElement(Button, {
|
|
810
|
+
variant: tokenButtonVariant,
|
|
811
|
+
onClick: onAddToken
|
|
812
|
+
}, "Add Token"))))));
|
|
813
|
+
};
|
|
599
814
|
|
|
600
815
|
/* ------------------------------------------------------------------ */
|
|
601
816
|
/* Page content with all flows */
|
|
602
817
|
/* ------------------------------------------------------------------ */
|
|
603
818
|
|
|
604
819
|
/**
|
|
605
|
-
* Everything under the MCP page header separator: the clients table
|
|
606
|
-
*
|
|
820
|
+
* Everything under the MCP page header separator: the clients table, the
|
|
821
|
+
* connect block, prompt examples, and the dialogs the page opens: Add MCP
|
|
607
822
|
* Client, Use Token, Delete Token, Disconnect Agent, Disconnect All
|
|
608
823
|
* Connections, and the OAuth access change confirmation.
|
|
609
824
|
*/
|
|
610
|
-
export const McpIntegrationContent =
|
|
611
|
-
let initialTokens =
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
useToken = _useState9[0],
|
|
620
|
-
setUseToken = _useState9[1];
|
|
825
|
+
export const McpIntegrationContent = _ref16 => {
|
|
826
|
+
let initialTokens = _ref16.initialTokens,
|
|
827
|
+
connection = _ref16.connection;
|
|
828
|
+
const _useState8 = useState(initialTokens),
|
|
829
|
+
tokens = _useState8[0],
|
|
830
|
+
setTokens = _useState8[1];
|
|
831
|
+
const _useState9 = useState(false),
|
|
832
|
+
addOpen = _useState9[0],
|
|
833
|
+
setAddOpen = _useState9[1];
|
|
621
834
|
const _useState0 = useState(null),
|
|
622
|
-
|
|
623
|
-
|
|
835
|
+
useToken = _useState0[0],
|
|
836
|
+
setUseToken = _useState0[1];
|
|
624
837
|
const _useState1 = useState(null),
|
|
625
|
-
|
|
626
|
-
|
|
838
|
+
deleteItem = _useState1[0],
|
|
839
|
+
setDeleteItem = _useState1[1];
|
|
627
840
|
const _useState10 = useState(null),
|
|
628
|
-
|
|
629
|
-
|
|
841
|
+
disconnectAll = _useState10[0],
|
|
842
|
+
setDisconnectAll = _useState10[1];
|
|
843
|
+
const _useState11 = useState(null),
|
|
844
|
+
pendingAccess = _useState11[0],
|
|
845
|
+
setPendingAccess = _useState11[1];
|
|
630
846
|
const removeTokens = ids => setTokens(rows => rows.filter(row => !ids.includes(row.id)));
|
|
631
847
|
const setAccess = (id, isReadWrite) => setTokens(rows => rows.map(row => row.id === id ? _extends({}, row, {
|
|
632
848
|
is_read_write: isReadWrite
|
|
@@ -661,15 +877,22 @@ export const McpIntegrationContent = _ref11 => {
|
|
|
661
877
|
const deleteConnectionCount = deleteItem != null && deleteItem.client_id ? tokens.filter(t => t.is_oauth && t.client_id === deleteItem.client_id).length : 0;
|
|
662
878
|
return /*#__PURE__*/React.createElement(React.Fragment, null, tokens.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TokensTable, {
|
|
663
879
|
tokens: tokens,
|
|
664
|
-
onAddNew: () => setAddOpen(true),
|
|
665
880
|
onDelete: setDeleteItem,
|
|
666
881
|
onDisconnectAll: setDisconnectAll,
|
|
667
882
|
onUseToken: setUseToken,
|
|
668
|
-
onAccessChange: handleAccessChange
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
883
|
+
onAccessChange: handleAccessChange,
|
|
884
|
+
connection: connection,
|
|
885
|
+
onAddToken: () => setAddOpen(true)
|
|
886
|
+
}), /*#__PURE__*/React.createElement(ConnectAgent, {
|
|
887
|
+
connection: connection,
|
|
888
|
+
heading: "Connect Another AI Agent",
|
|
889
|
+
collapsed: true,
|
|
890
|
+
onAddToken: () => setAddOpen(true)
|
|
891
|
+
}), /*#__PURE__*/React.createElement(TipsAndExamples, null)) : /*#__PURE__*/React.createElement(ConnectAgent, {
|
|
892
|
+
connection: connection,
|
|
893
|
+
heading: "Connect Your AI Agent",
|
|
894
|
+
onAddToken: () => setAddOpen(true)
|
|
895
|
+
}), addOpen ? /*#__PURE__*/React.createElement(AddClientDialog, {
|
|
673
896
|
open: addOpen,
|
|
674
897
|
onClose: () => setAddOpen(false),
|
|
675
898
|
onAdd: handleAdd
|