finish mook

This commit is contained in:
锦恢 2025-06-29 22:30:52 +08:00
parent 1f7e5b8b7d
commit 47d5d6474a
2 changed files with 21 additions and 19 deletions

View File

@ -163,24 +163,26 @@ function getDefaultValue(property: any): string {
} }
} }
// watch watch(
// watch( () => props.modelValue,
// () => props.modelValue, (newVal) => {
// (newVal) => { //
// const currentParsed = tryParse(inputValue.value) const currentContent = editorView.value?.state.doc.toString() ?? '';
// if (!isDeepEqual(currentParsed, newVal)) { const newContent = JSON.stringify(newVal ?? {}, null, 2);
// const newContent = JSON.stringify(newVal, null, 2)
// editorView.value?.dispatch({ if (currentContent !== newContent && editorView.value) {
// changes: { editorView.value.dispatch({
// from: 0, changes: {
// to: editorView.value.state.doc.length, from: 0,
// insert: newContent to: editorView.value.state.doc.length,
// } insert: newContent
// }) }
// } });
// }, }
// { deep: true } },
// ) { deep: true }
);
// JSON // JSON
const tryParse = (value: string): any => { const tryParse = (value: string): any => {

View File

@ -52,7 +52,6 @@ import { getDefaultValue, normaliseJavascriptType } from '@/hook/mcp';
import KInputObject from '@/components/k-input-object/index.vue'; import KInputObject from '@/components/k-input-object/index.vue';
import { mcpClientAdapter } from '@/views/connect/core'; import { mcpClientAdapter } from '@/views/connect/core';
import { JSONSchemaFaker } from 'json-schema-faker'; import { JSONSchemaFaker } from 'json-schema-faker';
import { faker } from '@faker-js/faker';
defineComponent({ name: 'tool-executor' }); defineComponent({ name: 'tool-executor' });
@ -149,6 +148,7 @@ const generateMockData = async () => {
// mock // mock
Object.keys(mockData).forEach(key => { Object.keys(mockData).forEach(key => {
tabStorage.formData[key] = mockData[key]; tabStorage.formData[key] = mockData[key];
console.log(mockData[key]);
}); });
// //