@@ -2414,6 +2414,9 @@ async function editTool(toolId) {
24142414 if (window.editToolSchemaEditor) {
24152415 window.editToolSchemaEditor.setOption("readOnly", true);
24162416 }
2417+ if (window.editToolOutputSchemaEditor) {
2418+ window.editToolOutputSchemaEditor.setOption("readOnly", true);
2419+ }
24172420 } else {
24182421 typeField.disabled = false;
24192422 if (authTypeField) {
@@ -2437,6 +2440,9 @@ async function editTool(toolId) {
24372440 if (window.editToolSchemaEditor) {
24382441 window.editToolSchemaEditor.setOption("readOnly", false);
24392442 }
2443+ if (window.editToolOutputSchemaEditor) {
2444+ window.editToolOutputSchemaEditor.setOption("readOnly", false);
2445+ }
24402446 }
24412447 // Update request types and URL field
24422448 updateEditToolRequestTypes(tool.requestType || null);
@@ -2547,6 +2553,9 @@ async function editTool(toolId) {
25472553 if (window.editToolSchemaEditor) {
25482554 window.editToolSchemaEditor.refresh();
25492555 }
2556+ if (window.editToolOutputSchemaEditor) {
2557+ window.editToolOutputSchemaEditor.refresh();
2558+ }
25502559 }, 100);
25512560
25522561 console.log("✓ Tool edit modal loaded successfully");
@@ -9229,6 +9238,9 @@ async function handleToolFormSubmit(event) {
92299238 if (window.schemaEditor) {
92309239 window.schemaEditor.save();
92319240 }
9241+ if (window.outputSchemaEditor) {
9242+ window.outputSchemaEditor.save();
9243+ }
92329244
92339245 const isInactiveCheckedBool = isInactiveChecked("tools");
92349246 formData.append("is_inactive_checked", isInactiveCheckedBool);
@@ -9296,6 +9308,9 @@ async function handleEditToolFormSubmit(event) {
92969308 if (window.editToolSchemaEditor) {
92979309 window.editToolSchemaEditor.save();
92989310 }
9311+ if (window.editToolOutputSchemaEditor) {
9312+ window.editToolOutputSchemaEditor.save();
9313+ }
92999314
93009315 const isInactiveCheckedBool = isInactiveChecked("tools");
93019316 formData.append("is_inactive_checked", isInactiveCheckedBool);
@@ -10003,6 +10018,16 @@ function initializeCodeMirrorEditors() {
1000310018 mode: "application/json",
1000410019 varName: "editToolSchemaEditor",
1000510020 },
10021+ {
10022+ id: "output-schema-editor",
10023+ mode: "application/json",
10024+ varName: "outputSchemaEditor",
10025+ },
10026+ {
10027+ id: "edit-tool-output-schema",
10028+ mode: "application/json",
10029+ varName: "editToolOutputSchemaEditor",
10030+ },
1000610031 {
1000710032 id: "edit-resource-content",
1000810033 mode: "text/plain",
0 commit comments