Skip to content

Commit cbaf7cb

Browse files
authored
refactor: chat layout update (#209)
1 parent 1aaad34 commit cbaf7cb

File tree

9 files changed

+18
-22
lines changed

9 files changed

+18
-22
lines changed

plugin/assets/chat_panel.css

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -90,22 +90,6 @@ html {
9090
border-width: 0px;
9191
}
9292

93-
.wrapper a.accept {
94-
background: var(--copilot-accept-background);
95-
border-color: var(--copilot-accept-border);
96-
color: var(--copilot-accept-foreground);
97-
}
98-
99-
.wrapper a.accept {
100-
background: var(--copilot-accept-background);
101-
border-color: var(--copilot-accept-border);
102-
color: var(--copilot-accept-foreground);
103-
}
104-
105-
.wrapper a.accept i {
106-
color: var(--copilot-accept-border);
107-
}
108-
10993
.wrapper .kind {
11094
padding: 1px;
11195
color: color(var(--greenish) alpha(1));
@@ -128,7 +112,7 @@ html {
128112
}
129113

130114
.wrapper div.reference {
131-
margin-top: 1rem;
115+
margin: 1rem 0;
132116
}
133117

134118
.wrapper div.references {
@@ -146,3 +130,9 @@ html {
146130
font-size: 0.8em;
147131
color: var(--copilot-references-foreground);
148132
}
133+
134+
.wrapper .code-actions {
135+
display: block;
136+
margin: 8px 0;
137+
text-align: right;
138+
}

plugin/assets/close.png

264 Bytes
Loading

plugin/assets/copy.png

255 Bytes
Loading

plugin/assets/github.png

223 Bytes
Loading

plugin/assets/insert.png

153 Bytes
Loading

plugin/assets/thumbs_down.png

102 Bytes
Loading

plugin/assets/thumbs_up.png

110 Bytes
Loading

plugin/assets/trash.png

-53 Bytes
Loading

plugin/templates/chat_panel.md.jinja

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
</style>
55

66
<div class="navbar">
7-
<a class="icon-link" title="Delete Conversation" href='{{ delete_url }}'><img class="icon" src="{{ asset_url('trash.png') }}"></a>
8-
<a class="close" title="Close Conversation" href='{{ close_url }}'><img class="icon" src="{{ asset_url('close.png') }}"></a>
7+
<div class="conversation-actions">
8+
<a class="icon-link" title="Delete Conversation" href='{{ delete_url }}'><img class="icon" src="{{ asset_url('trash.png') }}"></a>
9+
<a class="close" title="Close Conversation" href='{{ close_url }}'><img class="icon" src="{{ asset_url('close.png') }}"></a>
10+
</div>
911
<h3 class="suggested-title">
1012
{% if is_waiting %}{% endif %}Copilot Chat {% if suggested_title %}| {{ suggested_title }}{% endif %}
1113
</h3>
@@ -24,13 +26,13 @@
2426
{% endif %}
2527
</div>
2628

27-
<span class="kind {{ section.kind }}">
29+
<div class="kind {{ section.kind }}">
2830
{%- if section.kind == "report" -%}
2931
<img class="icon" src="{{ asset_url('github.png') }}"> Github Copilot
3032
{%- else -%}
3133
{% if avatar_img_src %}<img class="icon" src="{{ avatar_img_src }}">{% endif %} {{ section.kind }}
3234
{%- endif -%}
33-
</span>
35+
</div>
3436

3537

3638
{%- if section.kind == "report" and section.references -%}
@@ -58,11 +60,13 @@
5860
(
5961
"CODE_BLOCK_COMMANDS_" ~ index|string,
6062
(
63+
"<div class='code-actions'>" ~
6164
"<a class='icon-link' href='" ~ command_url('copilot_conversation_copy_code', {"window_id": window_id, "code_block_index": index}) ~ "'>" ~
6265
"<img class='icon icon-link' src='" ~ asset_url('copy.png') ~ "' /></a>" ~
6366
"<span></span>" ~
6467
" <a class='icon-link' href='" ~ command_url('copilot_conversation_insert_code_shim', {"window_id": window_id, "code_block_index": index}) ~ "'>" ~
65-
"<img class='icon icon-link' src='" ~ asset_url('insert.png') ~ "' /></a>\n\n"
68+
"<img class='icon icon-link' src='" ~ asset_url('insert.png') ~ "' /></a>" ~
69+
"</div>"
6670
) | safe,
6771
)
6872
) %}
@@ -74,5 +78,7 @@
7478
{% endfor %}
7579

7680
{% if follow_up %}
81+
<div class="follow-up-wrapper">
7782
Follow up: <a class="icon-link follow-up" href='{{ follow_up_url }}'>{{ follow_up }}</a>
83+
</div>
7884
{% endif %}

0 commit comments

Comments
 (0)