Skip to main content

EditResult Interface

A result from an edit attempt via the edit(js) function.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/tree-agent/alpha.

For more information about our API support guarantees, see here.

Signature

export interface EditResult

Properties

PropertyAlertsTypeDescription
messageAlphastringA human-readable message describing the result of the edit attempt.
typeAlpha"success" | "disabledError" | "editingError" | "tooManyEditsError" | "expiredError"The type of the edit result.

Property Details

message

A human-readable message describing the result of the edit attempt.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

message: string;

Type: string

Remarks

In the case of an error, this message is appropriate to include in a model's chat history.

type

The type of the edit result.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

type: "success" | "disabledError" | "editingError" | "tooManyEditsError" | "expiredError";

Type: "success" | "disabledError" | "editingError" | "tooManyEditsError" | "expiredError"

Remarks

  • success: The edit was successfully applied. - disabledError: The model is not allowed to edit the tree (i.e. editToolName was not provided). - editingError: An error was thrown while parsing or executing the provided JavaScript. - tooManyEditsError: The edit(js) function has been called more than the number of times specified by maximumSequentialEdits for the same message. - expiredError: The edit(js) function was called after the issuing query has already completed.