@epam/ai-dial-chat-hooks 1.4.0-dev.6 → 1.4.0-dev.66
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/catalog/create-publish-api.d.ts +7 -1
- package/catalog/create-publish-api.d.ts.map +1 -1
- package/catalog/create-publish-api.js +4 -0
- package/catalog/entity-details.d.ts +5 -2
- package/catalog/entity-details.d.ts.map +1 -1
- package/catalog/map-entity-details-to-catalog.d.ts +4 -0
- package/catalog/map-entity-details-to-catalog.d.ts.map +1 -1
- package/catalog/map-entity-details-to-catalog.js +15 -13
- package/catalog/publish-dependency-icons.d.ts +22 -0
- package/catalog/publish-dependency-icons.d.ts.map +1 -0
- package/catalog/publish-dependency-icons.js +11 -0
- package/catalog/publish.d.ts +13 -2
- package/catalog/publish.d.ts.map +1 -1
- package/catalog/publish.js +13 -2
- package/catalog/use-publish-dependencies.d.ts +19 -0
- package/catalog/use-publish-dependencies.d.ts.map +1 -0
- package/catalog/use-publish-dependencies.js +25 -0
- package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -1
- package/catalog/usePublishFolders/usePublishFolders.js +1 -1
- package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts.map +1 -1
- package/catalog/useResourceSavePanel/useResourceSavePanel.js +83 -84
- package/catalog.js +33 -31
- package/conversation/announcement-message.d.ts +12 -0
- package/conversation/announcement-message.d.ts.map +1 -1
- package/conversation/announcement-message.js +16 -10
- package/conversation.js +44 -44
- package/entry-points/catalog.d.ts +2 -0
- package/entry-points/catalog.d.ts.map +1 -1
- package/entry-points/project.d.ts +5 -0
- package/entry-points/project.d.ts.map +1 -1
- package/entry-points/utils.d.ts +3 -0
- package/entry-points/utils.d.ts.map +1 -1
- package/index.d.ts +10 -0
- package/index.d.ts.map +1 -1
- package/index.js +223 -214
- package/org-units/models.d.ts +9 -0
- package/org-units/models.d.ts.map +1 -0
- package/org-units/types.d.ts +14 -0
- package/org-units/types.d.ts.map +1 -0
- package/org-units/types.js +6 -0
- package/org-units/useOrgUnits/useOrgUnits.d.ts +19 -0
- package/org-units/useOrgUnits/useOrgUnits.d.ts.map +1 -0
- package/org-units/useOrgUnits/useOrgUnits.js +34 -0
- package/package.json +18 -18
- package/project/project-sharing-client.d.ts +8 -0
- package/project/project-sharing-client.d.ts.map +1 -0
- package/project/project-sharing-client.js +11 -0
- package/project/project-sharing.d.ts +28 -0
- package/project/project-sharing.d.ts.map +1 -0
- package/project/project-sharing.js +22 -0
- package/project/use-pinned-project-chats.d.ts +4 -2
- package/project/use-pinned-project-chats.d.ts.map +1 -1
- package/project/use-pinned-project-chats.js +152 -96
- package/project/use-project-conversations.d.ts.map +1 -1
- package/project/use-project-conversations.js +2 -2
- package/project/use-project-remove-from-list.d.ts +30 -0
- package/project/use-project-remove-from-list.d.ts.map +1 -0
- package/project/use-project-remove-from-list.js +39 -0
- package/project/use-project-revoke-access.d.ts +15 -0
- package/project/use-project-revoke-access.d.ts.map +1 -0
- package/project/use-project-revoke-access.js +32 -0
- package/project/use-project-share-recipients.d.ts +7 -0
- package/project/use-project-share-recipients.d.ts.map +1 -0
- package/project/use-project-share-recipients.js +36 -0
- package/project/use-projects.d.ts +1 -0
- package/project/use-projects.d.ts.map +1 -1
- package/project/use-projects.js +2 -1
- package/project.js +7 -2
- package/utils.js +3 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OrgUnit } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
/** What the host's org-units read resolves to. */
|
|
3
|
+
export interface OrgUnitsListResult {
|
|
4
|
+
/** `false` when DIAL Core has org units turned off. */
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
/** The units the current user may see. */
|
|
7
|
+
units: OrgUnit[];
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/org-units/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAEzD,kDAAkD;AAClD,MAAM,WAAW,kBAAkB;IACjC,uDAAuD;IACvD,OAAO,EAAE,OAAO,CAAC;IACjB,0CAA0C;IAC1C,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Load state of the org units read by `useOrgUnits`. */
|
|
2
|
+
export declare enum OrgUnitsStatus {
|
|
3
|
+
/** Nothing has asked for the units yet. */
|
|
4
|
+
Idle = "idle",
|
|
5
|
+
/** The read is in flight. */
|
|
6
|
+
Loading = "loading",
|
|
7
|
+
/** The units are loaded. */
|
|
8
|
+
Ready = "ready",
|
|
9
|
+
/** DIAL Core has org units turned off. */
|
|
10
|
+
Disabled = "disabled",
|
|
11
|
+
/** The read failed; no units are known. */
|
|
12
|
+
Error = "error"
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/org-units/types.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,oBAAY,cAAc;IACxB,2CAA2C;IAC3C,IAAI,SAAS;IACb,6BAA6B;IAC7B,OAAO,YAAY;IACnB,4BAA4B;IAC5B,KAAK,UAAU;IACf,0CAA0C;IAC1C,QAAQ,aAAa;IACrB,2CAA2C;IAC3C,KAAK,UAAU;CAChB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OrgUnitsListResult } from '../models';
|
|
2
|
+
import { OrgUnitsStatus } from '../types';
|
|
3
|
+
/** Options for {@link useOrgUnits}. */
|
|
4
|
+
export interface UseOrgUnitsOptions {
|
|
5
|
+
/** Reads the org units visible to the current user; supplied by the host. */
|
|
6
|
+
listOrgUnits: () => Promise<OrgUnitsListResult>;
|
|
7
|
+
}
|
|
8
|
+
/** State returned by {@link useOrgUnits}. */
|
|
9
|
+
export interface UseOrgUnitsResult {
|
|
10
|
+
/** Load state of the units. */
|
|
11
|
+
status: OrgUnitsStatus;
|
|
12
|
+
/** Starts the read on its first call, and again after a failed read; otherwise does nothing. */
|
|
13
|
+
ensureUnits: () => void;
|
|
14
|
+
/** Whether a public-bucket path is a unit's own folder; `false` until the units are loaded. */
|
|
15
|
+
isOrgUnitFolder: (publicPath: string) => boolean;
|
|
16
|
+
}
|
|
17
|
+
/** Loads the current user's org units once, on demand, and answers which public folders are units. */
|
|
18
|
+
export declare const useOrgUnits: ({ listOrgUnits, }: UseOrgUnitsOptions) => UseOrgUnitsResult;
|
|
19
|
+
//# sourceMappingURL=useOrgUnits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOrgUnits.d.ts","sourceRoot":"","sources":["../../../src/org-units/useOrgUnits/useOrgUnits.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC,6EAA6E;IAC7E,YAAY,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACjD;AAED,6CAA6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,MAAM,EAAE,cAAc,CAAC;IACvB,gGAAgG;IAChG,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,+FAA+F;IAC/F,eAAe,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;CAClD;AAED,sGAAsG;AACtG,eAAO,MAAM,WAAW,GAAI,mBAEzB,kBAAkB,KAAG,iBAoDvB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { OrgUnitsStatus as e } from "../types.js";
|
|
2
|
+
import { isOrgUnitFolder as t, toOrgUnitFolderSet as n } from "@epam/ai-dial-chat-shared";
|
|
3
|
+
import { useCallback as r, useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
|
|
4
|
+
//#region src/org-units/useOrgUnits/useOrgUnits.ts
|
|
5
|
+
var c = ({ listOrgUnits: c }) => {
|
|
6
|
+
let [l, u] = s([]), [d, f] = s(e.Idle), p = o(!1), m = o(!0), h = o(c);
|
|
7
|
+
h.current = c, i(() => (m.current = !0, () => {
|
|
8
|
+
m.current = !1;
|
|
9
|
+
}), []);
|
|
10
|
+
let g = r(async () => {
|
|
11
|
+
f(e.Loading);
|
|
12
|
+
try {
|
|
13
|
+
let t = await h.current();
|
|
14
|
+
if (!m.current) return;
|
|
15
|
+
if (!t.enabled) {
|
|
16
|
+
u([]), f(e.Disabled);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
u(t.units), f(e.Ready);
|
|
20
|
+
} catch {
|
|
21
|
+
if (p.current = !1, !m.current) return;
|
|
22
|
+
u([]), f(e.Error);
|
|
23
|
+
}
|
|
24
|
+
}, []), _ = r(() => {
|
|
25
|
+
p.current || (p.current = !0, g());
|
|
26
|
+
}, [g]), v = a(() => n(l), [l]);
|
|
27
|
+
return {
|
|
28
|
+
status: d,
|
|
29
|
+
ensureUnits: _,
|
|
30
|
+
isOrgUnitFolder: r((n) => d === e.Ready && t(v, n), [d, v])
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { c as useOrgUnits };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-chat-hooks",
|
|
3
3
|
"description": "Framework-level React hooks extracted from AI DIAL Chat for building custom chat interfaces",
|
|
4
|
-
"version": "1.4.0-dev.
|
|
4
|
+
"version": "1.4.0-dev.66",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
"dependencies": {
|
|
134
|
-
"@epam/ai-dial-chat-api-client": "1.4.0-dev.
|
|
134
|
+
"@epam/ai-dial-chat-api-client": "1.4.0-dev.66",
|
|
135
135
|
"dompurify": "3.4.17",
|
|
136
136
|
"fflate": "^0.8.3",
|
|
137
137
|
"lru-cache": "^10.4.3",
|
|
@@ -140,25 +140,25 @@
|
|
|
140
140
|
},
|
|
141
141
|
"peerDependencies": {
|
|
142
142
|
"react": "^19.2.8",
|
|
143
|
-
"@epam/ai-dial-attachment-canvas": "1.4.0-dev.
|
|
144
|
-
"@epam/ai-dial-attachment-input": "1.4.0-dev.
|
|
145
|
-
"@epam/ai-dial-catalog": "1.4.0-dev.
|
|
146
|
-
"@epam/ai-dial-chat-overlay": "1.4.0-dev.
|
|
147
|
-
"@epam/ai-dial-chat-shared": "1.4.0-dev.
|
|
148
|
-
"@epam/ai-dial-conversation-input": "1.4.0-dev.
|
|
149
|
-
"@epam/ai-dial-mcp-apps": "1.4.0-dev.
|
|
150
|
-
"@epam/ai-dial-projects": "1.4.0-dev.
|
|
151
|
-
"@epam/ai-dial-publish-panel": "1.4.0-dev.
|
|
152
|
-
"@epam/ai-dial-quotations": "1.4.0-dev.
|
|
143
|
+
"@epam/ai-dial-attachment-canvas": "1.4.0-dev.66",
|
|
144
|
+
"@epam/ai-dial-attachment-input": "1.4.0-dev.66",
|
|
145
|
+
"@epam/ai-dial-catalog": "1.4.0-dev.66",
|
|
146
|
+
"@epam/ai-dial-chat-overlay": "1.4.0-dev.66",
|
|
147
|
+
"@epam/ai-dial-chat-shared": "1.4.0-dev.66",
|
|
148
|
+
"@epam/ai-dial-conversation-input": "1.4.0-dev.66",
|
|
149
|
+
"@epam/ai-dial-mcp-apps": "1.4.0-dev.66",
|
|
150
|
+
"@epam/ai-dial-projects": "1.4.0-dev.66",
|
|
151
|
+
"@epam/ai-dial-publish-panel": "1.4.0-dev.66",
|
|
152
|
+
"@epam/ai-dial-quotations": "1.4.0-dev.66",
|
|
153
153
|
"@epam/ai-dial-react-file-manager": "^0.4.1",
|
|
154
|
-
"@epam/ai-dial-scheduled-tasks": "1.4.0-dev.
|
|
155
|
-
"@epam/ai-dial-share": "1.4.0-dev.
|
|
156
|
-
"@epam/ai-dial-skill-editor": "1.4.0-dev.
|
|
157
|
-
"@epam/ai-dial-source-panel": "1.4.0-dev.
|
|
154
|
+
"@epam/ai-dial-scheduled-tasks": "1.4.0-dev.66",
|
|
155
|
+
"@epam/ai-dial-share": "1.4.0-dev.66",
|
|
156
|
+
"@epam/ai-dial-skill-editor": "1.4.0-dev.66",
|
|
157
|
+
"@epam/ai-dial-source-panel": "1.4.0-dev.66",
|
|
158
158
|
"@epam/ai-dial-ui-kit": "^0.16.0",
|
|
159
|
-
"@epam/ai-dial-usage-dashboard": "1.4.0-dev.
|
|
159
|
+
"@epam/ai-dial-usage-dashboard": "1.4.0-dev.66",
|
|
160
160
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
161
|
-
"@epam/pdf-highlighter-kit": "^0.0.
|
|
161
|
+
"@epam/pdf-highlighter-kit": "^0.0.22"
|
|
162
162
|
},
|
|
163
163
|
"peerDependenciesMeta": {
|
|
164
164
|
"@epam/ai-dial-attachment-canvas": {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ShareApi } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
/** Already-configured sharing operations required by project sharing hooks. Keep the instance stable. */
|
|
3
|
+
export type ProjectSharingClient = Pick<ShareApi, 'getShareRecipientsCount' | 'revokeSharedAccess'>;
|
|
4
|
+
/** Subscribes a menu to successful revokes made through the same configured client. */
|
|
5
|
+
export declare const subscribeProjectAccessRevoked: (client: ProjectSharingClient, listener: (projectId: string) => void) => () => void;
|
|
6
|
+
/** Invalidates recipient counts for one project and one configured client. */
|
|
7
|
+
export declare const notifyProjectAccessRevoked: (client: ProjectSharingClient, projectId: string) => void;
|
|
8
|
+
//# sourceMappingURL=project-sharing-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-sharing-client.d.ts","sourceRoot":"","sources":["../../src/project/project-sharing-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAE9D,yGAAyG;AACzG,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,QAAQ,EACR,yBAAyB,GAAG,oBAAoB,CACjD,CAAC;AAOF,uFAAuF;AACvF,eAAO,MAAM,6BAA6B,GACxC,QAAQ,oBAAoB,EAC5B,UAAU,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,eAWtC,CAAC;AAEF,8EAA8E;AAC9E,eAAO,MAAM,0BAA0B,GACrC,QAAQ,oBAAoB,EAC5B,WAAW,MAAM,SAGlB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/project/project-sharing-client.ts
|
|
2
|
+
var e = /* @__PURE__ */ new WeakMap(), t = (t, n) => {
|
|
3
|
+
let r = e.get(t);
|
|
4
|
+
return r || (r = /* @__PURE__ */ new Set(), e.set(t, r)), r.add(n), () => {
|
|
5
|
+
r.delete(n);
|
|
6
|
+
};
|
|
7
|
+
}, n = (t, n) => {
|
|
8
|
+
for (let r of e.get(t) ?? []) r(n);
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { n as notifyProjectAccessRevoked, t as subscribeProjectAccessRevoked };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ProjectDetailsDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
/** Whether a project was shared with the caller, so they may drop it from their list but not delete it. */
|
|
3
|
+
export declare const isProjectSharedWithMe: (project: Pick<ProjectDetailsDto, "source" | "canManage"> | null | undefined) => boolean;
|
|
4
|
+
/** An action of a pinned project's sidebar menu; the values are the menu item keys. */
|
|
5
|
+
export declare enum PinnedProjectMenuAction {
|
|
6
|
+
/** Removes the project from the pins. */
|
|
7
|
+
Unpin = "unpin",
|
|
8
|
+
/** Opens the edit page. */
|
|
9
|
+
Edit = "edit",
|
|
10
|
+
/** Opens the publish panel. */
|
|
11
|
+
Publish = "publish",
|
|
12
|
+
/** Opens the share popover. */
|
|
13
|
+
Share = "share",
|
|
14
|
+
/** Opens the owner's revoke-access confirmation. */
|
|
15
|
+
RevokeAccess = "revokeAccess",
|
|
16
|
+
/** Opens the delete confirmation. */
|
|
17
|
+
Delete = "delete",
|
|
18
|
+
/** Opens the confirmation that drops a shared project from the caller's list. */
|
|
19
|
+
RemoveFromMyList = "removeFromMyList"
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Returns the actions a pinned project's menu offers the caller, in display order.
|
|
23
|
+
* The host maps each to its label, icon and handler.
|
|
24
|
+
* @param project - The loaded project, or nullish while loading.
|
|
25
|
+
* @param canRevokeAccess - Whether recipients are confirmed; defaults to false. Ownership is still required.
|
|
26
|
+
*/
|
|
27
|
+
export declare const getPinnedProjectMenuActions: (project: Pick<ProjectDetailsDto, "source" | "canEdit" | "canManage"> | null | undefined, canRevokeAccess?: boolean) => PinnedProjectMenuAction[];
|
|
28
|
+
//# sourceMappingURL=project-sharing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-sharing.d.ts","sourceRoot":"","sources":["../../src/project/project-sharing.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,+BAA+B,CAAC;AAEvC,2GAA2G;AAC3G,eAAO,MAAM,qBAAqB,GAChC,SAAS,IAAI,CAAC,iBAAiB,EAAE,QAAQ,GAAG,WAAW,CAAC,GAAG,IAAI,GAAG,SAAS,KAC1E,OAGiB,CAAC;AAErB,uFAAuF;AACvF,oBAAY,uBAAuB;IACjC,yCAAyC;IACzC,KAAK,UAAU;IACf,2BAA2B;IAC3B,IAAI,SAAS;IACb,+BAA+B;IAC/B,OAAO,YAAY;IACnB,+BAA+B;IAC/B,KAAK,UAAU;IACf,oDAAoD;IACpD,YAAY,iBAAiB;IAC7B,qCAAqC;IACrC,MAAM,WAAW;IACjB,iFAAiF;IACjF,gBAAgB,qBAAqB;CACtC;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GACtC,SACI,IAAI,CAAC,iBAAiB,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC,GAC3D,IAAI,GACJ,SAAS,EACb,yBAAuB,KACtB,uBAAuB,EAyBzB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ProjectSource as e } from "@epam/ai-dial-chat-api-client";
|
|
2
|
+
//#region src/project/project-sharing.ts
|
|
3
|
+
var t = (t) => t != null && t.source === e.Shared && !t.canManage, n = /* @__PURE__ */ function(e) {
|
|
4
|
+
return e.Unpin = "unpin", e.Edit = "edit", e.Publish = "publish", e.Share = "share", e.RevokeAccess = "revokeAccess", e.Delete = "delete", e.RemoveFromMyList = "removeFromMyList", e;
|
|
5
|
+
}({}), r = (e, n = !1) => {
|
|
6
|
+
if (e == null) return ["unpin"];
|
|
7
|
+
let r = t(e) ? ["removeFromMyList"] : [];
|
|
8
|
+
return e.canEdit ? e.canManage ? [
|
|
9
|
+
"unpin",
|
|
10
|
+
"edit",
|
|
11
|
+
"publish",
|
|
12
|
+
"share",
|
|
13
|
+
...n ? ["revokeAccess"] : [],
|
|
14
|
+
"delete"
|
|
15
|
+
] : [
|
|
16
|
+
"unpin",
|
|
17
|
+
"edit",
|
|
18
|
+
...r
|
|
19
|
+
] : ["unpin", ...r];
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { n as PinnedProjectMenuAction, r as getPinnedProjectMenuActions, t as isProjectSharedWithMe };
|
|
@@ -8,6 +8,8 @@ export interface PinnedProjectChatsOptions {
|
|
|
8
8
|
enabled: boolean;
|
|
9
9
|
/** The project no longer exists (a watch `DELETE`, or `404` on a read). Called at most once per id. */
|
|
10
10
|
onProjectDeleted: (projectId: string) => void;
|
|
11
|
+
/** Id of the chat the host has open. When it is not among the newest chats of its project, it takes the last slot of that project's list, so the list never exceeds `PINNED_PROJECT_CHATS_LIMIT`. */
|
|
12
|
+
activeConversationId?: string;
|
|
11
13
|
}
|
|
12
14
|
/** A chat listed under a pinned project. */
|
|
13
15
|
export interface PinnedProjectChat {
|
|
@@ -22,7 +24,7 @@ export interface PinnedProjectChat {
|
|
|
22
24
|
export interface PinnedProjectChats {
|
|
23
25
|
/** The project's details as last read; `canEdit`, `canManage`, `contentVersion` and `conversationCount` feed the host's actions. */
|
|
24
26
|
project: ProjectDetailsDto;
|
|
25
|
-
/** At most `PINNED_PROJECT_CHATS_LIMIT` chats, newest first. */
|
|
27
|
+
/** At most `PINNED_PROJECT_CHATS_LIMIT` chats, newest first; an open chat past the newest ones replaces the last of them and comes last. */
|
|
26
28
|
chats: PinnedProjectChat[];
|
|
27
29
|
/** The project has more chats than `chats` holds. */
|
|
28
30
|
hasMore: boolean;
|
|
@@ -54,5 +56,5 @@ export interface PinnedProjectChatsResult {
|
|
|
54
56
|
* @param projectIds - The pinned project ids, in display order.
|
|
55
57
|
* @param options - Whether the tree is enabled and the delete callback; the callback is read at event time, so a new identity never resubscribes.
|
|
56
58
|
*/
|
|
57
|
-
export declare const usePinnedProjectChats: (client: Pick<ProjectsApiClient, "getProject" | "listProjectConversations" | "getProjectConversationTitles" | "watchProjects">, projectIds: string[], { enabled, onProjectDeleted }: PinnedProjectChatsOptions) => PinnedProjectChatsResult;
|
|
59
|
+
export declare const usePinnedProjectChats: (client: Pick<ProjectsApiClient, "getProject" | "listProjectConversations" | "getProjectConversationTitles" | "watchProjects">, projectIds: string[], { enabled, onProjectDeleted, activeConversationId, }: PinnedProjectChatsOptions) => PinnedProjectChatsResult;
|
|
58
60
|
//# sourceMappingURL=use-pinned-project-chats.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-pinned-project-chats.d.ts","sourceRoot":"","sources":["../../src/project/use-pinned-project-chats.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AAKvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,kDAAkD;AAClD,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAW7C,wEAAwE;AACxE,MAAM,WAAW,yBAAyB;IACxC,gEAAgE;IAChE,OAAO,EAAE,OAAO,CAAC;IACjB,uGAAuG;IACvG,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/
|
|
1
|
+
{"version":3,"file":"use-pinned-project-chats.d.ts","sourceRoot":"","sources":["../../src/project/use-pinned-project-chats.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AAKvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,kDAAkD;AAClD,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAW7C,wEAAwE;AACxE,MAAM,WAAW,yBAAyB;IACxC,gEAAgE;IAChE,OAAO,EAAE,OAAO,CAAC;IACjB,uGAAuG;IACvG,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,qMAAqM;IACrM,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,4CAA4C;AAC5C,MAAM,WAAW,iBAAiB;IAChC,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,oDAAoD;AACpD,MAAM,WAAW,kBAAkB;IACjC,oIAAoI;IACpI,OAAO,EAAE,iBAAiB,CAAC;IAC3B,4IAA4I;IAC5I,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,qDAAqD;IACrD,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,4CAA4C;AAC5C,MAAM,WAAW,wBAAwB;IACvC,qGAAqG;IACrG,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,oEAAoE;IACpE,SAAS,EAAE,OAAO,CAAC;IACnB,mGAAmG;IACnG,UAAU,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,gGAAgG;IAChG,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAiHD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB,GAChC,QAAQ,IAAI,CACV,iBAAiB,EACf,YAAY,GACZ,0BAA0B,GAC1B,8BAA8B,GAC9B,eAAe,CAClB,EACD,YAAY,MAAM,EAAE,EACpB,sDAIG,yBAAyB,KAC3B,wBAwaF,CAAC"}
|