Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/dixa/actions/add-message/add-message.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "dixa-add-message",
name: "Add Message to Conversation",
description: "Adds a message to an existing conversation. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Conversations/#tag/Conversations/operation/postConversationsConversationidMessages).",
version: "0.0.2",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import dixa from "../../dixa.app.mjs";

export default {
key: "dixa-close-conversation",
name: "Close Conversation",
description: "Mark a conversation as closed by providing its id. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Conversations/#tag/Conversations/operation/putConversationsConversationidClose)",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
dixa,
endUserId: {
propDefinition: [
dixa,
"endUserId",
],
},
conversationId: {
propDefinition: [
dixa,
"conversationId",
({ endUserId }) => ({
endUserId,
}),
],
},
agentId: {
propDefinition: [
dixa,
"agentId",
],
hidden: false,
description: "An optional agent/admin to close the conversation.",
optional: true,
},
},
async run({ $ }) {
const response = await this.dixa.closeConversation({
$,
conversationId: this.conversationId,
data: {
agentId: this.agentId,
},
});
$.export("$summary", `Successfully closed conversation ${this.conversationId}`);
return response;
},
};
Comment on lines +1 to +52
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix directory name - appears to be an accidental artifact.

The file is located in a directory named "claim-conversation copy", which suggests this is an accidental copy/paste artifact. The directory should be renamed to "close-conversation" to match the action name and follow the established naming convention.

Expected path: components/dixa/actions/close-conversation/close-conversation.mjs
Current path: components/dixa/actions/claim-conversation copy/close-conversation.mjs

The directory name contains a space and the word "copy", which could cause issues with:

  • Build systems and tooling that don't handle spaces well
  • Version control operations
  • Deployment pipelines
  • Code navigation and IDE tooling
🤖 Prompt for AI Agents
In components/dixa/actions/claim-conversation copy/close-conversation.mjs lines
1-52, the file resides in a mistakenly named directory "claim-conversation copy"
(contains space and "copy"); move/rename the directory to
components/dixa/actions/close-conversation and place the file as
close-conversation.mjs there, using git mv to preserve history, then update any
references/imports/workflow paths that pointed to the old path to the new path
and ensure no tooling or CI config refers to the old directory name.

58 changes: 58 additions & 0 deletions components/dixa/actions/claim-conversation/claim-conversation.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import dixa from "../../dixa.app.mjs";

