Merge branch 'main' into feat-knowlege-ocr
This commit is contained in:
+1
-1
@@ -96,7 +96,7 @@
|
||||
"pdf-to-img": "^4.4.0",
|
||||
"pdfjs-dist": "4.2.67",
|
||||
"proxy-agent": "^6.5.0",
|
||||
"selection-hook": "^0.9.19",
|
||||
"selection-hook": "^0.9.20",
|
||||
"tar": "^7.4.3",
|
||||
"turndown": "^7.2.0",
|
||||
"webdav": "^5.8.0",
|
||||
|
||||
+11
-1
@@ -6,7 +6,7 @@ import { app } from 'electron'
|
||||
import installExtension, { REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS } from 'electron-devtools-installer'
|
||||
import Logger from 'electron-log'
|
||||
|
||||
import { isDev } from './constant'
|
||||
import { isDev, isWin } from './constant'
|
||||
import { registerIpc } from './ipc'
|
||||
import { configManager } from './services/ConfigManager'
|
||||
import mcpService from './services/MCPService'
|
||||
@@ -24,6 +24,16 @@ import { setUserDataDir } from './utils/file'
|
||||
|
||||
Logger.initialize()
|
||||
|
||||
/**
|
||||
* Disable chromium's window animations
|
||||
* main purpose for this is to avoid the transparent window flashing when it is shown
|
||||
* (especially on Windows for SelectionAssistant Toolbar)
|
||||
* Know Issue: https://github.com/electron/electron/issues/12130#issuecomment-627198990
|
||||
*/
|
||||
if (isWin) {
|
||||
app.commandLine.appendSwitch('wm-window-animations-disabled')
|
||||
}
|
||||
|
||||
// in production mode, handle uncaught exception and unhandled rejection globally
|
||||
if (!isDev) {
|
||||
// handle uncaught exception
|
||||
|
||||
@@ -10,3 +10,7 @@
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.context-menu-container {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@@ -306,9 +306,14 @@ mjx-container {
|
||||
|
||||
/* CodeMirror 相关样式 */
|
||||
.cm-editor {
|
||||
border-radius: 5px;
|
||||
|
||||
&.cm-focused {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.cm-scroller {
|
||||
font-family: var(--code-font-family);
|
||||
padding: 1px;
|
||||
border-radius: 5px;
|
||||
|
||||
.cm-gutters {
|
||||
|
||||
@@ -231,7 +231,6 @@ const ContentContainer = styled.div<{
|
||||
$wrap: boolean
|
||||
$fadeIn: boolean
|
||||
}>`
|
||||
display: block;
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
border: 0.5px solid transparent;
|
||||
@@ -239,12 +238,11 @@ const ContentContainer = styled.div<{
|
||||
margin-top: 0;
|
||||
|
||||
.shiki {
|
||||
display: flex;
|
||||
min-width: 100%;
|
||||
padding: 1em;
|
||||
|
||||
code {
|
||||
display: block;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.line {
|
||||
display: block;
|
||||
|
||||
@@ -249,8 +249,8 @@ const CodeBlockView: React.FC<Props> = ({ children, language, onSave }) => {
|
||||
}
|
||||
|
||||
const CodeBlockWrapper = styled.div<{ $isInSpecialView: boolean }>`
|
||||
/* FIXME: 在 bubble style 中撑开一些宽度*/
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.code-toolbar {
|
||||
background-color: ${(props) => (props.$isInSpecialView ? 'transparent' : 'var(--color-background-mute)')};
|
||||
@@ -285,13 +285,10 @@ const CodeHeader = styled.div<{ $isInSpecialView: boolean }>`
|
||||
|
||||
const SplitViewWrapper = styled.div`
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
||||
> * {
|
||||
flex: 1 1 0;
|
||||
width: 0;
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
flex: 1 1 auto;
|
||||
width: 100%;
|
||||
}
|
||||
`
|
||||
|
||||
|
||||
@@ -224,11 +224,10 @@ const CodeEditor = ({
|
||||
...customBasicSetup // override basicSetup
|
||||
}}
|
||||
style={{
|
||||
...style,
|
||||
fontSize: `${fontSize - 1}px`,
|
||||
border: '0.5px solid transparent',
|
||||
borderRadius: '5px',
|
||||
marginTop: 0,
|
||||
...style
|
||||
marginTop: 0
|
||||
}}
|
||||
/>
|
||||
)
|
||||
|
||||
@@ -59,6 +59,7 @@ const CheckboxWrapper = styled.div`
|
||||
|
||||
const MessageContent = styled.div<{ isMultiSelectMode: boolean }>`
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
${(props) => props.isMultiSelectMode && 'margin-left: 8px;'}
|
||||
`
|
||||
|
||||
|
||||
@@ -405,11 +405,11 @@ export const exportMarkdownToYuque = async (title: string, content: string) => {
|
||||
export const exportMarkdownToObsidian = async (attributes: any) => {
|
||||
try {
|
||||
// 从参数获取Vault名称
|
||||
const obsidianValut = attributes.vault
|
||||
const obsidianVault = attributes.vault
|
||||
let obsidianFolder = attributes.folder || ''
|
||||
let isMarkdownFile = false
|
||||
|
||||
if (!obsidianValut) {
|
||||
if (!obsidianVault) {
|
||||
window.message.error(i18n.t('chat.topics.export.obsidian_not_configured'))
|
||||
return
|
||||
}
|
||||
@@ -441,7 +441,7 @@ export const exportMarkdownToObsidian = async (attributes: any) => {
|
||||
filePath = obsidianFolder + fileName + '.md'
|
||||
}
|
||||
|
||||
let obsidianUrl = `obsidian://new?file=${encodeURIComponent(filePath)}&vault=${encodeURIComponent(obsidianValut)}&clipboard`
|
||||
let obsidianUrl = `obsidian://new?file=${encodeURIComponent(filePath)}&vault=${encodeURIComponent(obsidianVault)}&clipboard`
|
||||
|
||||
if (attributes.processingMethod === '3') {
|
||||
obsidianUrl += '&overwrite=true'
|
||||
|
||||
@@ -5694,7 +5694,7 @@ __metadata:
|
||||
remark-math: "npm:^6.0.0"
|
||||
rollup-plugin-visualizer: "npm:^5.12.0"
|
||||
sass: "npm:^1.88.0"
|
||||
selection-hook: "npm:^0.9.19"
|
||||
selection-hook: "npm:^0.9.20"
|
||||
shiki: "npm:^3.4.2"
|
||||
string-width: "npm:^7.2.0"
|
||||
styled-components: "npm:^6.1.11"
|
||||
@@ -16543,13 +16543,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"selection-hook@npm:^0.9.19":
|
||||
version: 0.9.19
|
||||
resolution: "selection-hook@npm:0.9.19"
|
||||
"selection-hook@npm:^0.9.20":
|
||||
version: 0.9.20
|
||||
resolution: "selection-hook@npm:0.9.20"
|
||||
dependencies:
|
||||
node-gyp: "npm:latest"
|
||||
node-gyp-build: "npm:^4.8.4"
|
||||
checksum: 10c0/e90889b5b76e96b45a7c04429621346b5296e41d821e57b72178e6f93e622298288cd9586bd79273320fd26f98cc7ffb44496e0b66430b6dfcdc9b875c2c0d3f
|
||||
checksum: 10c0/2508fc5093a735467bd7082ae84432e2b7d8675d194f9bcf74dab755a63f72ffcbbeee2784297402fbb295faddd590b0333ca290b37047d8af25ed584cd04e60
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user