File size: 4,464 Bytes
96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 6c76ab5 96394f8 |
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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
<!DOCTYPE html>
<html>
<head>
<title>AI Project Chat - Modern</title>
<style>
body {
margin: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f0f2f5;
display: flex;
height: 100vh;
}
.sidebar {
width: 250px;
background-color: #2c3e50;
color: white;
padding: 20px;
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
overflow-y: auto;
}
.sidebar h2 {
font-size: 18px;
margin-bottom: 10px;
border-bottom: 1px solid #444;
padding-bottom: 5px;
}
.sidebar ul {
list-style-type: none;
padding: 0;
margin: 0;
}
.sidebar li {
margin: 5px 0;
padding: 8px;
background-color: #34495e;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.2s;
}
.sidebar li:hover {
background-color: #3d566e;
}
.main {
flex-grow: 1;
display: flex;
flex-direction: column;
padding: 20px;
}
.chat-box {
flex-grow: 1;
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
overflow-y: auto;
margin-bottom: 20px;
}
.chat-entry {
margin-bottom: 15px;
}
.chat-entry b {
color: #333;
}
.chat-entry pre {
background-color: #f7f7f7;
padding: 10px;
border-radius: 4px;
overflow-x: auto;
}
.input-box {
display: flex;
flex-direction: column;
}
.input-box textarea {
width: 100%;
padding: 12px;
border-radius: 4px;
border: 1px solid #ccc;
font-size: 14px;
resize: vertical;
min-height: 80px;
margin-bottom: 10px;
}
.input-box input[type="submit"] {
padding: 12px;
background-color: #3498db;
color: white;
border: none;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.2s;
}
.input-box input[type="submit"]:hover {
background-color: #2980b9;
}
.top-bar {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.top-bar h1 {
font-size: 24px;
color: #333;
}
.top-bar a {
text-decoration: none;
color: #3498db;
font-weight: bold;
transition: color 0.2s;
}
.top-bar a:hover {
color: #2980b9;
}
#loading {
margin-top: 10px;
font-style: italic;
color: #555;
}
</style>
<script>
function showLoading() {
document.getElementById("loading").style.display = "block";
}
</script>
</head>
<body>
<div class="sidebar">
<h2>π Project Files</h2>
<ul>
{% for file in project_tree %}
<li>{{ file }}</li>
{% endfor %}
</ul>
</div>
<div class="main">
<div class="top-bar">
<h1>π€ AI Project Chat</h1>
<a href="/download_project">β¬οΈ Download Project ZIP</a>
</div>
<div class="chat-box">
{% for chat in chat_history %}
<div class="chat-entry">
<b>User:</b> {{ chat.user }}<br>
<b>AI:</b>
<pre>{{ chat.ai }}</pre>
</div>
{% endfor %}
</div>
<form method="POST" onsubmit="showLoading()" class="input-box">
<textarea name="user_message" placeholder="Example: Refactor app.py or Create new file called utils.py"></textarea>
<input type="submit" value="Send to AI">
</form>
<div id="loading" style="display:none;">
Loading... Please wait while AI is generating response.
</div>
</div>
</body>
</html> |