-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathindex.html
114 lines (109 loc) · 5.87 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI助手</title>
<link rel="stylesheet" href="styles/base.css">
<link rel="stylesheet" href="styles/layout.css">
<link rel="stylesheet" href="styles/components/buttons.css">
<link rel="stylesheet" href="styles/components/cards.css">
<link rel="stylesheet" href="styles/components/dialogs.css">
<link rel="stylesheet" href="styles/components/ports.css">
<script type="module" src="script.js"></script>
</head>
<body>
<div class="app-container">
<!-- 左侧预制提示词栏 -->
<aside class="sidebar">
<div class="section-header">
<h2>预制提示词</h2>
<div class="header-actions">
<button id="clear-connections" class="warning-button" title="清除所有连线">
清除连线
</button>
<button id="clear-cards" class="circle-danger-button" title="删除所有卡片">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M18 6L6 18M6 6l12 12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</svg>
</button>
</div>
</div>
<!-- 提示词卡片区域 -->
<div class="prompt-cards">
<!-- 卡片将由 JS 动态添加 -->
</div>
<div class="sidebar-bottom">
<div class="card-management">
<div class="card-management-buttons">
<button id="add-card" class="add-card-button">+ 添加提示词卡片</button>
<button id="import-cards" class="icon-button" title="导入卡片">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 16L12 4M12 16L8 12M12 16L16 12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<path d="M3 20H21" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</svg>
</button>
<button id="export-cards" class="icon-button" title="导出卡片">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 4L12 16M12 4L8 8M12 4L16 8" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<path d="M3 20H21" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</svg>
</button>
</div>
</div>
<!-- 提交按钮组 -->
<div class="submit-button-group">
<button id="submit-prompt" class="submit-button" disabled>提交</button>
<button id="model-selector" class="model-selector-button" title="选择模型">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6 9L12 15L18 9" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</svg>
</button>
<div class="model-dropdown">
<div class="model-option selected" data-model="tongyi">通义千问</div>
<div class="model-option" data-model="deepseek-v3">DeepSeek-V3</div>
<div class="model-option" data-model="deepseek-r1">DeepSeek-R1</div>
<div class="model-option" data-model="ollama">本地模型</div>
<div class="model-option custom" data-model="custom">自定义</div>
</div>
</div>
<!-- 输出框 -->
<div class="output-container">
<div id="prompt-output" class="output-content" draggable="true">
等待第一次提交……
</div>
</div>
</div>
</aside>
<!-- 右侧主聊天区域 -->
<main class="chat-container">
<header>
<h1>文档编辑</h1>
<div class="header-buttons">
<button id="import-button">导入 Markdown</button>
<button id="export-button">导出 Markdown</button>
</div>
</header>
<div id="paragraph-cards" class="paragraph-container">
<!-- 段落卡片将在这里动态生成 -->
</div>
<div class="floating-buttons">
<button id="clear-paragraphs" class="circle-danger-button floating-button" title="删除所有段落">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6 6L18 18M18 6L6 18" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</svg>
</button>
<button id="add-paragraph" class="add-paragraph-button floating-button">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 6L12 18M18 12L6 12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</svg>
</button>
</div>
</main>
</div>
<!-- 添加SVG连接线容器 -->
<svg class="connections-container">
<!-- 连接线将在这里动态生成 -->
</svg>
</body>
</html>