Skip to content

Commit 53eb40e

Browse files
chore: sync public assets from main@47316e8
1 parent a3f43c5 commit 53eb40e

21 files changed

Lines changed: 44 additions & 34 deletions

File tree

Plugin/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
## 使用前提
2424

2525
- RedBox 桌面端必须已经启动。
26-
- 桌面端会在本地开启 `http://127.0.0.1:31937/api/knowledge` 供插件写入知识库。
26+
- 当前桌面端会在本地开启 `http://127.0.0.1:31937/api/knowledge` 供插件写入知识库。
2727

2828
## 使用方式
2929

Plugin/background.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
const KNOWLEDGE_API_CANDIDATES = [
22
{
3-
baseUrl: 'http://127.0.0.1:23456',
3+
baseUrl: 'http://127.0.0.1:31937',
44
endpointPath: '/api/knowledge',
55
},
66
{
7-
baseUrl: 'http://localhost:23456',
7+
baseUrl: 'http://localhost:31937',
88
endpointPath: '/api/knowledge',
99
},
1010
{
11-
baseUrl: 'http://127.0.0.1:31937',
11+
baseUrl: 'http://127.0.0.1:23456',
1212
endpointPath: '/api/knowledge',
1313
},
1414
{
15-
baseUrl: 'http://localhost:31937',
15+
baseUrl: 'http://localhost:23456',
1616
endpointPath: '/api/knowledge',
1717
},
1818
];
@@ -626,7 +626,7 @@ async function resolveKnowledgeApiEndpoint(forceRefresh = false) {
626626
throw new Error(
627627
`未连接到 RedBox Knowledge API。已尝试: ${attemptedUrls.join(', ')}。` +
628628
`最后错误: ${lastError?.message || 'unknown error'}。` +
629-
' 请确认桌面应用已启动,并且 assistant daemon 正在监听 127.0.0.1:31937。'
629+
' 请确认 RedBox 桌面端已启动,并且本地 Knowledge API 正在监听 127.0.0.1:31937。'
630630
);
631631
}
632632

Plugin/manifest.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 3,
33
"name": "RedBox Capture",
44
"description": "将网页、链接、选中文字、图片、小红书和 YouTube 内容直接保存到 RedBox 知识库或素材库。",
5-
"version": "1.9.3",
5+
"version": "1.9.4",
66
"icons": {
77
"16": "icons/icon16.png",
88
"32": "icons/icon32.png",
@@ -20,6 +20,8 @@
2020
"host_permissions": [
2121
"http://127.0.0.1:31937/*",
2222
"http://localhost:31937/*",
23+
"http://127.0.0.1:23456/*",
24+
"http://localhost:23456/*",
2325
"https://raw.githubusercontent.com/*"
2426
],
2527
"background": {

desktop/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
node_modules/
2+
dist/
3+
dist-electron/
4+
release/
5+
.private-runtime/
6+
.plugin-runtime/
7+
.opencode/
8+
.redbox-dev/
9+
.DS_Store
10+
.env.local
11+
.env.*.local
12+
developer_id.key
13+
developer_id.certSigningRequest

desktop/.redbox-dev/tool-diagnostics/sample.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

desktop/.redbox-dev/tool-diagnostics/written.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

desktop/electron/core/skillManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ export class SkillManager {
9090
}
9191

9292
private async discoverBuiltinSkills(): Promise<SkillDefinition[]> {
93-
const cwdBuiltin = path.join(process.cwd(), 'desktop', 'electron', 'builtin-skills');
94-
const cwdSystem = path.join(process.cwd(), 'desktop', 'electron', 'system-skills');
93+
const cwdBuiltin = path.join(process.cwd(), 'archive', 'desktop-electron', 'electron', 'builtin-skills');
94+
const cwdSystem = path.join(process.cwd(), 'archive', 'desktop-electron', 'electron', 'system-skills');
9595
const runtimeBuiltin = path.join(__dirname, 'builtin-skills');
9696
const runtimeSystem = path.join(__dirname, '..', 'system-skills');
9797
const packagedSystem = path.join(__dirname, '..', '..', 'electron', 'system-skills');

desktop/electron/core/systemSkillAssetStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export type InternalSkillBundle = {
1616

1717
const resolveInternalSkillRoot = (skillName: string): string => {
1818
const candidates = [
19-
path.join(process.cwd(), 'desktop', 'electron', 'system-skills', skillName),
19+
path.join(process.cwd(), 'archive', 'desktop-electron', 'electron', 'system-skills', skillName),
2020
path.join(app.getAppPath(), 'electron', 'system-skills', skillName),
2121
path.join(__dirname, '..', 'system-skills', skillName),
2222
];

desktop/electron/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ const getBundledBrowserPluginCandidateDirs = (): string[] => {
680680
path.join(resourcesPath, BROWSER_PLUGIN_BUNDLE_RELATIVE_PATH),
681681
path.join(appPath, BROWSER_PLUGIN_BUNDLE_RELATIVE_PATH),
682682
path.join(process.cwd(), BROWSER_PLUGIN_BUNDLE_RELATIVE_PATH),
683-
path.join(process.cwd(), 'desktop', BROWSER_PLUGIN_BUNDLE_RELATIVE_PATH),
683+
path.join(process.cwd(), 'archive', 'desktop-electron', BROWSER_PLUGIN_BUNDLE_RELATIVE_PATH),
684684
path.join(process.cwd(), 'Plugin'),
685685
path.join(path.resolve(appPath, '..'), 'Plugin'),
686686
];
@@ -1045,7 +1045,7 @@ async function checkForAppUpdate(force = false, forceNotify = false): Promise<Ap
10451045
function createWindow() {
10461046
attachWorkItemStoreListeners();
10471047
const iconPath = path.join(app.getAppPath(), 'redbox.png');
1048-
const devIconPath = path.join(process.cwd(), 'desktop', 'redbox.png');
1048+
const devIconPath = path.join(process.cwd(), 'archive', 'desktop-electron', 'redbox.png');
10491049
const resolvedIconPath = app.isPackaged ? iconPath : devIconPath;
10501050

10511051
win = new BrowserWindow({

desktop/electron/officialFeatureBridge.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const getOfficialRuntimeCandidates = (): string[] => {
4141
return [
4242
path.resolve(__dirname, '..', relativeRuntimePath),
4343
path.resolve(process.cwd(), relativeRuntimePath),
44-
path.resolve(process.cwd(), 'desktop', relativeRuntimePath),
44+
path.resolve(process.cwd(), 'archive', 'desktop-electron', relativeRuntimePath),
4545
];
4646
};
4747

0 commit comments

Comments
 (0)