update release

This commit is contained in:
duanfuxiang 2025-09-22 18:58:40 +08:00
parent d9923ff890
commit 9e8a9f4c0a
11 changed files with 240 additions and 79 deletions

1
.trunk/actions Symbolic link
View File

@ -0,0 +1 @@
/Users/dfx/.cache/trunk/repos/01f245efe699634f1bfdc90b794bb5b4/actions

1
.trunk/logs Symbolic link
View File

@ -0,0 +1 @@
/Users/dfx/.cache/trunk/repos/01f245efe699634f1bfdc90b794bb5b4/logs

1
.trunk/notifications Symbolic link
View File

@ -0,0 +1 @@
/Users/dfx/.cache/trunk/repos/01f245efe699634f1bfdc90b794bb5b4/notifications

1
.trunk/plugins/trunk Symbolic link
View File

@ -0,0 +1 @@
/Users/dfx/.cache/trunk/plugins/https---github-com-trunk-io-plugins/v1.7.2-4ebadccd80b22638

1
.trunk/tools Symbolic link
View File

@ -0,0 +1 @@
/Users/dfx/.cache/trunk/repos/01f245efe699634f1bfdc90b794bb5b4/tools

View File

@ -1,4 +1,7 @@
releases: releases:
- version: "0.8.4"
features:
- "test mobile version"
- version: "0.8.3" - version: "0.8.3"
features: features:
- "fix this update pro version error" - "fix this update pro version error"

View File

