feat: New Scenarios page (#11975)

This commit is contained in:
Sivin Varghese
2025-07-30 19:34:27 +05:30
committed by GitHub
parent 1230d1f251
commit df4de508e7
27 changed files with 1161 additions and 15 deletions

View File

@@ -6,6 +6,7 @@ export const CONVERSATION_EVENTS = Object.freeze({
TRANSLATE_A_MESSAGE: 'Translated a message',
INSERTED_A_VARIABLE: 'Inserted a variable',
INSERTED_AN_EMOJI: 'Inserted an emoji',
INSERTED_A_TOOL: 'Inserted a tool',
USED_MENTIONS: 'Used mentions',
SEARCH_CONVERSATION: 'Searched conversations',
APPLY_FILTER: 'Applied filters in the conversation list',

View File

@@ -319,6 +319,12 @@ const createNode = (editorView, nodeType, content) => {
return state.schema.text(`{{${content}}}`);
case 'emoji':
return state.schema.text(content);
case 'tool': {
return state.schema.nodes.tools.create({
id: content.id,
name: content.title,
});
}
default:
return null;
}
@@ -355,6 +361,11 @@ const nodeCreators = {
from,
to,
}),
tool: (editorView, content, from, to) => ({
node: createNode(editorView, 'tool', content),
from,
to,
}),
};
/**