intention-coding 0.4.5 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs
CHANGED
|
@@ -5011,6 +5011,7 @@ ${requirementSection}
|
|
|
5011
5011
|
logger_logger.info("\u5F00\u59CB\u56FE\u7247\u5185\u5BB9\u5206\u6790", {
|
|
5012
5012
|
imagePath: imagePath
|
|
5013
5013
|
});
|
|
5014
|
+
await this.validateParams(imagePath);
|
|
5014
5015
|
const basicInfo = await this.getImageBasicInfo(imagePath);
|
|
5015
5016
|
const analysisContent = await this.performAIAnalysis(imagePath, basicInfo);
|
|
5016
5017
|
const processingTime = Date.now() - startTime;
|
|
@@ -5558,8 +5559,8 @@ ${isLongImage ? `8. **\u{957F}\u{56FE}\u{7279}\u{5F81}**\u{FF1A}\u{5206}\u{6790}
|
|
|
5558
5559
|
const ImageAnalysisParamsSchema = objectType({
|
|
5559
5560
|
image_path: stringType().min(1).describe("\u56FE\u7247\u6587\u4EF6\u8DEF\u5F84")
|
|
5560
5561
|
});
|
|
5561
|
-
const
|
|
5562
|
-
name: "
|
|
5562
|
+
const read_imageTool = {
|
|
5563
|
+
name: "read_image",
|
|
5563
5564
|
description: "\u4E13\u4E1A\u56FE\u7247\u5185\u5BB9\u5206\u6790\u5DE5\u5177\uFF0C\u652F\u6301\u901A\u7528\u5206\u6790\u3001\u7269\u4F53\u8BC6\u522B\u3001\u6587\u5B57\u8BC6\u522B\u3001\u573A\u666F\u5206\u6790\u3001\u4EBA\u7269\u5206\u6790\u3001\u6280\u672F\u5206\u6790\u3001UI\u8BBE\u8BA1\u7A3F\u5206\u6790\u3001\u9700\u6C42\u8BC6\u522B\u7B49\u591A\u79CD\u6A21\u5F0F\uFF0C\u7279\u522B\u64C5\u957FUI\u8BBE\u8BA1\u7A3F\u7684\u7ED3\u6784\u5206\u6790\u548C\u9875\u9762\u9700\u6C42\u63D0\u53D6\u3002\u5206\u6790\u7ED3\u679C\u5C06\u4FDD\u5B58\u5230image-recognition\u76EE\u5F55\u3002",
|
|
5564
5565
|
inputSchema: {
|
|
5565
5566
|
image_path: stringType().min(1).describe("\u56FE\u7247\u6587\u4EF6\u8DEF\u5F84")
|
|
@@ -5653,7 +5654,6 @@ ${result.content.tags.map((tag)=>`\`${tag}\``).join(' ')}
|
|
|
5653
5654
|
}
|
|
5654
5655
|
}
|
|
5655
5656
|
};
|
|
5656
|
-
imageAnalysisTool.handler = imageAnalysisTool.handler;
|
|
5657
5657
|
async function generateOutputFile(result, imagePath) {
|
|
5658
5658
|
try {
|
|
5659
5659
|
const baseDir = config_getStorageDir();
|
|
@@ -10095,7 +10095,7 @@ ${new Date().toISOString()}
|
|
|
10095
10095
|
initProjectStandard,
|
|
10096
10096
|
requirementAnalyzerTool,
|
|
10097
10097
|
changeSummarizer,
|
|
10098
|
-
|
|
10098
|
+
read_imageTool,
|
|
10099
10099
|
imageConverterTool,
|
|
10100
10100
|
codeGeneratorTool,
|
|
10101
10101
|
imageRecognitionAgentTool,
|
|
@@ -11,6 +11,36 @@ export type ImageAnalysisToolParams = z.infer<typeof ImageAnalysisParamsSchema>;
|
|
|
11
11
|
* 图片内容理解智能体
|
|
12
12
|
* 提供多种类型的图片内容分析和理解,并输出到image-recognition目录
|
|
13
13
|
*/
|
|
14
|
+
export declare const read_imageTool: {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
inputSchema: {
|
|
18
|
+
image_path: z.ZodString;
|
|
19
|
+
};
|
|
20
|
+
handler: (args: {
|
|
21
|
+
image_path: string;
|
|
22
|
+
}) => Promise<{
|
|
23
|
+
content: {
|
|
24
|
+
type: string;
|
|
25
|
+
text: string;
|
|
26
|
+
}[];
|
|
27
|
+
metadata: {
|
|
28
|
+
actions: {
|
|
29
|
+
type: string;
|
|
30
|
+
path: string;
|
|
31
|
+
description: string;
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
isError?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
content: {
|
|
37
|
+
type: string;
|
|
38
|
+
text: string;
|
|
39
|
+
}[];
|
|
40
|
+
isError: boolean;
|
|
41
|
+
metadata?: undefined;
|
|
42
|
+
}>;
|
|
43
|
+
};
|
|
14
44
|
export declare const imageAnalysisTool: {
|
|
15
45
|
name: string;
|
|
16
46
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/image-analysis/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,QAAA,MAAM,yBAAyB;;;;;;EAG3B,CAAC;AAEL,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/image-analysis/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,QAAA,MAAM,yBAAyB;;;;;;EAG3B,CAAC;AAEL,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;oBAQH;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;;;;;;;;CA6F7C,CAAC;AAGF,eAAO,MAAM,iBAAiB;;;;;;oBAhGN;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;;;;;;;;CAgGC,CAAC;AA4lBhD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EACZ,WAAW,GACZ,MAAM,SAAS,CAAC"}
|