@ -1,7 +1,7 @@
{ {
"id": "infio-copilot", "id": "infio-copilot",
"name": "Infio Copilot", "name": "Infio Copilot",
"version": "0.8.3", "version": "0.8.4",
"minAppVersion": "0.15.0", "minAppVersion": "0.15.0",
"description": "A Cursor-inspired AI assistant for notes that offers smart autocomplete and interactive chat with your selected notes", "description": "A Cursor-inspired AI assistant for notes that offers smart autocomplete and interactive chat with your selected notes",
"author": "Felix.D", "author": "Felix.D",

View File

@ -1,6 +1,6 @@
{ {
"name": "obsidian-infio-copilot", "name": "obsidian-infio-copilot",
"version": "0.8.3", "version": "0.8.4",
"description": "A Cursor-inspired AI assistant that offers smart autocomplete and interactive chat with your selected notes", "description": "A Cursor-inspired AI assistant that offers smart autocomplete and interactive chat with your selected notes",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {

View File

@ -12,6 +12,7 @@ import { getProviderApiUrl } from '../../utils/provider-urls';
import { ApiKeyComponent, CustomUrlComponent } from './FormComponents'; import { ApiKeyComponent, CustomUrlComponent } from './FormComponents';
import { ComboBoxComponent } from './ProviderModelsPicker'; import { ComboBoxComponent } from './ProviderModelsPicker';
import { fetchUserPlan } from '../../hooks/use-infio';
type CustomProviderSettingsProps = { type CustomProviderSettingsProps = {
plugin: InfioPlugin; plugin: InfioPlugin;
@ -199,6 +200,22 @@ const CustomProviderSettings: React.FC<CustomProviderSettingsProps> = ({ plugin,
const { default: LLMManager } = await import('../../core/llm/manager'); const { default: LLMManager } = await import('../../core/llm/manager');
const { GetDefaultModelId } = await import('../../utils/api'); const { GetDefaultModelId } = await import('../../utils/api');
// 对比 infio 使用独特的测试逻辑
if (provider === ApiProvider.Infio) {
const apiKey = settings?.infioProvider?.apiKey?.trim();
if (!apiKey) {
throw new Error('Infio API key is missing');
}
const userPlan = await fetchUserPlan(apiKey);
const plan = String(userPlan?.plan || '').toLowerCase();
if (plan === 'general') {
console.debug('✅ Infio plan is general, skipping further connection tests.');
return; // 直接返回成功
}
}
// 对于Ollama和OpenAICompatible不支持测试API连接 // 对于Ollama和OpenAICompatible不支持测试API连接
if (provider === ApiProvider.Ollama || provider === ApiProvider.OpenAICompatible) { if (provider === ApiProvider.Ollama || provider === ApiProvider.OpenAICompatible) {
throw new Error(t("settings.ModelProvider.testConnection.notSupported", { provider })); throw new Error(t("settings.ModelProvider.testConnection.notSupported", { provider }));

View File

@ -1,4 +1,4 @@
import { Notice, Plugin } from 'obsidian'; import { Notice, Platform, Plugin } from 'obsidian';
import * as React from 'react'; import * as React from 'react';
import { ApiKeyModal } from '../../components/modals/ApiKeyModal'; import { ApiKeyModal } from '../../components/modals/ApiKeyModal';
@ -75,6 +75,10 @@ export default function PluginInfoSettings({
} }
// 执行升级 // 执行升级
// check is mobile platform
if (Platform.isMobile) {
dl_zip = dl_zip.replace('.zip', '.mobile.zip');
}
const result = await upgradeToProVersion(plugin, dl_zip); const result = await upgradeToProVersion(plugin, dl_zip);
if (result.success) { if (result.success) {

View File

@ -158,7 +158,7 @@
.infio-chat-messages-assistant { .infio-chat-messages-assistant {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
/* 防止助手消息超出容器 */ padding: var(--size-2-2);
min-width: 0; min-width: 0;
max-width: 100%; max-width: 100%;
} }
@ -797,17 +797,17 @@ button:not(.clickable-icon).infio-chat-list-dropdown {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: transparent !important; color: var(--text-on-accent-hover);
background-color: var(--interactive-accent-hover);
border: none !important; border: none !important;
box-shadow: none !important; box-shadow: none !important;
color: var(--text-muted);
padding: 0 !important; padding: 0 !important;
margin: 0 !important; margin: 0 !important;
width: 24px !important; width: 24px !important;
height: 24px !important; height: 24px !important;
&:hover { &:hover {
background-color: var(--background-modifier-hover) !important; background-color: var(--interactive-accent-hover) !important;
} }
} }
@ -991,11 +991,15 @@ input[type='text'].infio-chat-list-dropdown-item-title-input {
gap: var(--size-4-1); gap: var(--size-4-1);
} }
/* ===========================================
代码块样式 - 统一管理所有代码块相关样式
=========================================== */
/* 基础代码块容器 */
.infio-chat-code-block { .infio-chat-code-block {
position: relative; position: relative;
border: 1px solid var(--background-modifier-border); border: 1px solid var(--background-modifier-border);
border-radius: var(--radius-s); border-radius: var(--radius-s);
/* 防止代码块内容溢出 */
overflow: hidden; overflow: hidden;
word-wrap: break-word; word-wrap: break-word;
} }
@ -1004,63 +1008,36 @@ input[type='text'].infio-chat-list-dropdown-item-title-input {
padding: 0; padding: 0;
} }
/* 删除冲突的样式定义 */ /* RawMarkdownBlock 专用代码块容器 */
/* RawMarkdownBlock 代码块容器样式 */
.infio-raw-markdown-code-block { .infio-raw-markdown-code-block {
position: relative !important; position: relative;
z-index: 100 !important; /* 提高z-index优先级 */ margin: 0;
margin: 0 !important; padding: 0;
padding: 0 !important;
/* 确保代码块不会被其他元素遮挡 */
clear: both;
overflow: visible;
/* 添加背景色以确保可见性 */
background: transparent;
/* 确保不被截断 */
width: 100%; width: 100%;
overflow: visible;
clear: both;
box-sizing: border-box; box-sizing: border-box;
/* 创建新的层叠上下文避免z-index冲突 */
isolation: isolate;
} }
/* 确保代码块内容正确显示 */ /* RawMarkdownBlock 内的 pre 元素 */
.infio-raw-markdown-code-block pre { .infio-raw-markdown-code-block pre {
position: relative !important; position: relative;
z-index: 101 !important; margin: 0;
margin: 0 !important; padding: 0;
padding: 0 !important; width: 100%;
/* 确保完整显示 */ overflow: visible;
width: 100% !important;
overflow: visible !important;
} }
/* RawMarkdownBlock 内的 code 元素 */
.infio-raw-markdown-code-block code { .infio-raw-markdown-code-block code {
position: relative !important; position: relative;
z-index: 102 !important; display: block;
/* 确保代码内容完整显示 */ width: 100%;
display: block !important;
width: 100% !important;
}
.infio-reasoning-content-wrapper {
/* Height restrictions removed to show full content */
/* 防止推理内容溢出 */
overflow-x: auto;
overflow-y: visible;
}
/* 折叠/展开功能相关样式 */
.infio-reasoning-content-wrapper.collapsed {
max-height: 150px;
overflow-y: auto;
transition: max-height 0.3s ease-in-out;
}
.infio-reasoning-content-wrapper.expanded {
max-height: none;
overflow-y: visible;
transition: max-height 0.3s ease-in-out;
} }
/* 代码块头部样式 */
.infio-chat-code-block-header { .infio-chat-code-block-header {
display: none; display: none;
justify-content: space-between; justify-content: space-between;
@ -1091,6 +1068,7 @@ input[type='text'].infio-chat-list-dropdown-item-title-input {
left: 0; left: 0;
} }
/* 代码块头部文件名样式 */
.infio-chat-code-block-header-filename { .infio-chat-code-block-header-filename {
padding-left: var(--size-4-2); padding-left: var(--size-4-2);
font-size: var(--font-medium); font-size: var(--font-medium);
@ -1107,6 +1085,7 @@ input[type='text'].infio-chat-list-dropdown-item-title-input {
flex-shrink: 0; flex-shrink: 0;
} }
/* 代码块头部按钮样式 */
.infio-chat-code-block-header-button { .infio-chat-code-block-header-button {
display: flex; display: flex;
gap: var(--size-4-1); gap: var(--size-4-1);
@ -1126,9 +1105,7 @@ input[type='text'].infio-chat-list-dropdown-item-title-input {
padding-right: var(--size-4-1); padding-right: var(--size-4-1);
} }
.infio-chat-code-block.has-filename .infio-chat-code-block.has-filename .infio-chat-code-block-header-button button {
.infio-chat-code-block-header-button
button {
box-shadow: none; box-shadow: none;
border: 0; border: 0;
padding: 0 var(--size-4-2); padding: 0 var(--size-4-2);
@ -1137,10 +1114,10 @@ input[type='text'].infio-chat-list-dropdown-item-title-input {
font-size: var(--font-medium); font-size: var(--font-medium);
height: 100%; height: 100%;
cursor: pointer; cursor: pointer;
}
&:hover { .infio-chat-code-block.has-filename .infio-chat-code-block-header-button button:hover {
background-color: var(--background-modifier-hover); background-color: var(--background-modifier-hover);
}
} }
.infio-chat-code-block-header-button button { .infio-chat-code-block-header-button button {
@ -1149,12 +1126,36 @@ input[type='text'].infio-chat-list-dropdown-item-title-input {
font-size: var(--font-ui-smaller); font-size: var(--font-ui-smaller);
} }
/* 代码块内容样式 */
.infio-chat-code-block-content {
margin: 0;
}
/* 特殊按钮样式 */
.infio-dataview-query-button { .infio-dataview-query-button {
color: #008000; color: #008000;
} }
.infio-chat-code-block-content { /* ===========================================
margin: 0; 推理内容包装器样式
=========================================== */
.infio-reasoning-content-wrapper {
overflow-x: auto;
overflow-y: visible;
}
/* 折叠/展开功能相关样式 */
.infio-reasoning-content-wrapper.collapsed {
max-height: 150px;
overflow-y: auto;
transition: max-height 0.3s ease-in-out;
}
.infio-reasoning-content-wrapper.expanded {
max-height: none;
overflow-y: visible;
transition: max-height 0.3s ease-in-out;
} }
/* Read File Block - Minimal styling for better integration */ /* Read File Block - Minimal styling for better integration */
@ -1556,7 +1557,7 @@ input[type='text'].infio-chat-list-dropdown-item-title-input {
.infio-search-lexical-content-editable-root { .infio-search-lexical-content-editable-root {
min-height: 36px; min-height: 36px;
max-height: 500px; max-height: 120px;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
/* 确保编辑器不会影响外部滚动 */ /* 确保编辑器不会影响外部滚动 */
@ -2997,10 +2998,8 @@ button.infio-chat-input-model-select {
} }
.infio-commands-header-title { .infio-commands-header-title {
color: var(--text-normal); margin: 0;
font-size: 28px; font-size: 24px;
font-weight: 500;
margin: 0 0 var(--size-4-3) 0;
} }
.infio-commands-label { .infio-commands-label {
@ -3656,18 +3655,18 @@ button.infio-chat-input-model-select {
.infio-markdown-actions { .infio-markdown-actions {
position: absolute; position: absolute;
top: 8px; bottom: 1px;
right: 8px; right: 1px;
display: flex; display: flex;
gap: 4px; gap: 4px;
opacity: 0; opacity: 0.7;
visibility: hidden; visibility: visible;
transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
padding: 0px; padding: 0px;
z-index: 50; /* 降低z-index确保不会遮挡代码块 */ z-index: 10; /* 降低z-index确保不会遮挡代码块 */
/* 确保不会遮挡代码块 */ /* 确保不会遮挡代码块 */
pointer-events: none; pointer-events: none;
} }
.infio-markdown-actions button { .infio-markdown-actions button {
display: flex; display: flex;
align-items: center; align-items: center;
@ -3678,19 +3677,19 @@ button.infio-chat-input-model-select {
background-color: transparent; background-color: transparent;
border-color: transparent; border-color: transparent;
box-shadow: none; box-shadow: none;
color: var(--text-faint); color: var(--text-muted);
border-radius: var(--radius-s);
cursor: pointer; cursor: pointer;
/* 恢复按钮的点击事件 */ /* 恢复按钮的点击事件 */
pointer-events: auto; pointer-events: auto;
&:hover { &:hover {
background-color: var(--background-modifier-hover); background-color: var(--interactive-accent-hover);
} }
} }
.infio-chat-message-actions-icon--copied { .infio-chat-message-actions-icon--copied {
color: var(--text-muted); color: var(--text-muted);
}
} }
.infio-markdown-container-with-actions:hover .infio-markdown-actions { .infio-markdown-container-with-actions:hover .infio-markdown-actions {
@ -3958,3 +3957,136 @@ button.infio-chat-input-model-select {
transform: translateY(0); transform: translateY(0);
} }
} }
/* Structured Progress Styles */
.infio-structured-progress {
padding: 16px;
background-color: var(--background-secondary);
border: 1px solid var(--background-modifier-border);
border-radius: var(--radius-m);
margin: 12px 0;
}
.infio-progress-steps {
display: flex;
flex-direction: column;
gap: 0;
}
.infio-progress-step {
display: flex;
align-items: flex-start;
position: relative;
min-height: 60px;
}
.infio-progress-step-indicator {
display: flex;
flex-direction: column;
align-items: center;
margin-right: 16px;
position: relative;
flex-shrink: 0;
}
.infio-progress-step-icon {
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
z-index: 2;
position: relative;
}
.infio-progress-step-line {
width: 2px;
height: 40px;
background-color: var(--background-modifier-border);
margin-top: 8px;
}
.infio-progress-step-line.completed {
background-color: var(--color-green, #28a745);
}
.infio-progress-step-content {
flex: 1;
min-width: 0;
padding-top: 4px;
}
.infio-progress-step-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 4px;
}
.infio-progress-step-title {
font-size: var(--font-ui-medium);
font-weight: 600;
color: var(--text-normal);
margin: 0;
line-height: 1.3;
}
.infio-progress-step.running .infio-progress-step-title {
color: var(--interactive-accent);
}
.infio-progress-step-counter {
font-size: var(--font-ui-small);
color: var(--text-muted);
font-family: var(--font-monospace);
background-color: var(--background-modifier-border);
padding: 2px 6px;
border-radius: var(--radius-s);
}
.infio-progress-step-description {
font-size: var(--font-ui-small);
color: var(--text-muted);
margin: 4px 0 0 0;
line-height: 1.4;
}
.infio-progress-step-details {
font-size: var(--font-ui-smaller);
color: var(--text-faint);
margin: 2px 0 0 0;
line-height: 1.3;
font-family: var(--font-monospace);
}
.infio-progress-step-bar {
width: 100%;
height: 4px;
background-color: var(--background-modifier-border);
border-radius: 2px;
margin-top: 8px;
overflow: hidden;
}
.infio-progress-step-bar-fill {
height: 100%;
background-color: var(--interactive-accent);
border-radius: 2px;
transition: width 0.3s ease;
}
/* Tool result content display */
.infio-tool-result-content {
font-family: var(--font-monospace);
font-size: 13px;
line-height: 1.5;
margin: 0;
padding: 12px;
background-color: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: var(--radius-s);
white-space: pre-wrap;
word-break: break-word;
overflow: auto;
}