Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@markprompt/core

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@markprompt/core - npm Package Compare versions

Comparing version 0.14.0 to 0.15.0

8

dist/feedback.d.ts

@@ -0,1 +1,2 @@

import type { ChatMessage } from './chat.js';
import type { PromptFeedback } from './types.js';

@@ -15,2 +16,7 @@ export interface SubmitFeedbackBody {

/**
* Callback when feedback is submitted.
* @default undefined
**/
onFeedbackSubmitted?: (feedback: PromptFeedback, messages?: ChatMessage[]) => void;
/**
* AbortController signal

@@ -24,3 +30,3 @@ * @default undefined

};
export declare function submitFeedback(feedback: SubmitFeedbackBody, projectKey: string, options?: SubmitFeedbackOptions): Promise<void>;
export declare function submitFeedback(feedback: SubmitFeedbackBody, projectKey: string, messages?: ChatMessage[], options?: SubmitFeedbackOptions): Promise<void>;
//# sourceMappingURL=feedback.d.ts.map

3

dist/feedback.js

@@ -5,3 +5,3 @@ import defaults from 'defaults';

};
export async function submitFeedback(feedback, projectKey, options) {
export async function submitFeedback(feedback, projectKey, messages, options) {
if (!projectKey) {

@@ -14,2 +14,3 @@ throw new Error('A projectKey is required.');

});
options?.onFeedbackSubmitted?.(feedback.feedback, messages || []);
try {

@@ -16,0 +17,0 @@ const response = await fetch(resolvedOptions.apiUrl + `?${params}`, {

{
"name": "@markprompt/core",
"version": "0.14.0",
"version": "0.15.0",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

@@ -172,2 +172,4 @@ # `@markprompt/core`

- `options.apiUrl` (`string`): URL at which to post feedback
- `options.onFeedbackSubmitted` (`function`): Callback function when feedback
is submitted
- `options.signal` (`AbortSignal`): AbortController signal

@@ -174,0 +176,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc