feat:对话界面将输入框固定在底部
This commit is contained in:
@ -16,6 +16,7 @@ export function getWebviewContent(iconUri?: string): string {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
@ -33,11 +34,14 @@ export function getWebviewContent(iconUri?: string): string {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.messages {
|
.messages {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
|
min-height: 0;
|
||||||
}
|
}
|
||||||
.message {
|
.message {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
@ -57,6 +61,7 @@ export function getWebviewContent(iconUri?: string): string {
|
|||||||
.input-area {
|
.input-area {
|
||||||
border-top: 1px solid var(--vscode-panel-border);
|
border-top: 1px solid var(--vscode-panel-border);
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.input-group {
|
.input-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -194,6 +199,7 @@ export function getWebviewContent(iconUri?: string): string {
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.quick-btn {
|
.quick-btn {
|
||||||
padding: 6px 12px;
|
padding: 6px 12px;
|
||||||
@ -205,11 +211,12 @@ export function getWebviewContent(iconUri?: string): string {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
.file-reader-section {
|
.file-reader-section {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 15px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
background: var(--vscode-input-background);
|
background: var(--vscode-input-background);
|
||||||
border: 1px solid var(--vscode-input-border);
|
border: 1px solid var(--vscode-input-border);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.file-reader-section h3 {
|
.file-reader-section h3 {
|
||||||
margin: 0 0 10px 0;
|
margin: 0 0 10px 0;
|
||||||
@ -234,7 +241,7 @@ export function getWebviewContent(iconUri?: string): string {
|
|||||||
background: var(--vscode-editor-background);
|
background: var(--vscode-editor-background);
|
||||||
border: 1px solid var(--vscode-panel-border);
|
border: 1px solid var(--vscode-panel-border);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
max-height: 300px;
|
max-height: 120px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
font-family: 'Courier New', monospace;
|
font-family: 'Courier New', monospace;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@ -254,12 +261,13 @@ export function getWebviewContent(iconUri?: string): string {
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
.file-editor-section {
|
.file-editor-section {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 15px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
background: var(--vscode-input-background);
|
background: var(--vscode-input-background);
|
||||||
border: 1px solid var(--vscode-input-border);
|
border: 1px solid var(--vscode-input-border);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
display: none;
|
display: none;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.file-editor-section.active {
|
.file-editor-section.active {
|
||||||
display: block;
|
display: block;
|
||||||
@ -298,7 +306,6 @@ export function getWebviewContent(iconUri?: string): string {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
padding: 0 20px;
|
|
||||||
height: 40px;
|
height: 40px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
@ -423,32 +430,31 @@ export function getWebviewContent(iconUri?: string): string {
|
|||||||
<p>专注于真实FPGA研发的Verilog智能体编程平台</p>
|
<p>专注于真实FPGA研发的Verilog智能体编程平台</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="file-reader-section">
|
|
||||||
<h3>📁 文件读取</h3>
|
|
||||||
<div class="file-input-group">
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
id="filePathInput"
|
|
||||||
placeholder="输入文件路径(相对或绝对路径)..."
|
|
||||||
/>
|
|
||||||
<button onclick="readFile()">读取文件</button>
|
|
||||||
</div>
|
|
||||||
<div id="fileContent" class="file-content empty">
|
|
||||||
文件内容将在这里显示...
|
|
||||||
</div>
|
|
||||||
<div id="errorMessage" style="display: none;"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="fileEditorSection" class="file-editor-section">
|
|
||||||
<h3>✏️ 编辑文件: <span id="editingFileName"></span></h3>
|
|
||||||
<textarea id="fileEditorTextarea" class="file-editor-textarea"></textarea>
|
|
||||||
<div class="editor-actions">
|
|
||||||
<button onclick="saveFile()">保存修改</button>
|
|
||||||
<button onclick="cancelEdit()" style="background: var(--vscode-button-secondaryBackground); color: var(--vscode-button-secondaryForeground);">取消</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="chat-container">
|
<div class="chat-container">
|
||||||
|
<div class="file-reader-section">
|
||||||
|
<h3>📁 文件读取</h3>
|
||||||
|
<div class="file-input-group">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
id="filePathInput"
|
||||||
|
placeholder="输入文件路径(相对或绝对路径)..."
|
||||||
|
/>
|
||||||
|
<button onclick="readFile()">读取文件</button>
|
||||||
|
</div>
|
||||||
|
<div id="fileContent" class="file-content empty">
|
||||||
|
文件内容将在这里显示...
|
||||||
|
</div>
|
||||||
|
<div id="errorMessage" style="display: none;"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="fileEditorSection" class="file-editor-section">
|
||||||
|
<h3>✏️ 编辑文件: <span id="editingFileName"></span></h3>
|
||||||
|
<textarea id="fileEditorTextarea" class="file-editor-textarea"></textarea>
|
||||||
|
<div class="editor-actions">
|
||||||
|
<button onclick="saveFile()">保存修改</button>
|
||||||
|
<button onclick="cancelEdit()" style="background: var(--vscode-button-secondaryBackground); color: var(--vscode-button-secondaryForeground);">取消</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div id="messages" class="messages">
|
<div id="messages" class="messages">
|
||||||
<div class="message bot-message">
|
<div class="message bot-message">
|
||||||
👋 你好!我是 IC Coder 助手,可以帮你生成代码、回答问题。
|
👋 你好!我是 IC Coder 助手,可以帮你生成代码、回答问题。
|
||||||
|
|||||||
Reference in New Issue
Block a user