export default {
key: "dixa-claim-conversation",
name: "Claim Conversation",
description: "Claims a conversation for a given agent. To avoid taking over assigned conversations, set the force paremeter to false. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Conversations/#tag/Conversations/operation/putConversationsConversationidClaim)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix typo in description.

The word "paremeter" should be "parameter".

Apply this diff:

-  description: "Claims a conversation for a given agent. To avoid taking over assigned conversations, set the force paremeter to false. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Conversations/#tag/Conversations/operation/putConversationsConversationidClaim)",
+  description: "Claims a conversation for a given agent. To avoid taking over assigned conversations, set the force parameter to false. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Conversations/#tag/Conversations/operation/putConversationsConversationidClaim)",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
description: "Claims a conversation for a given agent. To avoid taking over assigned conversations, set the force paremeter to false. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Conversations/#tag/Conversations/operation/putConversationsConversationidClaim)",
description: "Claims a conversation for a given agent. To avoid taking over assigned conversations, set the force parameter to false. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Conversations/#tag/Conversations/operation/putConversationsConversationidClaim)",
🤖 Prompt for AI Agents
In components/dixa/actions/claim-conversation/claim-conversation.mjs around line
6, the description string contains a typo: "paremeter" should be corrected to
"parameter"; update the description to replace "paremeter" with "parameter" so
the text reads "...To avoid taking over assigned conversations, set the force
parameter to false..." and keep the rest of the string and link unchanged.

version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
dixa,
endUserId: {
propDefinition: [
dixa,
"endUserId",
],
},
conversationId: {
propDefinition: [
dixa,
"conversationId",
({ endUserId }) => ({
endUserId,
}),
],
},
agentId: {
propDefinition: [
dixa,
"agentId",
],
hidden: false,
description: "The ID of the agent who is claiming the conversation.",
},
force: {
type: "boolean",
label: "Force",
description: "Set as false to avoid taking over the conversation if it is already assigned to an agent.",
default: false,
},
},
async run({ $ }) {
const response = await this.dixa.claimConversation({
$,
conversationId: this.conversationId,
data: {
agentId: this.agentId,
force: this.force,
},
});
$.export("$summary", `Successfully claimed conversation ${this.conversationId} for agent ${this.agentId}`);
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "dixa-create-conversation",
name: "Create Conversation",
description: "Creates a new email or contact form-based conversation. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Conversations/#tag/Conversations/operation/postConversations).",
version: "0.0.2",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
48 changes: 48 additions & 0 deletions components/dixa/actions/create-note/create-note.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import dixa from "../../dixa.app.mjs";

export default {
key: "dixa-create-note",
name: "Create Note",
description: "Creates an internal note for a conversation. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Conversations/#tag/Conversations/operation/postConversationsConversationidNotes).",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
dixa,
endUserId: {
propDefinition: [
dixa,
"endUserId",
],
},
conversationId: {
propDefinition: [
dixa,
"conversationId",
({ endUserId }) => ({
endUserId,
}),
],
},
message: {
type: "string",
label: "Message",
description: "The message to create the note for.",
},
},
async run({ $ }) {
const response = await this.dixa.createNote({
$,
conversationId: this.conversationId,
data: {
message: this.message,
},
});
$.export("$summary", `Successfully created note with ID ${response.data.id}`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import dixa from "../../dixa.app.mjs";

export default {
key: "dixa-get-article-translations",
name: "Get Article Translations",
description: "Get the translations of an article from Dixa. [See the documentation](https://docs.dixa.io/openapi/dixa-api/beta/tag/Knowledge/#tag/Knowledge/operation/getKnowledgeArticlesArticleidTranslations)",
version: "0.0.2",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
dixa,
articleId: {
type: "string",
label: "Article ID",
description: "The ID of the article to get translations for",
},
},
async run({ $ }) {
const response = await this.dixa.getArticleTranslations({
articleId: this.articleId,
$,
});
$.export("$summary", `Successfully retrieved translations for article with ID ${this.articleId}`);
return response;
},
};
30 changes: 30 additions & 0 deletions components/dixa/actions/get-article/get-article.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import dixa from "../../dixa.app.mjs";

export default {
key: "dixa-get-article",
name: "Get Article",
description: "Get an article from Dixa. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Knowledge/#tag/Knowledge/operation/getKnowledgeArticlesArticleid)",
version: "0.0.2",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
dixa,
articleId: {
type: "string",
label: "Article ID",
description: "The ID of the article to get",
},
},
async run({ $ }) {
const response = await this.dixa.getArticle({
articleId: this.articleId,
$,
});
$.export("$summary", `Successfully retrieved article with ID ${this.articleId}`);
return response;
},
};
40 changes: 40 additions & 0 deletions components/dixa/actions/get-conversation/get-conversation.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import dixa from "../../dixa.app.mjs";

export default {
key: "dixa-get-conversation",
name: "Get Conversation",
description: "Gets a conversation. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Conversations/#tag/Conversations/operation/getConversationsConversationid)",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
Comment on lines +8 to +12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Set readOnlyHint to true for read-only operations.

This action performs a GET operation that only retrieves data. The readOnlyHint should be true to accurately reflect this read-only behavior.

Apply this diff:

   annotations: {
     destructiveHint: false,
     openWorldHint: true,
-    readOnlyHint: false,
+    readOnlyHint: true,
   },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
🤖 Prompt for AI Agents
In components/dixa/actions/get-conversation/get-conversation.mjs around lines 8
to 12, the action metadata currently sets readOnlyHint to false while this is a
GET/read-only operation; change readOnlyHint to true so the annotations
accurately reflect that the action is read-only (i.e., set readOnlyHint: true in
the annotations object).

type: "action",
props: {
dixa,
endUserId: {
propDefinition: [
dixa,
"endUserId",
],
},
conversationId: {
propDefinition: [
dixa,
"conversationId",
({ endUserId }) => ({
endUserId,
}),
],
},
},
async run({ $ }) {
const response = await this.dixa.getConversation({
$,
conversationId: this.conversationId,
});
$.export("$summary", `Successfully retrieved conversation ${this.conversationId}`);
return response;
},
};
40 changes: 40 additions & 0 deletions components/dixa/actions/list-messages/list-messages.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import dixa from "../../dixa.app.mjs";

export default {
key: "dixa-list-messages",
name: "List Messages",
description: "Lists messages from a conversation. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Conversations/#tag/Conversations/operation/getConversationsConversationidMessages).",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
Comment on lines +8 to +12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Set readOnlyHint to true for read-only operations.

This action performs a GET operation that only retrieves data without modifying state. The readOnlyHint should be true.

Apply this diff:

   annotations: {
     destructiveHint: false,
     openWorldHint: true,
-    readOnlyHint: false,
+    readOnlyHint: true,
   },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
🤖 Prompt for AI Agents
In components/dixa/actions/list-messages/list-messages.mjs around lines 8 to 12,
the annotations object marks readOnlyHint as false even though this action is a
GET/read-only operation; update the annotations to set readOnlyHint: true (i.e.,
change readOnlyHint from false to true) so the metadata correctly reflects that
the action does not modify state.

type: "action",
props: {
dixa,
endUserId: {
propDefinition: [
dixa,
"endUserId",
],
},
conversationId: {
propDefinition: [
dixa,
"conversationId",
({ endUserId }) => ({
endUserId,
}),
],
},
},
async run({ $ }) {
const response = await this.dixa.listMessages({
$,
conversationId: this.conversationId,
});
$.export("$summary", `Successfully retrieved ${response.data.length} message(s) from conversation ${this.conversationId}`);
return response;
},
};
40 changes: 40 additions & 0 deletions components/dixa/actions/list-notes/list-notes.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import dixa from "../../dixa.app.mjs";

export default {
key: "dixa-list-notes",
name: "List Notes",
description: "Lists internal notes from a conversation. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Conversations/#tag/Conversations/operation/getConversationsConversationidNotes).",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
Comment on lines +8 to +12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Set readOnlyHint to true for read-only operations.

This action performs a GET operation that only retrieves data without modifying state. The readOnlyHint should be true to accurately reflect this behavior.

Apply this diff:

   annotations: {
     destructiveHint: false,
     openWorldHint: true,
-    readOnlyHint: false,
+    readOnlyHint: true,
   },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
🤖 Prompt for AI Agents
In components/dixa/actions/list-notes/list-notes.mjs around lines 8 to 12, the
action performs a read-only GET but currently sets readOnlyHint: false; update
the annotations to set readOnlyHint: true so the metadata accurately reflects a
non-mutating operation (keep destructiveHint and openWorldHint unchanged).

type: "action",
props: {
dixa,
endUserId: {
propDefinition: [
dixa,
"endUserId",
],
},
conversationId: {
propDefinition: [
dixa,
"conversationId",
({ endUserId }) => ({
endUserId,
}),
],
},
},
async run({ $ }) {
const response = await this.dixa.listNotes({
$,
conversationId: this.conversationId,
});
$.export("$summary", `Successfully retrieved ${response.data.length} note(s) from conversation ${this.conversationId}`);
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "dixa-set-custom-contact-attributes",
name: "Set Custom Contact Attributes",
description: "Updates custom attributes for a specified user. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Custom-Attributes/#tag/Custom-Attributes/operation/patchEndusersUseridCustom-attributes)",
version: "0.0.2",
version: "0.0.4",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "dixa-tag-conversation",
name: "Add Tag to Conversation",
description: "Adds a tag to a conversation. [See the documentation](https://docs.dixa.io/openapi/dixa-api/v1/tag/Tags/#tag/Tags/operation/putConversationsConversationidTagsTagid)",
version: "0.0.2",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Loading
Loading