{"version":3,"sources":["../src/types/autosuggestions-config/editing-api-config.tsx"],"sourcesContent":["import { Message, Role, TextMessage } from \"@vn-sdk/runtime-client-gql\";\nimport { MakeSystemPrompt } from \"./subtypes/make-system-prompt\";\n\nexport interface EditingApiConfig {\n  makeSystemPrompt: MakeSystemPrompt;\n  fewShotMessages: Message[];\n  forwardedParams: { [key: string]: any } | undefined;\n}\n\nexport const defaultEditingMakeSystemPrompt: MakeSystemPrompt = (\n  textareaPurpose,\n  contextString,\n) => {\n  return `You are a versatile writing assistant helping the user edit a portion of their text.\n  \nThe user is writing some text.\nThe purpose is: \\\"${textareaPurpose}\\\"\n\nThe following external context is also provided. Use it when relevant.\n\\`\\`\\`\n${contextString}\n\\`\\`\\`\n\nThe user has provided you with a PROMPT for EDITING a PORTION of the text. \nYour job is to come up with a new EDITED version OF THE SEGMENT IN QUESTION - AS BEST YOU CAN.\nOnly rewrite the portion of the text that the user has marked as \"TextToEdit\"!!!\n\nAdjust yourself to the user's style and implied intent.\n\nThe conversation will be structured as follows:\n<TextBeforeCursor>\n<TextToEdit>\n<TextAfterCursor>\n<EditingPrompt>\n\n<YourEditSuggestion>\n`;\n};\n\nexport const defaultEditingFewShotMessages: Message[] = [\n  new TextMessage({\n    role: Role.User,\n    content:\n      \"<TextBeforeCursor>This morning I woke up and went straight to the grocery store. </TextBeforeCursor>\",\n  }),\n  new TextMessage({\n    role: Role.User,\n    content:\n      \"<TextToEdit>While I was there I picked up some apples, oranges, and bananas. </TextToEdit>\",\n  }),\n  new TextMessage({\n    role: Role.User,\n    content:\n      \"<TextAfterCursor>The grocery store was having a sale on fruit, so I decided to stock up.</TextAfterCursor>\",\n  }),\n  new TextMessage({\n    role: Role.User,\n    content: \"<EditingPrompt>I also bought a big watermelon</EditingPrompt>\",\n  }),\n  new TextMessage({\n    role: Role.Assistant,\n    content:\n      \"While I was there I picked up some apples, oranges, and bananas, and a big watermelon.\",\n  }),\n\n  new TextMessage({\n    role: Role.User,\n    content:\n      \"<TextBeforeCursor>Yesterday, I spent the afternoon working on my new project.</TextBeforeCursor>\",\n  }),\n  new TextMessage({\n    role: Role.User,\n    content: \"<TextToEdit>It's quite challenging and requires a lot of focus.</TextToEdit>\",\n  }),\n  new TextMessage({\n    role: Role.User,\n    content:\n      \"<TextAfterCursor>I'm really excited about the potential outcomes of this project.</TextAfterCursor>\",\n  }),\n  new TextMessage({\n    role: Role.User,\n    content:\n      \"<EditingPrompt>emphasize the complexity and my enthusiasm for the project</EditingPrompt>\",\n  }),\n  new TextMessage({\n    role: Role.Assistant,\n    content:\n      \"It's a highly complex task that demands intense concentration, but I'm incredibly enthusiastic about the promising prospects of this project.\",\n  }),\n];\n\nexport const defaultEditingApiConfig: EditingApiConfig = {\n  makeSystemPrompt: defaultEditingMakeSystemPrompt,\n  fewShotMessages: defaultEditingFewShotMessages,\n  forwardedParams: undefined,\n};\n"],"mappings":";AAAA,SAAkB,MAAM,mBAAmB;AASpC,IAAM,iCAAmD,CAC9D,iBACA,kBACG;AACH,SAAO;AAAA;AAAA;AAAA,mBAGW;AAAA;AAAA;AAAA;AAAA,EAIlB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBF;AAEO,IAAM,gCAA2C;AAAA,EACtD,IAAI,YAAY;AAAA,IACd,MAAM,KAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,YAAY;AAAA,IACd,MAAM,KAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,YAAY;AAAA,IACd,MAAM,KAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,YAAY;AAAA,IACd,MAAM,KAAK;AAAA,IACX,SAAS;AAAA,EACX,CAAC;AAAA,EACD,IAAI,YAAY;AAAA,IACd,MAAM,KAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EAED,IAAI,YAAY;AAAA,IACd,MAAM,KAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,YAAY;AAAA,IACd,MAAM,KAAK;AAAA,IACX,SAAS;AAAA,EACX,CAAC;AAAA,EACD,IAAI,YAAY;AAAA,IACd,MAAM,KAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,YAAY;AAAA,IACd,MAAM,KAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,YAAY;AAAA,IACd,MAAM,KAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AACH;AAEO,IAAM,0BAA4C;AAAA,EACvD,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,iBAAiB;AACnB;","names":[]}