Compare commits
4 Commits
7444bb1140
...
feat/backe
| Author | SHA1 | Date | |
|---|---|---|---|
| 1881615860 | |||
| d0462ca4b9 | |||
| eae3968465 | |||
| a734ccbb88 |
38
PUBLISH.md
38
PUBLISH.md
@ -268,6 +268,44 @@ pnpm vsce publish 0.0.3
|
|||||||
4. 执行发布命令
|
4. 执行发布命令
|
||||||
5. 验证市场上的插件是否正常
|
5. 验证市场上的插件是否正常
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 更新流程
|
||||||
|
|
||||||
|
1. 修改版本号
|
||||||
|
|
||||||
|
手动修改 修改package.json文件
|
||||||
|
|
||||||
|
命令修改
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#补丁版本 (1.0.0 -> 1.0.1)
|
||||||
|
pnpm version patch
|
||||||
|
|
||||||
|
#次要版本 (1.0.0 -> 1.1.0)
|
||||||
|
pnpm version minor
|
||||||
|
|
||||||
|
#主要版本 (1.0.0 -> 2.0.0)
|
||||||
|
pnpm version major
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 打包
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#先build
|
||||||
|
pnpm run build
|
||||||
|
|
||||||
|
#后打包成.vsix
|
||||||
|
pnpm vsce package --no-dependencies
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
3. 手动上传/命令上传
|
||||||
|
|
||||||
|
- https://marketplace.visualstudio.com/ 在这个里面手动上传 更新就选择update
|
||||||
|
- 命令上传:vsce publish
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 常见问题
|
## 常见问题
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 252 KiB |
@ -2,7 +2,7 @@
|
|||||||
"name": "iccoder",
|
"name": "iccoder",
|
||||||
"displayName": "IC Coder: Agentic Verilog Platform",
|
"displayName": "IC Coder: Agentic Verilog Platform",
|
||||||
"description": "Agentic Verilog Coding Platform for Real-World FPGAs",
|
"description": "Agentic Verilog Coding Platform for Real-World FPGAs",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"publisher": "ICCoderAgenticVerilogPlatform",
|
"publisher": "ICCoderAgenticVerilogPlatform",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.80.0"
|
"vscode": "^1.80.0"
|
||||||
|
|||||||
@ -162,6 +162,11 @@ export async function showICHelperPanel(
|
|||||||
vscode.Uri.joinPath(context.extensionUri, "src", "assets", "QRCode", "wx.png")
|
vscode.Uri.joinPath(context.extensionUri, "src", "assets", "QRCode", "wx.png")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// 获取Logo URI
|
||||||
|
const logoUri = panel.webview.asWebviewUri(
|
||||||
|
vscode.Uri.joinPath(context.extensionUri, "media", "homepage-logo.png")
|
||||||
|
);
|
||||||
|
|
||||||
// 设置HTML内容
|
// 设置HTML内容
|
||||||
panel.webview.html = getWebviewContent(
|
panel.webview.html = getWebviewContent(
|
||||||
iconUri.toString(),
|
iconUri.toString(),
|
||||||
@ -169,7 +174,8 @@ export async function showICHelperPanel(
|
|||||||
liteIconUri.toString(),
|
liteIconUri.toString(),
|
||||||
syIconUri.toString(),
|
syIconUri.toString(),
|
||||||
maxIconUri.toString(),
|
maxIconUri.toString(),
|
||||||
qrCodeUri.toString()
|
qrCodeUri.toString(),
|
||||||
|
logoUri.toString()
|
||||||
);
|
);
|
||||||
|
|
||||||
// 获取并发送用户信息到 webview
|
// 获取并发送用户信息到 webview
|
||||||
|
|||||||
@ -41,6 +41,7 @@ export interface MessageSegment {
|
|||||||
toolName?: string;
|
toolName?: string;
|
||||||
toolStatus?: "running" | "success" | "error";
|
toolStatus?: "running" | "success" | "error";
|
||||||
toolResult?: string;
|
toolResult?: string;
|
||||||
|
toolDescription?: string;
|
||||||
askId?: string;
|
askId?: string;
|
||||||
question?: string;
|
question?: string;
|
||||||
options?: string[];
|
options?: string[];
|
||||||
@ -180,7 +181,8 @@ export class DialogSession {
|
|||||||
private updateToolSegment(
|
private updateToolSegment(
|
||||||
toolName: string,
|
toolName: string,
|
||||||
status: "success" | "error",
|
status: "success" | "error",
|
||||||
result?: string
|
result?: string,
|
||||||
|
description?: string
|
||||||
): void {
|
): void {
|
||||||
// 找到最后一个匹配的工具段落
|
// 找到最后一个匹配的工具段落
|
||||||
for (let i = this.segments.length - 1; i >= 0; i--) {
|
for (let i = this.segments.length - 1; i >= 0; i--) {
|
||||||
@ -192,6 +194,9 @@ export class DialogSession {
|
|||||||
) {
|
) {
|
||||||
seg.toolStatus = status;
|
seg.toolStatus = status;
|
||||||
seg.toolResult = result;
|
seg.toolResult = result;
|
||||||
|
if (description !== undefined) {
|
||||||
|
seg.toolDescription = description;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -590,7 +595,7 @@ export class DialogSession {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onToolComplete: (data) => {
|
onToolComplete: (data) => {
|
||||||
this.updateToolSegment(data.tool_name, "success", data.result);
|
this.updateToolSegment(data.tool_name, "success", data.result, data.description);
|
||||||
callbacks.onToolComplete?.(data.tool_name, data.result);
|
callbacks.onToolComplete?.(data.tool_name, data.result);
|
||||||
// 实时发送段落更新
|
// 实时发送段落更新
|
||||||
callbacks.onSegmentUpdate?.(this.segments);
|
callbacks.onSegmentUpdate?.(this.segments);
|
||||||
|
|||||||
@ -96,6 +96,7 @@ export interface ToolStartEvent {
|
|||||||
export interface ToolCompleteEvent {
|
export interface ToolCompleteEvent {
|
||||||
tool_name: string;
|
tool_name: string;
|
||||||
result: string;
|
result: string;
|
||||||
|
description?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** tool_error 事件数据 */
|
/** tool_error 事件数据 */
|
||||||
|
|||||||
@ -59,13 +59,25 @@ export function showICHelperPanel(context: vscode.ExtensionContext) {
|
|||||||
vscode.Uri.joinPath(context.extensionUri, "src", "assets", "model", "Max.png")
|
vscode.Uri.joinPath(context.extensionUri, "src", "assets", "model", "Max.png")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// 获取二维码图片URI
|
||||||
|
const qrCodeUri = panel.webview.asWebviewUri(
|
||||||
|
vscode.Uri.joinPath(context.extensionUri, "src", "assets", "QRCode", "wx.png")
|
||||||
|
);
|
||||||
|
|
||||||
|
// 获取Logo URI
|
||||||
|
const logoUri = panel.webview.asWebviewUri(
|
||||||
|
vscode.Uri.joinPath(context.extensionUri, "media", "homepage-logo.png")
|
||||||
|
);
|
||||||
|
|
||||||
// 设置HTML内容
|
// 设置HTML内容
|
||||||
panel.webview.html = getWebviewContent(
|
panel.webview.html = getWebviewContent(
|
||||||
iconUri.toString(),
|
iconUri.toString(),
|
||||||
autoIconUri.toString(),
|
autoIconUri.toString(),
|
||||||
liteIconUri.toString(),
|
liteIconUri.toString(),
|
||||||
syIconUri.toString(),
|
syIconUri.toString(),
|
||||||
maxIconUri.toString()
|
maxIconUri.toString(),
|
||||||
|
qrCodeUri.toString(),
|
||||||
|
logoUri.toString()
|
||||||
);
|
);
|
||||||
|
|
||||||
// 处理消息
|
// 处理消息
|
||||||
|
|||||||
@ -5,38 +5,57 @@
|
|||||||
/**
|
/**
|
||||||
* 获取邀请码弹窗的 HTML 内容
|
* 获取邀请码弹窗的 HTML 内容
|
||||||
*/
|
*/
|
||||||
export function getInvitationModalContent(qrCodeUri?: string): string {
|
export function getInvitationModalContent(
|
||||||
|
qrCodeUri?: string,
|
||||||
|
logoUri?: string,
|
||||||
|
): string {
|
||||||
return `
|
return `
|
||||||
<!-- 邀请码验证弹窗 -->
|
<!-- 邀请码验证弹窗 -->
|
||||||
<div id="invitationModal" class="invitation-modal" style="display: none;">
|
<div id="invitationModal" class="invitation-modal" style="display: none;">
|
||||||
<div class="invitation-modal-overlay"></div>
|
<div class="invitation-modal-overlay"></div>
|
||||||
<div class="invitation-modal-content">
|
<div class="invitation-modal-content">
|
||||||
<button id="invitationCloseBtn" class="invitation-close-btn" title="关闭">×</button>
|
${logoUri ? `<img src="${logoUri}" class="invitation-logo-corner" alt="IC Coder" />` : ""}
|
||||||
|
<button id="invitationCloseBtn" class="invitation-close-btn" title="关闭">
|
||||||
|
<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
|
||||||
|
<path d="M1 1L13 13M13 1L1 13" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
|
||||||
<div class="invitation-modal-header">
|
<div class="invitation-modal-header">
|
||||||
<h2>验证邀请码</h2>
|
<!-- <div class="invitation-icon">🔐</div> -->
|
||||||
<p class="invitation-modal-subtitle">仅供企业端用户和内部人员使用</p>
|
<h2>欢迎使用 IC Coder</h2>
|
||||||
|
<p class="invitation-modal-subtitle">目前IC Coder插件端仅供企业端付费用户使用,2026年3月起会逐步开放给所有用户使用~</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="invitation-modal-body">
|
<div class="invitation-modal-body">
|
||||||
<div class="invitation-qrcode-section">
|
<div class="invitation-qrcode-section">
|
||||||
<p class="invitation-qrcode-text">欢迎扫码添加微信获取邀请码</p>
|
<div class="invitation-qrcode-wrapper">
|
||||||
<img src="${qrCodeUri}" alt="微信二维码" class="invitation-qrcode-image" />
|
<img src="${qrCodeUri}" alt="微信二维码" class="invitation-qrcode-image" />
|
||||||
|
</div>
|
||||||
|
<p class="invitation-qrcode-text">欢迎扫码添加微信,填写《企业试用申请表》获取邀请码,与我们一起加速芯片设计与验证吧!</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="invitation-divider">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="invitation-input-section">
|
<div class="invitation-input-section">
|
||||||
|
<label class="invitation-input-label">邀请码</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="invitationCodeInput"
|
id="invitationCodeInput"
|
||||||
class="invitation-code-input"
|
class="invitation-code-input"
|
||||||
placeholder="请输入邀请码"
|
placeholder="请输入您的邀请码"
|
||||||
maxlength="20"
|
maxlength="20"
|
||||||
/>
|
/>
|
||||||
<div id="invitationError" class="invitation-error" style="display: none;"></div>
|
<div id="invitationError" class="invitation-error" style="display: none;"></div>
|
||||||
|
<button id="invitationSubmitBtn" class="invitation-btn invitation-btn-primary">
|
||||||
|
<span>立即验证</span>
|
||||||
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||||
|
<path d="M6 3L11 8L6 13" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="invitation-modal-footer">
|
|
||||||
<button id="invitationSubmitBtn" class="invitation-btn invitation-btn-primary">
|
|
||||||
验证
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
@ -58,6 +77,8 @@ export function getInvitationModalStyles(): string {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
padding: 20px;
|
||||||
|
font-family: var(--vscode-font-family, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif);
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-modal-overlay {
|
.invitation-modal-overlay {
|
||||||
@ -66,45 +87,61 @@ export function getInvitationModalStyles(): string {
|
|||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background: rgba(0, 0, 0, 0.6);
|
background: rgba(0, 0, 0, 0.7);
|
||||||
backdrop-filter: blur(4px);
|
backdrop-filter: blur(5px);
|
||||||
|
animation: fadeIn 0.3s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeIn {
|
||||||
|
from { opacity: 0; }
|
||||||
|
to { opacity: 1; }
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-modal-content {
|
.invitation-modal-content {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: var(--vscode-editor-background);
|
background: var(--vscode-editor-background);
|
||||||
border: 1px solid var(--vscode-panel-border);
|
border: 1px solid var(--vscode-widget-border);
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
width: 90%;
|
width: 100%;
|
||||||
max-width: 400px;
|
max-width: 420px;
|
||||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
|
||||||
animation: modalSlideIn 0.3s ease-out;
|
animation: modalSlideIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-close-btn {
|
.invitation-close-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 12px;
|
top: 16px;
|
||||||
right: 12px;
|
right: 16px;
|
||||||
width: 28px;
|
width: 32px;
|
||||||
height: 28px;
|
height: 32px;
|
||||||
border: none;
|
border: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--vscode-foreground);
|
color: var(--vscode-descriptionForeground);
|
||||||
font-size: 24px;
|
|
||||||
line-height: 1;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 4px;
|
border-radius: 6px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
opacity: 0.6;
|
z-index: 10;
|
||||||
z-index: 1;
|
}
|
||||||
|
|
||||||
|
.invitation-logo-corner {
|
||||||
|
position: absolute;
|
||||||
|
top: 16px;
|
||||||
|
left: 24px;
|
||||||
|
height: 40px;
|
||||||
|
width: auto;
|
||||||
|
opacity: 0.9;
|
||||||
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-close-btn:hover {
|
.invitation-close-btn:hover {
|
||||||
opacity: 1;
|
|
||||||
background: var(--vscode-toolbar-hoverBackground);
|
background: var(--vscode-toolbar-hoverBackground);
|
||||||
|
color: var(--vscode-foreground);
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-close-btn:active {
|
.invitation-close-btn:active {
|
||||||
@ -114,59 +151,100 @@ export function getInvitationModalStyles(): string {
|
|||||||
@keyframes modalSlideIn {
|
@keyframes modalSlideIn {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(-20px);
|
transform: translateY(20px) scale(0.98);
|
||||||
}
|
}
|
||||||
to {
|
to {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: translateY(0);
|
transform: translateY(0) scale(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-modal-header {
|
.invitation-modal-header {
|
||||||
padding: 24px 24px 16px;
|
padding: 60px 32px 20px;
|
||||||
border-bottom: 1px solid var(--vscode-panel-border);
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-modal-header h2 {
|
.invitation-modal-header h2 {
|
||||||
margin: 0;
|
margin: 0 0 12px;
|
||||||
font-size: 18px;
|
font-size: 20px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--vscode-foreground);
|
color: var(--vscode-foreground);
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-modal-subtitle {
|
.invitation-modal-subtitle {
|
||||||
margin: 8px 0 0;
|
margin: 0;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: var(--vscode-descriptionForeground);
|
color: var(--vscode-descriptionForeground);
|
||||||
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-modal-body {
|
.invitation-modal-body {
|
||||||
padding: 24px;
|
padding: 0 32px 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-qrcode-section {
|
.invitation-qrcode-section {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
|
background: var(--vscode-editor-inactiveSelectionBackground);
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-qrcode-text {
|
.invitation-qrcode-wrapper {
|
||||||
margin: 0 0 16px;
|
display: inline-block;
|
||||||
font-size: 13px;
|
padding: 8px;
|
||||||
color: var(--vscode-foreground);
|
background: #fff;
|
||||||
line-height: 1.5;
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-qrcode-image {
|
.invitation-qrcode-image {
|
||||||
width: 200px;
|
width: 150px;
|
||||||
height: 200px;
|
height: 150px;
|
||||||
border: 1px solid var(--vscode-panel-border);
|
display: block;
|
||||||
border-radius: 8px;
|
}
|
||||||
background: #fff;
|
|
||||||
|
.invitation-qrcode-text {
|
||||||
|
margin-top: 12px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--vscode-descriptionForeground);
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.invitation-divider {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 20px 0;
|
||||||
|
color: var(--vscode-descriptionForeground);
|
||||||
|
font-size: 12px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.invitation-divider::before,
|
||||||
|
.invitation-divider::after {
|
||||||
|
content: '';
|
||||||
|
flex: 1;
|
||||||
|
height: 1px;
|
||||||
|
background: var(--vscode-widget-border);
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.invitation-divider span {
|
||||||
|
padding: 0 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-input-section {
|
.invitation-input-section {
|
||||||
margin-top: 24px;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.invitation-input-label {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--vscode-foreground);
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-code-input {
|
.invitation-code-input {
|
||||||
@ -176,63 +254,74 @@ export function getInvitationModalStyles(): string {
|
|||||||
border: 1px solid var(--vscode-input-border);
|
border: 1px solid var(--vscode-input-border);
|
||||||
background: var(--vscode-input-background);
|
background: var(--vscode-input-background);
|
||||||
color: var(--vscode-input-foreground);
|
color: var(--vscode-input-foreground);
|
||||||
border-radius: 4px;
|
border-radius: 6px;
|
||||||
outline: none;
|
outline: none;
|
||||||
transition: border-color 0.2s;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
transition: border-color 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-code-input:focus {
|
.invitation-code-input:focus {
|
||||||
border-color: var(--vscode-focusBorder);
|
border-color: var(--vscode-focusBorder);
|
||||||
|
/* box-shadow: 0 0 0 2px var(--vscode-focusBorder); */
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-code-input::placeholder {
|
.invitation-code-input::placeholder {
|
||||||
color: var(--vscode-input-placeholderForeground);
|
color: var(--vscode-input-placeholderForeground);
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-error {
|
.invitation-error {
|
||||||
margin-top: 12px;
|
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
font-size: 13px;
|
font-size: 12px;
|
||||||
color: var(--vscode-errorForeground);
|
color: var(--vscode-errorForeground);
|
||||||
background: var(--vscode-inputValidation-errorBackground);
|
background: var(--vscode-inputValidation-errorBackground);
|
||||||
border: 1px solid var(--vscode-inputValidation-errorBorder);
|
border: 1px solid var(--vscode-inputValidation-errorBorder);
|
||||||
border-radius: 4px;
|
border-radius: 6px;
|
||||||
|
animation: shakeError 0.4s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-modal-footer {
|
@keyframes shakeError {
|
||||||
padding: 16px 24px;
|
0%, 100% { transform: translateX(0); }
|
||||||
border-top: 1px solid var(--vscode-panel-border);
|
25% { transform: translateX(-6px); }
|
||||||
display: flex;
|
75% { transform: translateX(6px); }
|
||||||
justify-content: flex-end;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-btn {
|
.invitation-btn {
|
||||||
padding: 8px 20px;
|
width: 100%;
|
||||||
font-size: 13px;
|
padding: 10px 16px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 4px;
|
border-radius: 6px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s;
|
display: flex;
|
||||||
outline: none;
|
align-items: center;
|
||||||
}
|
justify-content: center;
|
||||||
|
gap: 8px;
|
||||||
.invitation-btn-primary {
|
|
||||||
background: var(--vscode-button-background);
|
background: var(--vscode-button-background);
|
||||||
color: var(--vscode-button-foreground);
|
color: var(--vscode-button-foreground);
|
||||||
|
transition: all 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-btn-primary:hover {
|
.invitation-btn:hover {
|
||||||
background: var(--vscode-button-hoverBackground);
|
background: var(--vscode-button-hoverBackground);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-btn-primary:active {
|
.invitation-btn:active {
|
||||||
transform: scale(0.98);
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
.invitation-btn-primary:disabled {
|
.invitation-btn:disabled {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
transform: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.invitation-btn svg {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -303,9 +392,14 @@ export function getInvitationModalScript(): string {
|
|||||||
submitBtn.addEventListener('click', submitInvitationCode);
|
submitBtn.addEventListener('click', submitInvitationCode);
|
||||||
|
|
||||||
// 点击关闭按钮
|
// 点击关闭按钮
|
||||||
closeBtn.addEventListener('click', function() {
|
if (closeBtn) {
|
||||||
hideInvitationModal();
|
closeBtn.addEventListener('click', function(e) {
|
||||||
});
|
console.log('[InvitationModal] Close button clicked');
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
hideInvitationModal();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 回车键提交
|
// 回车键提交
|
||||||
input.addEventListener('keypress', function(e) {
|
input.addEventListener('keypress', function(e) {
|
||||||
|
|||||||
@ -542,6 +542,12 @@ export function getMessageAreaStyles(): string {
|
|||||||
.tool-segment-content.collapsed {
|
.tool-segment-content.collapsed {
|
||||||
max-height: 0;
|
max-height: 0;
|
||||||
}
|
}
|
||||||
|
.tool-segment-description {
|
||||||
|
margin: 2px 0 0 0px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #fff;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
/* 低调显示的工具调用样式 */
|
/* 低调显示的工具调用样式 */
|
||||||
.segment-tool.low-profile .tool-segment-header {
|
.segment-tool.low-profile .tool-segment-header {
|
||||||
opacity: 0.65;
|
opacity: 0.65;
|
||||||
@ -1064,6 +1070,7 @@ export function getMessageAreaScript(): string {
|
|||||||
const toolResult = segment.toolResult || '';
|
const toolResult = segment.toolResult || '';
|
||||||
const toolCount = segment.toolCount || 1;
|
const toolCount = segment.toolCount || 1;
|
||||||
const countSuffix = toolCount > 1 ? \` x\${toolCount}\` : '';
|
const countSuffix = toolCount > 1 ? \` x\${toolCount}\` : '';
|
||||||
|
const toolDescription = segment.toolDescription || '';
|
||||||
|
|
||||||
// 检查工具结果是否过长(超过一行显示不下)
|
// 检查工具结果是否过长(超过一行显示不下)
|
||||||
const shouldCollapse = toolResult && toolResult.length > 60;
|
const shouldCollapse = toolResult && toolResult.length > 60;
|
||||||
@ -1081,6 +1088,7 @@ export function getMessageAreaScript(): string {
|
|||||||
\${toolResult && !shouldCollapse ? \`<span class="tool-segment-result">\${toolResult}</span>\` : ''}
|
\${toolResult && !shouldCollapse ? \`<span class="tool-segment-result">\${toolResult}</span>\` : ''}
|
||||||
</div>
|
</div>
|
||||||
\${shouldCollapse ? \`<div class="tool-segment-content\${isCollapsed ? ' collapsed' : ''}" style="max-height:\${isCollapsed ? '0' : 'none'}"><span class="tool-segment-result" style="display:block;white-space:pre-wrap;max-width:100%;margin-top:8px;margin-left:18px;">\${toolResult}</span></div>\` : ''}
|
\${shouldCollapse ? \`<div class="tool-segment-content\${isCollapsed ? ' collapsed' : ''}" style="max-height:\${isCollapsed ? '0' : 'none'}"><span class="tool-segment-result" style="display:block;white-space:pre-wrap;max-width:100%;margin-top:8px;margin-left:18px;">\${toolResult}</span></div>\` : ''}
|
||||||
|
\${toolDescription ? \`<p class="tool-segment-description">\${toolDescription}</p>\` : ''}
|
||||||
\`;
|
\`;
|
||||||
|
|
||||||
// 如果是仿真工具且成功完成,尝试添加波形预览
|
// 如果是仿真工具且成功完成,尝试添加波形预览
|
||||||
@ -1328,6 +1336,7 @@ export function getMessageAreaScript(): string {
|
|||||||
const toolResult = segment.toolResult || '';
|
const toolResult = segment.toolResult || '';
|
||||||
const toolCount = segment.toolCount || 1;
|
const toolCount = segment.toolCount || 1;
|
||||||
const countSuffix = toolCount > 1 ? \` x\${toolCount}\` : '';
|
const countSuffix = toolCount > 1 ? \` x\${toolCount}\` : '';
|
||||||
|
const toolDescription = segment.toolDescription || '';
|
||||||
|
|
||||||
// 检查工具结果是否过长(超过一行显示不下)
|
// 检查工具结果是否过长(超过一行显示不下)
|
||||||
const shouldCollapse = toolResult && toolResult.length > 60;
|
const shouldCollapse = toolResult && toolResult.length > 60;
|
||||||
@ -1339,6 +1348,7 @@ export function getMessageAreaScript(): string {
|
|||||||
\${toolResult && !shouldCollapse ? \`<span class="tool-segment-result">\${toolResult}</span>\` : ''}
|
\${toolResult && !shouldCollapse ? \`<span class="tool-segment-result">\${toolResult}</span>\` : ''}
|
||||||
</div>
|
</div>
|
||||||
\${shouldCollapse ? \`<div class="tool-segment-content collapsed"><span class="tool-segment-result" style="display:block;white-space:pre-wrap;max-width:100%;margin-top:8px;margin-left:18px;">\${toolResult}</span></div>\` : ''}
|
\${shouldCollapse ? \`<div class="tool-segment-content collapsed"><span class="tool-segment-result" style="display:block;white-space:pre-wrap;max-width:100%;margin-top:8px;margin-left:18px;">\${toolResult}</span></div>\` : ''}
|
||||||
|
\${toolDescription ? \`<p class="tool-segment-description">\${toolDescription}</p>\` : ''}
|
||||||
\`;
|
\`;
|
||||||
|
|
||||||
// 如果是仿真工具且成功完成,尝试添加波形预览
|
// 如果是仿真工具且成功完成,尝试添加波形预览
|
||||||
|
|||||||
@ -39,7 +39,8 @@ export function getWebviewContent(
|
|||||||
liteIconUri?: string,
|
liteIconUri?: string,
|
||||||
syIconUri?: string,
|
syIconUri?: string,
|
||||||
maxIconUri?: string,
|
maxIconUri?: string,
|
||||||
qrCodeUri?: string
|
qrCodeUri?: string,
|
||||||
|
logoUri?: string,
|
||||||
): string {
|
): string {
|
||||||
// 获取当前环境,只在 dev 和 test 环境下显示快速操作按钮
|
// 获取当前环境,只在 dev 和 test 环境下显示快速操作按钮
|
||||||
const currentEnv = getCurrentEnv();
|
const currentEnv = getCurrentEnv();
|
||||||
@ -399,18 +400,80 @@ export function getWebviewContent(
|
|||||||
.quick-btn:hover {
|
.quick-btn:hover {
|
||||||
background: var(--vscode-button-secondaryHoverBackground);
|
background: var(--vscode-button-secondaryHoverBackground);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 响应式调整 */
|
||||||
|
@media (max-height: 600px) {
|
||||||
|
.header {
|
||||||
|
/* 使用 clamp 动态调整内边距: 最小值 5px, 理想值 2vh, 最大值 20px */
|
||||||
|
padding: clamp(5px, 2vh, 20px) 20px;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
min-height: auto;
|
||||||
|
}
|
||||||
|
.header img {
|
||||||
|
/* 使用 clamp 动态调整图片高度: 最小值 40px, 理想值 10vh, 最大值 60px */
|
||||||
|
max-height: clamp(40px, 10vh, 60px) !important;
|
||||||
|
}
|
||||||
|
.header p {
|
||||||
|
/* 使用 clamp 动态调整字体大小 */
|
||||||
|
font-size: clamp(12px, 2.5vh, 14px) !important;
|
||||||
|
margin-top: clamp(4px, 1.5vh, 8px) !important;
|
||||||
|
line-height: 1.2 !important;
|
||||||
|
margin-bottom: clamp(4px, 1.5vh, 8px) !important;
|
||||||
|
}
|
||||||
|
.quick-actions {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
|
.quick-btn {
|
||||||
|
padding: 4px 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.chat-container {
|
||||||
|
padding: 0 10px 10px 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 高度极小时隐藏描述文本 */
|
||||||
|
@media (max-height: 450px) {
|
||||||
|
.header p {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
.header {
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
.quick-actions {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.header h1 {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
.header p {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.quick-actions {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.chat-container {
|
||||||
|
padding: 0 10px 10px 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
${getConversationHistoryBarContent()}
|
${getConversationHistoryBarContent()}
|
||||||
${getProgressBarContent()}
|
${getProgressBarContent()}
|
||||||
${getInvitationModalContent(qrCodeUri)}
|
${getInvitationModalContent(qrCodeUri, logoUri)}
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div style="display: flex; align-items: center; justify-content: center; gap: 15px;">
|
<div style="display: flex; align-items: center; justify-content: center;">
|
||||||
<img src="${iconUri}" alt="IC Coder" style="width: 48px; height: 48px;" />
|
<img src="${logoUri}" alt="IC Coder" style="max-width: 100%; height: auto; max-height: 80px;" />
|
||||||
<h1 style="margin: 0; font-size: 36px;">IC Coder</h1>
|
|
||||||
</div>
|
</div>
|
||||||
<p style="font-size: 16px; margin-top: 12px;">专注于真实FPGA研发的Verilog智能体编程平台</p>
|
<p style="font-size: 16px; margin-top: 12px; line-height: 1.5;">
|
||||||
|
The <span style="background: linear-gradient(to right, #42bcff, #4A9EFF); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: bold;">Agentic AI</span> Verilog Coding Platform,
|
||||||
|
<span style="display: block; margin-top: 8px;">将芯片设计与验证的效率提升至少20倍!</span>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="chat-container">
|
<div class="chat-container">
|
||||||
|
|||||||
Reference in New Issue
Block a user