Merge branch 'feat/CW-5648' into feat/CW-6153

This commit is contained in:
Shivam Mishra
2025-12-16 17:16:48 +05:30
committed by GitHub
7 changed files with 11 additions and 23 deletions
@@ -157,18 +157,14 @@ export function useAI() {
};
/**
* Processes an AI event, such as rephrasing content.
* @param {string} [type='rephrase'] - The type of AI event to process.
* Processes an AI event, such as improving content.
* @param {string} [type='improve'] - The type of AI event to process.
* @param {string} [content=''] - The content to process (for full message) or selected text (for selection-based).
* @param {Object} [options={}] - Additional options.
* @param {AbortSignal} [options.signal] - AbortSignal to cancel the request.
* @returns {Promise<string>} The generated message or an empty string if an error occurs.
*/
const processEvent = async (
type = 'rephrase',
content = '',
options = {}
) => {
const processEvent = async (type = 'improve', content = '', options = {}) => {
try {
const result = await EditorAPI.processEvent(
{
@@ -55,7 +55,7 @@ export function useCopilotReply() {
}
/**
* Executes a copilot action (e.g., rephrase, fix grammar).
* Executes a copilot action (e.g., improve, fix grammar).
* @param {string} action - The action type
* @param {string} data - The content to process
*/