Files
Agent-n8n/doc/订单班文档资料/智能开发/附件项目/assets/javascript/tool.js
Yep_Q 9ab8cf48ab feat: 完成12个订单班AI Agent架构设计
完成内容:
- 创建AI Agent架构设计文档,定义100+专业Agent
- 创建orderClasses.json统一配置文件
- 每个订单班配置7-9个专业Agent
- 定义4种Agent协作模式:串行、并行、主从、迭代
- 文档和资源重新组织整理

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 15:57:17 +08:00

36 lines
967 B
JavaScript
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function handleCode (code, isWeb) {
if (isWeb) {
return code;
}
// 要插入的滚动条样式
const scrollbarStyle = `
<style>
::-webkit-scrollbar {
width: 0px;
}
</style>
`;
// 将样式插入到 <head> 标签内(如果存在 <head>
let modifiedHtml = code;
if (/\s*<\/head\s*>/i.test(modifiedHtml)) {
modifiedHtml = modifiedHtml.replace(/(\s*<\/head\s*>)/i, `${scrollbarStyle}$1`);
} else {
// 如果没有 <head>,直接插入到 <html> 之后
modifiedHtml = modifiedHtml.replace('<html>', `<html>${scrollbarStyle}`);
}
return modifiedHtml
}
const useEventListener = (element, eventType, callback, useCapture = false) => {
if (!element || !callback) return null;
const handler = (event) => callback(event);
element.addEventListener(eventType, handler, useCapture);
return () => {
element.removeEventListener(eventType, handler, useCapture);
};
};