vue+python实现类似cursor的ai编程助手前端交互html代码
代码语言:html
所属分类:其他
代码描述:vue+python实现类似cursor的ai编程助手前端交互html代码
代码标签: vue python 类似 cursor ai 编程 助手 前端 交互 html 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Code Editor</title>
<link rel='stylesheet' href='//repo.bfw.wiki/bfwrepo/js/codemirror/lib/codemirror.css'>
<link rel='stylesheet' href='//repo.bfw.wiki/bfwrepo/js/codemirror/theme/material.css'>
<style>
.maineditor {
display: flex;
flex-direction: row;
height: 100vh;
width: 100vw;
overflow: hidden;
}
.selected-label {
color: green;
margin-left: 10px;
}
/* 自定义滚动条样式 */
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-track {
background: #1e1e1e;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
background: #444;
border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
background: #555;
}
/* Firefox 滚动条样式 */
* {
scrollbar-color: #444 #1e1e1e;
scrollbar-width: thin;
}
body {
margin: 0;
padding: 0;
display: flex;
height: 100vh;
font-family: Arial, sans-serif;
background-color: #1e1e1e;
color: white;
overflow: hidden;
}
#sidebar {
width: 250px;
background-color: #252526;
padding: 10px;
overflow-y: auto;
border-right: 1px solid #444;
}
#editor {
flex: 1;
background-color: #1e1e1e;
display: flex;
flex-direction: column;
overflow: hidden;
}
.file-item,
.folder-item,
.project-item {
cursor: pointer;
padding: 5px;
margin: 5px 0;
border-radius: 3px;
display: flex;
align-items: center;
}
.file-item:hover,
.folder-item:hover,
.project-item:hover {
background-color: #2a2d2e;
}
.context-btn {
margin-left: 10px;
cursor: pointer;
color: #ccc;
font-size: 12px;
}
.folder-item::before,
.file-item::before {
content: '';
display: inline-block;
width: 16px;
height: 16px;
margin-right: 5px;
background-size: cover;
}
.folder-item::before {
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0id2hpdGUiPjxwYXRoIGQ9Ik0xMCA0SDRjLTEuMSAwLTEuOTkuOS0xLjk5IDJMMiAxOGMwIDEuMS45IDIgMiAyaDE2YzEuMSAwIDItLjkgMi0yVjhjMC0xLjEtLjktMi0yLTJoLThsLTItMnoiLz48L3N2Zz4=');
}
.file-item::before {
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0id2hpdGUiPjxwYXRoIGQ9Ik0xNCAySDZjLTEuMSAwLTEuOTkuOS0xLjk5IDJMMyAyMGMwIDEuMS45IDIgMiAyaDEyYzEuMSAwIDItLjkgMi0yVjhsLTYtNnptNCAxOEg2VjRoN3Y1aDV2MTF6Ii8+PC9zdmc+');
}
.folder-item.collapsed::before {
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0id2hpdGUiPjxwYXRoIGQ9Ik0xMCA4SDRjLTEuMSAwLTEuOTkuOS0xLjk5IDJMMiAxOGMwIDEuMS45IDIgMiAyaDE2YzEuMSAwIDItLjkgMi0yVjhjMC0xLjEtLjktMi0yLTJoLThsLTItMnoiLz48L3N2Zz4=');
}
.folder-item.expanded::before {
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0id2hpdGUiPjxwYXRoIGQ9Ik0xOSAxMEg1Yy0xLjEgMC0yIC45LTIgMnY4YzAgMS4xLjkgMiAyIDJoMTRjMS4xIDAgMi0uOSAyLTJ2LThjMC0xLjEtLjktMi0yLTJ6bS04IDZIOXYtMmgydjJ6bTAtNEg5di0yaDJ2MnptNC40IDRoLTMuOGMtLjMgMC0uNi0uMi0uOC0uNGwtMS4yLTEuNmgxLjJsLjYuOWg4LjJsLjYtLjkxIDEuMiAxLjYxYy0uMi4yLS41LjQtLjguNHoiLz48L3N2Zz4=');
}
#tabs {
display: flex;
background-color: #252526;
padding: 5px;
border-bottom: 1px solid #444;
}
.tab {
display: flex;
align-items: center;
padding: 8px 12px;
margin-right: 5px;
cursor: pointer;
background-color: #2a2d2e;
border-radius: 3px;
position: relative;
}
.tab.active {
background-color: #0e639c;
}
.close-button {
margin-left: 8px;
cursor: pointer;
font-size: 14px;
color: #ccc;
}
.close-button:hover {
color: white;
}
#save-button {
position: absolute;
top: 10px;
right: 10px;
background-color: #0e639c;
color: white;
border: none;
padding: 8px 12px;
border-radius: 3px;
cursor: pointer;
}
#save-button:hover {
background-color: #1177bb;
}
.CodeMirror {
height: 100%;
/* 确保编辑器占据整个容器高度 */
}
.sub-container {
margin-left: 20px;
display: none;
}
.folder-item.expanded+.sub-container {
display: block;
}
#code-editor-container {
flex: 1;
/* 默认隐藏 */
height: 100vh;
overflow: hidden;
}
#code-editor-container.active {
display: block;
/* 显示编辑器容器 */
}
.code-editor-wrapper {
height: 100%;
/* 确保编辑器占据整个容器高度 */
}
/* 聊天窗口样式 */
#chat-window {
position: fixed;
bottom: 20px;
right: 20px;
width: 300px;
height: 600px;
background-color: #252526;
border: 1px solid #444;
border-radius: 5px;
display: flex;
flex-direction: column;
overflow: hidden;
z-index: 1000;
}
#chat-icon {
position: fixed;
bottom: 20px;
right: 20px;
cursor: pointer;
}
#minimize-btn {
float: right;
background: none;
border: none;
font-size: 20px;
cursor: pointer;
}
/* 开关样式 */
.switch {
position: relative;
display: inline-block;
width: 40px;
height: 18px;
margin-left: 10px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0