@copilotkit/runtime
Version:
<img src="https://github.com/user-attachments/assets/0a6b64d9-e193-4940-a3f6-60334ac34084" alt="banner" style="border-radius: 12px; border: 2px solid #d6d4fa;" />
54 lines (52 loc) • 4.05 kB
JavaScript
import "reflect-metadata";
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.112.0/helpers/decorateMetadata.mjs";
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.112.0/helpers/decorate.mjs";
import { BaseMessageOutput } from "./copilot-response.type.mjs";
import { Field, InterfaceType, ObjectType, registerEnumType } from "type-graphql";
//#region src/graphql/types/meta-events.type.ts
var _ref, _ref2, _ref3, _ref4;
let MetaEventName = /* @__PURE__ */ function(MetaEventName) {
MetaEventName["LangGraphInterruptEvent"] = "LangGraphInterruptEvent";
MetaEventName["CopilotKitLangGraphInterruptEvent"] = "CopilotKitLangGraphInterruptEvent";
return MetaEventName;
}({});
registerEnumType(MetaEventName, {
name: "MetaEventName",
description: "Meta event types"
});
let BaseMetaEvent = class BaseMetaEvent {
constructor() {
this.type = "MetaEvent";
}
};
__decorate([Field(() => String), __decorateMetadata("design:type", String)], BaseMetaEvent.prototype, "type", void 0);
__decorate([Field(() => MetaEventName), __decorateMetadata("design:type", typeof (_ref = typeof MetaEventName !== "undefined" && MetaEventName) === "function" ? _ref : Object)], BaseMetaEvent.prototype, "name", void 0);
BaseMetaEvent = __decorate([InterfaceType({ resolveType(value) {
if (value.name === MetaEventName.LangGraphInterruptEvent) return LangGraphInterruptEvent;
else if (value.name === MetaEventName.CopilotKitLangGraphInterruptEvent) return CopilotKitLangGraphInterruptEvent;
} }), InterfaceType()], BaseMetaEvent);
let CopilotKitLangGraphInterruptEventData = class CopilotKitLangGraphInterruptEventData {};
__decorate([Field(() => String), __decorateMetadata("design:type", String)], CopilotKitLangGraphInterruptEventData.prototype, "value", void 0);
__decorate([Field(() => [BaseMessageOutput]), __decorateMetadata("design:type", Array)], CopilotKitLangGraphInterruptEventData.prototype, "messages", void 0);
CopilotKitLangGraphInterruptEventData = __decorate([ObjectType()], CopilotKitLangGraphInterruptEventData);
let LangGraphInterruptEvent = class LangGraphInterruptEvent {
constructor() {
this.name = MetaEventName.LangGraphInterruptEvent;
}
};
__decorate([Field(() => MetaEventName), __decorateMetadata("design:type", typeof (_ref2 = typeof MetaEventName !== "undefined" && MetaEventName.LangGraphInterruptEvent) === "function" ? _ref2 : Object)], LangGraphInterruptEvent.prototype, "name", void 0);
__decorate([Field(() => String), __decorateMetadata("design:type", String)], LangGraphInterruptEvent.prototype, "value", void 0);
__decorate([Field(() => String, { nullable: true }), __decorateMetadata("design:type", String)], LangGraphInterruptEvent.prototype, "response", void 0);
LangGraphInterruptEvent = __decorate([ObjectType({ implements: BaseMetaEvent })], LangGraphInterruptEvent);
let CopilotKitLangGraphInterruptEvent = class CopilotKitLangGraphInterruptEvent {
constructor() {
this.name = MetaEventName.CopilotKitLangGraphInterruptEvent;
}
};
__decorate([Field(() => MetaEventName), __decorateMetadata("design:type", typeof (_ref3 = typeof MetaEventName !== "undefined" && MetaEventName.CopilotKitLangGraphInterruptEvent) === "function" ? _ref3 : Object)], CopilotKitLangGraphInterruptEvent.prototype, "name", void 0);
__decorate([Field(() => CopilotKitLangGraphInterruptEventData), __decorateMetadata("design:type", typeof (_ref4 = typeof CopilotKitLangGraphInterruptEventData !== "undefined" && CopilotKitLangGraphInterruptEventData) === "function" ? _ref4 : Object)], CopilotKitLangGraphInterruptEvent.prototype, "data", void 0);
__decorate([Field(() => String, { nullable: true }), __decorateMetadata("design:type", String)], CopilotKitLangGraphInterruptEvent.prototype, "response", void 0);
CopilotKitLangGraphInterruptEvent = __decorate([ObjectType({ implements: BaseMetaEvent })], CopilotKitLangGraphInterruptEvent);
//#endregion
export { BaseMetaEvent, CopilotKitLangGraphInterruptEvent, LangGraphInterruptEvent, MetaEventName };
//# sourceMappingURL=meta-events.type.mjs.map