Skip to content

Commit 43d9c72

Browse files
committed
fix:聊天框放到最底下
1 parent a52b1bf commit 43d9c72

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

src/chatPanel.ts

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,28 @@ export class ChatPanel {
4747
<meta name="viewport" content="width=device-width, initial-scale=1.0">
4848
<title>Chat with Model</title>
4949
<style>
50-
.user { color: blue; }
51-
.model { color: green; }
52-
</style>
50+
.user { color: blue; }
51+
.model { color: green; }
52+
#chat {
53+
height: calc(100vh - 150px);
54+
overflow-y: auto;
55+
}
56+
#input-container {
57+
position: fixed;
58+
bottom: 0;
59+
width: 100%;
60+
background-color: white;
61+
padding: 10px;
62+
}
63+
</style>
5364
</head>
5465
<body>
5566
<div id="chat"></div>
56-
<textarea id="input" placeholder="Type your message here..." style="width: 100%; height: 100px;"></textarea>
57-
<button id="send">Send</button>
58-
<button id="reset">Reset</button>
67+
<div id="input-container">
68+
<textarea id="input" placeholder="Type your message here..." style="width: 100%; height: 100px;"></textarea>
69+
<button id="send">Send</button>
70+
<button id="reset">Reset</button>
71+
</div>
5972
<script>
6073
const vscode = acquireVsCodeApi();
6174
const chat = document.getElementById('chat');

0 commit comments

Comments
 (0)