@ahmedramez-org/chat 0.7.0-beta.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/contract/index.d.ts +37 -17
- package/package.json +1 -1
package/contract/index.d.ts
CHANGED
|
@@ -683,16 +683,23 @@ export interface HostAction<T, R = void> {
|
|
|
683
683
|
run(target: T): R | Promise<R>;
|
|
684
684
|
}
|
|
685
685
|
/**
|
|
686
|
-
* What `actions.save`
|
|
687
|
-
*
|
|
688
|
-
*
|
|
689
|
-
*
|
|
686
|
+
* What `actions.save`, `actions.shareAccess` and `actions.openSaved` are
|
|
687
|
+
* handed: the artifact. A report (`html`, `report`) also carries its id in
|
|
688
|
+
* Copilot's artifact repository and, for a save, Copilot's own task and
|
|
689
|
+
* artifact ids: Save asks about a report only once the chat can place it in the
|
|
690
|
+
* stored conversation. Every other kind is saved from `data` and never carries
|
|
691
|
+
* them.
|
|
690
692
|
*/
|
|
691
693
|
export interface SaveTarget extends ChatArtifact {
|
|
692
694
|
/**
|
|
693
|
-
* The report's
|
|
694
|
-
*
|
|
695
|
-
*
|
|
695
|
+
* The report's id in Copilot's artifact repository (`repo_artifact_id`): what a host saves
|
|
696
|
+
* the report by and later opens it by, in the caller's tenant. Absent when Copilot did not
|
|
697
|
+
* name one; a host that needs it declines the report then.
|
|
698
|
+
*/
|
|
699
|
+
repoArtifactId?: string;
|
|
700
|
+
/**
|
|
701
|
+
* @deprecated The report's `artifact://{tenant}/{id}` URI: save by `repoArtifactId`. Still
|
|
702
|
+
* filled while hosts move off it.
|
|
696
703
|
*/
|
|
697
704
|
artifactUri?: string;
|
|
698
705
|
/** Copilot's task and artifact ids for the message part: email share and lineage. */
|
|
@@ -714,19 +721,32 @@ export interface ChatActions {
|
|
|
714
721
|
open?: HostAction<OpenIntent>;
|
|
715
722
|
/**
|
|
716
723
|
* Save a generated draft or a report in the host's catalog. `run` resolves
|
|
717
|
-
* to the fields the save changed
|
|
718
|
-
*
|
|
719
|
-
*
|
|
720
|
-
*
|
|
721
|
-
*
|
|
722
|
-
*
|
|
723
|
-
* Absent: no Save.
|
|
724
|
+
* to the fields the save changed, which `can` then reads on the artifact.
|
|
725
|
+
* A draft's go into its `data` and are recorded on the stored part, so the
|
|
726
|
+
* conversation replays it as saved. A report's go into its `metadata` on the
|
|
727
|
+
* card only, never sent: the host's backend marks a saved report itself as it
|
|
728
|
+
* serves the history (Incorta's `saved_items`). A field the artifact already
|
|
729
|
+
* carries is replaced. `{}` means nothing was saved (the user dismissed the
|
|
730
|
+
* host's dialog): nothing is recorded and Save stays. Absent: no Save.
|
|
724
731
|
*/
|
|
725
732
|
save?: HostAction<SaveTarget, Record<string, unknown>>;
|
|
726
733
|
/**
|
|
727
|
-
*
|
|
728
|
-
*
|
|
729
|
-
*
|
|
734
|
+
* Who may see a report the host saved: its own access dialog, offered wherever
|
|
735
|
+
* `can` accepts the report (a host offers it once the report is saved, so Save
|
|
736
|
+
* and Share access take turns). `run` may resolve to fields to set on the
|
|
737
|
+
* report's card, as Save's are: a host that finds the saved item gone resolves
|
|
738
|
+
* `{ saved_items: null }`, and the card offers Save again. Absent: no Share access.
|
|
739
|
+
*/
|
|
740
|
+
shareAccess?: HostAction<SaveTarget, Record<string, unknown> | void>;
|
|
741
|
+
/**
|
|
742
|
+
* Open the saved report where the host keeps it (Incorta's Content), offered
|
|
743
|
+
* as "Open in Content" wherever `can` accepts the report. Absent: none.
|
|
744
|
+
*/
|
|
745
|
+
openSaved?: HostAction<SaveTarget>;
|
|
746
|
+
/**
|
|
747
|
+
* Email an artifact through the host's own dialog (Copilot sends it, hence its
|
|
748
|
+
* ids); `run` resolves `true` once sent. Shown in the canvas and the card menu,
|
|
749
|
+
* as "Email report", wherever `can` accepts the target. Absent: no Email.
|
|
730
750
|
*/
|
|
731
751
|
share?: HostAction<ShareTarget, boolean>;
|
|
732
752
|
/** Insert an answer's code block into the host (a notebook paragraph). Absent: no Insert button. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ahmedramez-org/chat",
|
|
3
|
-
"version": "0.7.0
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Incorta's chat for any app: a connector and React component that load the prebuilt chat from IncortaCopilot (or a pinned copy), and the host contract types and checks.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|