Skip to content

Commit 698ca8f

Browse files
authored
Merge pull request #170 from Welltested-AI/fix/context_in_embeddings
Fix: Chat is able to remember chat history in @workspace annotation too.
2 parents 2555dee + b9eca09 commit 698ca8f

File tree

8 files changed

+379
-106
lines changed

8 files changed

+379
-106
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ All notable changes to the "fluttergpt" extension will be documented in this fil
44

55
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
66

7-
## [0.2.1]
7+
## [0.2.2]
88

9-
- Major improvement in chat user experience.
10-
- Feature to provide workspace as context.
11-
- Minor bug fixes.
9+
- Major improvement in workspace chat user experience.
10+
- Feature to provide workspace as context in chat history.
11+
- Added a clear chat button.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ To get a sense of direction of where we're heading, please check out our [Roadma
146146
This is the beta version and can be unstable. Please check our [issues board](https://github.com/Welltested-AI/fluttergpt/issues) for any known issues.
147147

148148

149-
## Release Notes: 0.2.1
150-
- Major improvement in chat user experience.
151-
- Feature to provide workspace as context.
152-
- Minor bug fixes.
149+
## Release Notes: 0.2.2
150+
- Major improvement in workspace chat user experience.
151+
- Feature to provide workspace as context in chat history.
152+
- Added a clear chat button.
153153

154154
## License
155155

media/chat/chat.html

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@
77
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css">
88
<link rel="stylesheet" href="{{prismCssUri}}">
99
<link rel="stylesheet" href="{{cssUri}}">
10-
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/prism.min.js"></script>
11-
<script
12-
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.25.0/plugins/autoloader/prism-autoloader.min.js"></script>
13-
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/components/prism-dart.min.js"></script>
1410
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
11+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
1512
</head>
1613

1714
<body>
@@ -26,17 +23,30 @@
2623
<!-- Display chat messages -->
2724
<div id="dynamic-messages"></div>
2825
<!-- Add the loading indicator inside the chat container -->
29-
<span class="loader" id="loader" style="display: none;"></span>
26+
<div class="ml-7">
27+
<div class="dot-flashing" id="loader"></div>
28+
</div>
29+
30+
<div class="hidden flex-col w-full h-48 animate__animated animate__slideInUp px-2 py-3" id="workspace-loader">
31+
<div class="inline-flex flex-row items-end px-2">
32+
<span id="workspace-loader-text">Finding the most relevant files</span>
33+
<div class="typing-loader mx-2"></div>
34+
</div>
35+
<div class="inline-flex flex-col px-3" id="file-names"></div>
36+
</div>
3037
<div id="response" class="pt-4 text-sm"></div>
3138

3239
<div id="snackbar">
3340
<i class="fa-solid fa-triangle-exclamation" style="color: #ffffff;"></i>
3441
</div>
35-
3642
<textarea spellcheck="false" placeholder="Ask FlutterGPT something" rows="1" aria-multiline="true" id="prompt-input"></textarea>
3743
<div id="menu" class="menu" role="listbox" ></div>
3844
<script src="{{scriptUri}}"></script>
3945
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js"></script>
46+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/prism.min.js"></script>
47+
<script
48+
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.25.0/plugins/autoloader/prism-autoloader.min.js"></script>
49+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/components/prism-dart.min.js"></script>
4050
</body>
4151

4252
</html>

media/chat/css/chatpage.css

Lines changed: 107 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@ body {
4545
position: absolute;
4646
align-items: center;
4747
justify-content: center;
48-
top: 86%;
48+
top: 86%;
4949
left: 50%;
5050
transform: translateX(-50%);
51-
background-color: #ffcc00;
51+
background-color: #ffcc00;
5252
color: #ffffff;
5353
text-align: center;
5454
padding: 10px;
5555
border-radius: 5px;
5656
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
57-
width: calc(100% - 18px);
58-
z-index: 100;
59-
animation: fadeInOut 5s ease;
57+
width: calc(100% - 18px);
58+
z-index: 100;
59+
animation: fadeInOut 5s ease;
6060
}
6161

6262
#snackbar i {
@@ -91,12 +91,12 @@ body {
9191
top: 90%;
9292
left: 50%;
9393
transform: translateX(-50%) translateY(100%);
94-
background-color: #ffcc00;
94+
background-color: #ffcc00;
9595
color: #ffffff;
9696
padding: 10px;
9797
border-radius: 5px;
9898
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
99-
width: calc(100% - 18px);
99+
width: calc(100% - 18px);
100100
z-index: 100;
101101
animation: slideUp 0.5s ease-in-out forwards;
102102
}
@@ -109,48 +109,84 @@ body {
109109
margin-left: 8px;
110110
}
111111

112-
.loader {
113-
width: 8px;
114-
height: 8px;
115-
left: 16px;
116-
border-radius: 50%;
117-
background-color: var(--vscode-progressBar-background);
118-
box-shadow: 32px 0 var(--vscode-progressBar-background), -32px 0 var(--vscode-progressBar-background);
119-
position: relative;
120-
animation: flash 0.5s ease-out infinite alternate;
112+
.file-path {
113+
font-family: 'Courier New', Courier, monospace;
114+
color: var(--vscode-editor-foreground);
121115
}
122116

123-
@keyframes flash {
124-
0% {
125-
background-color: #FFF2;
126-
box-shadow: 16px 0 #FFF2, -16px 0 var(--vscode-progressBar-background);
127-
}
117+
.dot-flashing {
118+
position: relative;
119+
width: 10px;
120+
height: 10px;
121+
border-radius: 5px;
122+
background-color: var(--vscode-progressBar-background);
123+
color: var(--vscode-progressBar-background);
124+
animation: dot-flashing 1s infinite linear alternate;
125+
animation-delay: 0.5s;
126+
display: none;
127+
}
128128

129-
50% {
130-
background-color: var(--vscode-progressBar-background);
131-
box-shadow: 16px 0 #FFF2, -16px 0 #FFF2;
132-
}
129+
.dot-flashing::before, .dot-flashing::after {
130+
content: "";
131+
display: inline-block;
132+
position: absolute;
133+
top: 0;
134+
}
133135

134-
100% {
135-
background-color: #FFF2;
136-
box-shadow: 16px 0 var(--vscode-progressBar-background), -16px 0 #FFF2;
136+
.dot-flashing::before {
137+
left: -15px;
138+
width: 10px;
139+
height: 10px;
140+
border-radius: 5px;
141+
background-color: var(--vscode-progressBar-background);
142+
color: var(--vscode-progressBar-background);
143+
animation: dot-flashing 1s infinite alternate;
144+
animation-delay: 0s;
145+
}
146+
147+
.dot-flashing::after {
148+
left: 15px;
149+
width: 10px;
150+
height: 10px;
151+
border-radius: 5px;
152+
background-color: var(--vscode-progressBar-background);
153+
color: var(--vscode-progressBar-background);
154+
animation: dot-flashing 1s infinite alternate;
155+
animation-delay: 1s;
156+
}
157+
158+
@keyframes dot-flashing {
159+
0% {
160+
background-color: var(--vscode-progressBar-background);
137161
}
138-
}
162+
50%, 100% {
163+
background-color: var(--vscode-editor-foreground);
164+
}
165+
}
139166

140167
@keyframes slideUp {
141168
from {
142169
opacity: 0;
143170
transform: translateX(-50%) translateY(100%);
144171
}
172+
145173
to {
146174
opacity: 1;
147175
transform: translateX(-50%) translateY(0);
148176
}
149177
}
150178

151179
@keyframes fadeInOut {
152-
0%, 100% { opacity: 0; }
153-
10%, 90% { opacity: 1; }
180+
181+
0%,
182+
100% {
183+
opacity: 0;
184+
}
185+
186+
10%,
187+
90% {
188+
opacity: 1;
189+
}
154190
}
155191

156192
.message {
@@ -200,7 +236,13 @@ body {
200236
}
201237

202238
#dynamic-messages {
203-
word-break: break-word;
239+
word-break: break-word;
240+
}
241+
242+
#workspace-loader {
243+
background-color: var(--vscode-editor-background);
244+
color: var(--vscode-editor-foreground);
245+
fill: var(--vscode-editor-foreground);
204246
}
205247

206248
.user-gemini-pro p {
@@ -246,7 +288,8 @@ ul li::before {
246288
margin-right: 5px;
247289
}
248290

249-
ol, ul {
291+
ol,
292+
ul {
250293
padding-left: 11px;
251294
}
252295

@@ -256,4 +299,35 @@ ol {
256299

257300
ul {
258301
list-style-type: disc;
302+
}
303+
304+
.typing-loader {
305+
width: 4px;
306+
height: 4px;
307+
border-radius: 50%;
308+
animation: loading 1s linear infinite alternate;
309+
margin-bottom: 4px;
310+
}
311+
312+
@keyframes loading {
313+
0% {
314+
background-color: var(--vscode-progressBar-background);
315+
box-shadow:
316+
8px 0px 0px 0px var(--vscode-editor-foreground),
317+
16px 0px 0px 0px var(--vscode-editor-foreground);
318+
}
319+
320+
25% {
321+
background-color: var(--vscode-editor-foreground);
322+
box-shadow:
323+
8px 0px 0px 0px var(--vscode-progressBar-background),
324+
16px 0px 0px 0px var(--vscode-editor-foreground);
325+
}
326+
327+
75% {
328+
background-color: var(--vscode-editor-foreground);
329+
box-shadow:
330+
8px 0px 0px 0px var(--vscode-editor-foreground),
331+
16px 0px 0px 0px var(--vscode-progressBar-background);
332+
}
259333
}

0 commit comments

Comments
 (0)