feat: 初始提交(仅核心代码,已排除大文件)

This commit is contained in:
yangxiangyuan
2026-07-08 10:29:50 +08:00
commit be7c5842f1
623 changed files with 332897 additions and 0 deletions
+495
View File
@@ -0,0 +1,495 @@
:root {
--vscode-bg: #1e1e1e;
--vscode-sidebar-bg: #252526;
--vscode-toolbar-bg: #2d2d30;
--vscode-border: #3e3e42;
--vscode-hover: #2a2d2e;
--vscode-active: #007acc;
--vscode-text: #cccccc;
--vscode-text-muted: #858585;
--vscode-accent: #4ec9b0;
--vscode-warning: #ffcc00;
--vscode-error: #f44747;
--vscode-success: #4ec9b0;
--vscode-radius: 4px;
--vscode-shadow: 0 2px 8px rgba(0,0,0,0.3);
--vscode-input-bg: #3c3c3c;
--vscode-button-bg: #0e639c;
--vscode-button-hover: #1177bb;
--vscode-card-bg: #2d2d30;
}
body.theme-cloud {
background: var(--vscode-bg);
color: var(--vscode-text);
font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
line-height: 1.6;
}
.layout {
display: flex;
gap: 16px;
padding: 16px;
min-height: calc(100vh - 60px);
}
.sidebar {
width: 320px;
background: var(--vscode-sidebar-bg);
border: 1px solid var(--vscode-border);
border-radius: var(--vscode-radius);
padding: 16px;
box-shadow: var(--vscode-shadow);
}
.sidebar-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
padding-bottom: 12px;
border-bottom: 1px solid var(--vscode-border);
}
.sidebar-header h3 {
color: var(--vscode-text);
font-size: 16px;
font-weight: 600;
margin: 0;
}
.main {
flex: 1;
min-width: 0;
}
.toolbar {
display: flex;
justify-content: space-between;
align-items: center;
background: var(--vscode-toolbar-bg);
border: 1px solid var(--vscode-border);
border-radius: var(--vscode-radius);
padding: 12px 16px;
margin-bottom: 16px;
box-shadow: var(--vscode-shadow);
}
.toolbar span {
font-size: 15px;
font-weight: 500;
color: var(--vscode-text);
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 16px;
}
.list {
display: grid;
gap: 12px;
}
.card {
background: var(--vscode-card-bg);
border: 1px solid var(--vscode-border);
border-radius: var(--vscode-radius);
padding: 20px;
box-shadow: var(--vscode-shadow);
}
/* Tree View Styles */
.tree-item {
margin-bottom: 8px;
}
.tree-item-header {
display: flex;
align-items: center;
padding: 8px;
border-radius: var(--vscode-radius);
cursor: pointer;
transition: background 0.2s;
background: rgba(255,255,255,0.03);
border: 1px solid transparent;
}
.tree-item-header:hover {
background: var(--vscode-hover);
}
.tree-item-header.expanded {
background: rgba(255,255,255,0.05);
border-color: rgba(255,255,255,0.1);
}
.tree-toggle {
display: inline-block;
width: 20px;
text-align: center;
font-size: 10px;
color: var(--vscode-text-muted);
transition: transform 0.2s;
margin-right: 4px;
}
.tree-toggle.expanded {
transform: rotate(90deg);
}
.system-icon, .module-icon {
margin-right: 8px;
font-size: 16px;
}
.item-actions {
display: flex;
gap: 4px;
opacity: 0;
transition: opacity 0.2s;
}
.tree-item-header:hover .item-actions,
.tree-child-item:hover .item-actions {
opacity: 1;
}
.tree-item-content {
margin-left: 22px;
border-left: 1px solid rgba(255,255,255,0.05);
display: none;
padding-left: 4px;
}
.tree-item-content.expanded {
display: block;
}
.tree-module-wrapper {
margin-top: 4px;
}
.tree-child-item {
display: flex;
align-items: center;
padding: 6px 8px;
border-radius: var(--vscode-radius);
cursor: pointer;
font-size: 14px;
color: #ddd;
}
.tree-child-item:hover {
background: var(--vscode-hover);
color: #fff;
}
/* Form Styles */
.form {
display: flex;
flex-direction: column;
gap: 12px;
}
.form input, .form textarea, .form select {
background: var(--vscode-input-bg);
border: 1px solid var(--vscode-border);
color: var(--vscode-text);
padding: 8px 12px;
border-radius: var(--vscode-radius);
font-family: inherit;
font-size: 14px;
}
.form input:focus, .form textarea:focus, .form select:focus {
outline: none;
border-color: var(--vscode-active);
}
.btn {
background: var(--vscode-button-bg);
color: #fff;
border: none;
padding: 8px 16px;
border-radius: var(--vscode-radius);
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: background 0.2s;
}
.btn:hover {
background: var(--vscode-button-hover);
}
.btn-icon {
background: none;
border: none;
cursor: pointer;
padding: 4px;
border-radius: 4px;
color: var(--vscode-text-muted);
font-size: 14px;
}
.btn-icon:hover {
background: rgba(255,255,255,0.1);
color: var(--vscode-text);
}
.btn-icon.sm {
font-size: 12px;
padding: 2px 4px;
}
.btn-delete:hover { color: var(--vscode-error); }
.btn-edit:hover { color: var(--vscode-accent); }
/* Note List Styles */
.note-item {
background: rgba(0,0,0,0.2);
border-left: 3px solid var(--vscode-accent);
padding: 8px 12px;
margin-bottom: 8px;
border-radius: 0 var(--vscode-radius) var(--vscode-radius) 0;
font-size: 13px;
cursor: pointer;
}
.note-item:hover {
background: rgba(255,255,255,0.05);
}
.note-meta {
display: flex;
justify-content: space-between;
color: var(--vscode-text-muted);
font-size: 12px;
margin-bottom: 4px;
}
.note-preview {
color: #ccc;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Attachment Styles */
.attachment-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px;
background: rgba(0,0,0,0.2);
border-radius: 4px;
margin-bottom: 8px;
}
.attachment-name {
color: var(--vscode-accent);
text-decoration: none;
}
.attachment-name:hover {
text-decoration: underline;
}
/* Filter Group Styles */
.filter-group {
display: flex;
gap: 16px;
align-items: center;
}
.filter-group label {
cursor: pointer;
display: flex;
align-items: center;
gap: 6px;
font-size: 14px;
color: var(--vscode-text);
}
#filter-major-dynamic {
display: flex;
align-items: center;
gap: 16px 12px;
flex-wrap: wrap;
}
#filter-major-dynamic label {
display: inline-flex;
align-items: center;
gap: 6px;
}
.form-row.radio-group {
display: flex;
gap: 20px;
align-items: center;
margin-bottom: 16px;
padding: 8px 12px;
background: var(--vscode-input-bg);
border-radius: var(--vscode-radius);
border: 1px solid var(--vscode-border);
}
.form-row.radio-group .label {
font-weight: 600;
color: var(--vscode-text-muted);
}
.form-row.radio-group label {
cursor: pointer;
display: flex;
align-items: center;
gap: 6px;
color: var(--vscode-text);
}
#sys-major-dynamic {
display: flex;
align-items: center;
gap: 16px 12px;
flex-wrap: wrap;
}
#sys-major-dynamic label {
display: inline-flex;
align-items: center;
gap: 6px;
}
input[type="radio"] {
accent-color: var(--vscode-active);
width: 16px;
height: 16px;
}
/* Modal Styles */
.modal-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 1000;
justify-content: center;
align-items: center;
}
.modal-overlay.open {
display: flex;
}
.modal {
background: var(--vscode-card-bg);
border: 1px solid var(--vscode-border);
border-radius: var(--vscode-radius);
width: 400px;
max-width: 90%;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
display: flex;
flex-direction: column;
}
#category-manager-modal .modal {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
max-width: 500px;
}
.modal-header {
padding: 12px 16px;
border-bottom: 1px solid var(--vscode-border);
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-header h3 {
margin: 0;
font-size: 16px;
font-weight: 600;
color: var(--vscode-text);
}
.modal-close {
background: none;
border: none;
color: var(--vscode-text-muted);
font-size: 20px;
cursor: pointer;
padding: 0;
line-height: 1;
}
.modal-close:hover {
color: var(--vscode-text);
}
.modal-body {
padding: 16px;
color: var(--vscode-text);
}
.modal-footer {
padding: 12px 16px;
border-top: 1px solid var(--vscode-border);
display: flex;
justify-content: flex-end;
gap: 8px;
}
.btn-secondary {
background: transparent;
border: 1px solid var(--vscode-border);
color: var(--vscode-text);
}
.btn-secondary:hover {
background: rgba(255,255,255,0.05);
}
/* Login Form Styles */
#auth {
max-width: 400px;
margin: 100px auto;
text-align: center;
}
/* Loading Overlay Styles */
.loading-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 2000;
justify-content: center;
align-items: center;
flex-direction: column;
color: #fff;
}
.loading-spinner {
border: 4px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top: 4px solid #fff;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
margin-bottom: 16px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
File diff suppressed because it is too large Load Diff
+135
View File
@@ -0,0 +1,135 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>AI开发库</title>
<link rel="icon" href="/icons/ai-lib.svg" type="image/svg+xml" />
<link rel="stylesheet" href="/common/common.css" />
<link rel="stylesheet" href="/tools/cloud/theme/tokens.css" />
<link rel="stylesheet" href="/tools/cloud/theme/components.css" />
<link rel="stylesheet" href="/tools/ai-lib/ai-lib.css" />
</head>
<body class="theme-cloud">
<main class="container">
<section id="auth" class="card">
<h2>🔐 登录AI开发库</h2>
<div class="form">
<input id="login-user" placeholder="👤 用户名" autocomplete="off" readonly />
<input id="login-pass" placeholder="🔒 密码" type="password" autocomplete="off" readonly />
<button id="btn-login" class="btn">🚀 登录</button>
</div>
<div id="auth-status" class="status" style="display:none"></div>
</section>
<section id="app" style="display:none">
<div class="layout">
<aside class="sidebar">
<div class="sidebar-header">
<h3>📦 系统列表</h3>
<button id="btn-refresh-tree" class="btn-icon" data-tip="刷新系统树形">🔄</button>
<button id="btn-manage-categories" class="btn-icon" data-tip="大类管理">🔧</button>
<button id="btn-new-system" class="btn">➕ 新增系统</button>
</div>
<div id="systems" class="list"></div>
</aside>
<div class="main">
<div class="toolbar">
<span id="current-path">请选择系统 → 子模块 → 开发纪要</span>
<div id="filter-major-category" class="filter-group">
<label><input type="radio" name="filter-major" value="" checked> 全部</label>
<span id="filter-major-dynamic"></span>
</div>
</div>
<div id="system-detail" class="card" style="display:none">
<h3>📦 系统详情</h3>
<div class="form">
<div class="form-row radio-group">
<span class="label">大类:</span>
<span id="sys-major-dynamic"></span>
</div>
<input id="sys-name" placeholder="🏷️ 系统名称" data-tip="系统名称,建议简洁唯一" />
<textarea id="sys-intro" rows="3" placeholder="📝 系统简介" data-tip="系统简介:用途、边界与关键技术"></textarea>
<button id="btn-save-system" class="btn">💾 保存系统</button>
</div>
</div>
<div id="module-detail" class="card" style="display:none">
<h3>🔧 子模块详情</h3>
<div class="form">
<input id="mod-name" placeholder="🏷️ 子模块名称" data-tip="子模块名称" />
<input id="mod-desc" placeholder="📝 子模块说明" data-tip="子模块说明:功能与职责" />
<input id="mod-addr" placeholder="🌐 服务器地址" data-tip="服务器地址或域名" />
<input id="mod-port" placeholder="🔌 服务器端口" data-tip="端口号" />
<input id="mod-code" placeholder="💻 代码类型" data-tip="代码类型或技术栈" />
<input id="mod-deploy" placeholder="🚀 部署方式" data-tip="部署方式,如 Docker/K8s/物理机" />
</div>
<div class="form">
<textarea id="mod-soft" rows="8" placeholder="📦 涉及部署软件和版本(多行)" data-tip="涉及部署软件及版本(每行一条)"></textarea>
<button id="btn-save-module" class="btn">💾 保存子模块</button>
</div>
</div>
<div id="note-detail" class="card" style="display:none">
<h3>📝 开发纪要详情</h3>
<div class="form">
<select id="note-type" data-tip="纪要类型(需求/开发/部署/维护)">
<option value="需求">📋 需求</option>
<option value="开发">💻 开发</option>
<option value="部署">🚀 部署</option>
<option value="维护">🔧 维护</option>
</select>
<textarea id="note-content" rows="12" placeholder="📝 纪要内容(多行)" data-tip="纪要内容,支持多行文本"></textarea>
<button id="btn-save-note" class="btn">💾 保存纪要</button>
</div>
<div class="attachment-section" style="margin-top: 24px;">
<h4>📎 附件管理</h4>
<div class="form">
<input type="file" id="attachment-file" multiple data-tip="选择要上传的附件,支持多选" />
<button id="btn-upload-attachment" class="btn">📤 上传选中文件</button>
</div>
<div id="upload-progress" style="margin-top: 16px;"></div>
<div class="attachment-list" style="margin-top: 20px;">
<h5>📋 附件列表</h5>
<div id="attachments" class="list"></div>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<div class="modal-overlay" id="modal-overlay">
<div class="modal" id="modal">
<div class="modal-header">
<h3 id="modal-title"></h3>
<button class="modal-close" id="modal-close">×</button>
</div>
<div class="modal-body" id="modal-body"></div>
<div class="modal-footer" id="modal-footer">
<button class="btn btn-secondary" id="modal-cancel">取消</button>
<button class="btn" id="modal-confirm">确认</button>
</div>
</div>
</div>
<div id="loading-overlay" class="loading-overlay" style="display:none">
<div class="loading-box">
<div class="loading-spinner"></div>
<div id="loading-text">正在处理,请稍候...</div>
</div>
</div>
<script src="/common/common.js"></script>
<script src="/tools/ai-lib/ai-lib.js"></script>
</body>
</html>