Files
jiaowu-test/verify_agent_setup.cjs
KQL 1b964b3886 chore: 更新数据文件和组件优化
主要更新内容:
- 优化UI组件(视频播放器、HR访问模态框、岗位信息展示等)
- 更新数据文件(简历、岗位、项目案例等)
- 添加新的图片资源(面试状态图标等)
- 新增AgentPage等页面组件
- 清理旧的备份文件,提升代码库整洁度
- 优化岗位等级和面试状态的数据结构

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-15 15:55:25 +08:00

90 lines
3.6 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.

// 验证Agent板块设置
const fs = require('fs');
const path = require('path');
console.log('🔍 验证Agent板块设置\n');
console.log('='.repeat(80));
// 1. 检查AgentPage组件
console.log('\n1. 检查 AgentPage 组件');
const agentPagePath = path.join(__dirname, 'src/pages/AgentPage/index.jsx');
const agentCssPath = path.join(__dirname, 'src/pages/AgentPage/index.css');
const hasAgentPage = fs.existsSync(agentPagePath);
console.log(` ${hasAgentPage ? '✅' : '❌'} AgentPage组件文件存在`);
const hasAgentCss = fs.existsSync(agentCssPath);
console.log(` ${hasAgentCss ? '✅' : '❌'} AgentPage样式文件存在`);
if (hasAgentPage) {
const agentPageContent = fs.readFileSync(agentPagePath, 'utf-8');
const hasIframe = agentPageContent.includes('<iframe');
console.log(` ${hasIframe ? '✅' : '❌'} 包含iframe元素`);
const hasBaiduUrl = agentPageContent.includes('baidu.com');
console.log(` ${hasBaiduUrl ? '✅' : '❌'} 使用百度测试链接`);
}
// 2. 检查路由配置
console.log('\n2. 检查路由配置');
const routesPath = path.join(__dirname, 'src/routes/index.jsx');
const routesContent = fs.readFileSync(routesPath, 'utf-8');
const hasAgentImport = routesContent.includes('import("@/pages/AgentPage")');
console.log(` ${hasAgentImport ? '✅' : '❌'} 导入AgentPage组件`);
const hasAgentRoute = routesContent.includes('path: "/agent"');
console.log(` ${hasAgentRoute ? '✅' : '❌'} 定义/agent路由`);
const hasAgentName = routesContent.includes('name: "Agent"');
console.log(` ${hasAgentName ? '✅' : '❌'} 设置菜单名称为Agent`);
const hasDefaultIcon = routesContent.includes('default: "recuUY5tMX7M6A"');
console.log(` ${hasDefaultIcon ? '✅' : '❌'} 设置未点击图标`);
const hasActiveIcon = routesContent.includes('active: "recuUY5qlmzVhH"');
console.log(` ${hasActiveIcon ? '✅' : '❌'} 设置点击图标`);
const hasShowMenuItem = routesContent.match(/path: "\/agent"[\s\S]*?showMenuItem: true/);
console.log(` ${hasShowMenuItem ? '✅' : '❌'} 设置为显示菜单项`);
// 3. 检查Agent路由在资源板块中
console.log('\n3. 检查Agent在资源板块中的位置');
const resourceSection = routesContent.match(/name: "资源"[\s\S]*?(?=\{[\s\S]*?showMenu:)/);
if (resourceSection) {
const hasAgentInResource = resourceSection[0].includes('path: "/agent"');
console.log(` ${hasAgentInResource ? '✅' : '❌'} Agent路由在资源板块中`);
// 检查顺序
const portfolioIndex = resourceSection[0].indexOf('path: "/portfolio"');
const agentIndex = resourceSection[0].indexOf('path: "/agent"');
const isLastItem = portfolioIndex < agentIndex;
console.log(` ${isLastItem ? '✅' : '❌'} Agent在作品集之后最下方`);
}
console.log('\n' + '='.repeat(80));
const allChecksPassed =
hasAgentPage &&
hasAgentCss &&
hasAgentImport &&
hasAgentRoute &&
hasAgentName &&
hasDefaultIcon &&
hasActiveIcon &&
hasShowMenuItem;
if (allChecksPassed) {
console.log('\n✅ 所有检查通过Agent板块已成功添加到侧边栏。\n');
console.log('📝 功能说明:');
console.log(' - ✅ 在侧边栏"资源"板块最下方添加了Agent菜单项');
console.log(' - ✅ 未点击图标: recuUY5tMX7M6A');
console.log(' - ✅ 点击图标: recuUY5qlmzVhH (白色)');
console.log(' - ✅ 页面内容: iframe嵌入百度测试页面');
console.log(' - ✅ 路由路径: /agent');
console.log('\n💡 下一步: 刷新页面后在侧边栏资源板块最下方可以看到Agent菜单项');
} else {
console.log('\n⚠ 部分检查未通过,请检查上述标记为❌的项目。\n');
}