mirror of
https://github.com/toeverything/AFFiNE.git
synced 2025-10-26 11:37:06 +00:00
feat(server): add doc meta for semantic search (#13174)
Some checks are pending
Build & Test / Analyze (javascript, affine) (push) Waiting to run
Build & Test / Analyze (javascript, blocksuite) (push) Waiting to run
Build & Test / Analyze (typescript, affine) (push) Waiting to run
Build & Test / Analyze (typescript, blocksuite) (push) Waiting to run
Build & Test / Lint (push) Waiting to run
Build & Test / Typecheck (push) Waiting to run
Build & Test / Lint Rust (push) Waiting to run
Build & Test / Check Git Status (push) Blocked by required conditions
Build & Test / Check yarn binary (push) Waiting to run
Build & Test / E2E BlockSuite Test (1) (push) Waiting to run
Build & Test / E2E BlockSuite Test (10) (push) Waiting to run
Build & Test / E2E BlockSuite Test (2) (push) Waiting to run
Build & Test / E2E BlockSuite Test (3) (push) Waiting to run
Build & Test / E2E BlockSuite Test (4) (push) Waiting to run
Build & Test / E2E BlockSuite Test (5) (push) Waiting to run
Build & Test / E2E BlockSuite Test (6) (push) Waiting to run
Build & Test / E2E BlockSuite Test (7) (push) Waiting to run
Build & Test / E2E BlockSuite Test (8) (push) Waiting to run
Build & Test / E2E BlockSuite Test (9) (push) Waiting to run
Build & Test / E2E BlockSuite Cross Browser Test (chromium, 1) (push) Waiting to run
Build & Test / E2E BlockSuite Cross Browser Test (chromium, 2) (push) Waiting to run
Build & Test / E2E BlockSuite Cross Browser Test (firefox, 1) (push) Waiting to run
Build & Test / E2E BlockSuite Cross Browser Test (firefox, 2) (push) Waiting to run
Build & Test / E2E BlockSuite Cross Browser Test (webkit, 1) (push) Waiting to run
Build & Test / E2E BlockSuite Cross Browser Test (webkit, 2) (push) Waiting to run
Build & Test / E2E Test (1) (push) Waiting to run
Build & Test / E2E Test (10) (push) Waiting to run
Build & Test / E2E Test (2) (push) Waiting to run
Build & Test / E2E Test (3) (push) Waiting to run
Build & Test / E2E Test (4) (push) Waiting to run
Build & Test / E2E Test (5) (push) Waiting to run
Build & Test / E2E Test (6) (push) Waiting to run
Build & Test / E2E Test (7) (push) Waiting to run
Build & Test / E2E Test (8) (push) Waiting to run
Build & Test / E2E Test (9) (push) Waiting to run
Build & Test / E2E Mobile Test (1) (push) Waiting to run
Build & Test / E2E Mobile Test (2) (push) Waiting to run
Build & Test / E2E Mobile Test (3) (push) Waiting to run
Build & Test / E2E Mobile Test (4) (push) Waiting to run
Build & Test / E2E Mobile Test (5) (push) Waiting to run
Build & Test / Unit Test (1) (push) Blocked by required conditions
Build & Test / Unit Test (2) (push) Blocked by required conditions
Build & Test / Unit Test (3) (push) Blocked by required conditions
Build & Test / Unit Test (4) (push) Blocked by required conditions
Build & Test / Unit Test (5) (push) Blocked by required conditions
Build & Test / Build AFFiNE native (${{ matrix.spec.target }}) (map[os:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Build & Test / Build AFFiNE native (${{ matrix.spec.target }}) (map[os:macos-latest target:x86_64-apple-darwin]) (push) Waiting to run
Build & Test / Build AFFiNE native (${{ matrix.spec.target }}) (map[os:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Build & Test / Build AFFiNE native (${{ matrix.spec.target }}) (map[os:windows-latest target:aarch64-pc-windows-msvc]) (push) Waiting to run
Build & Test / Build AFFiNE native (${{ matrix.spec.target }}) (map[os:windows-latest target:x86_64-pc-windows-msvc]) (push) Waiting to run
Build & Test / Build Server native (push) Waiting to run
Build & Test / Build @affine/electron renderer (push) Waiting to run
Build & Test / Native Unit Test (push) Blocked by required conditions
Build & Test / Server Test (0, 8) (push) Blocked by required conditions
Build & Test / Server Test (1, 8) (push) Blocked by required conditions
Build & Test / Server Test (2, 8) (push) Blocked by required conditions
Build & Test / Server Test (3, 8) (push) Blocked by required conditions
Build & Test / Server Test (4, 8) (push) Blocked by required conditions
Build & Test / Server Test (5, 8) (push) Blocked by required conditions
Build & Test / Server Test (6, 8) (push) Blocked by required conditions
Build & Test / Server Test (7, 8) (push) Blocked by required conditions
Build & Test / Server Test with Elasticsearch (push) Blocked by required conditions
Build & Test / Server E2E Test (push) Blocked by required conditions
Build & Test / miri code check (push) Waiting to run
Build & Test / loom thread test (push) Waiting to run
Build & Test / fuzzing (push) Waiting to run
Build & Test / y-octo binding test on ${{ matrix.settings.target }} (map[os:macos-13 target:x86_64-apple-darwin]) (push) Waiting to run
Build & Test / y-octo binding test on ${{ matrix.settings.target }} (map[os:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Build & Test / y-octo binding test on ${{ matrix.settings.target }} (map[os:ubuntu-24.04-arm target:aarch64-unknown-linux-gnu]) (push) Waiting to run
Build & Test / y-octo binding test on ${{ matrix.settings.target }} (map[os:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Build & Test / y-octo binding test on ${{ matrix.settings.target }} (map[os:windows-11-arm target:aarch64-pc-windows-msvc]) (push) Waiting to run
Build & Test / y-octo binding test on ${{ matrix.settings.target }} (map[os:windows-latest target:x86_64-pc-windows-msvc]) (push) Waiting to run
Build & Test / Run native tests (push) Waiting to run
Build & Test / Server Copilot Api Test (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (1, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (10, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (2, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (3, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (4, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (5, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (6, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (7, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (8, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (9, 10) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud Desktop E2E Test script:yarn affine @affine/electron build:dev
# Workaround for Electron apps failing to initialize on Ubuntu 24.04 due to AppArmor restrictions
# Disables unprivileged user namespaces restrictio… (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 1/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=1/10 shard:1]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 10/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=10/10 shard:10]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 2/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=2/10 shard:2]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 3/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=3/10 shard:3]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 4/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=4/10 shard:4]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 5/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=5/10 shard:5]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 6/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=6/10 shard:6]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 7/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=7/10 shard:7]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 8/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=8/10 shard:8]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 9/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=9/10 shard:9]) (push) Blocked by required conditions
Build & Test / Desktop Test (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:arm64 os:macos-latest platform:macos target:aarch64-apple-darwin test:true]) (push) Blocked by required conditions
Build & Test / Desktop Test (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:x64 os:macos-latest platform:macos target:x86_64-apple-darwin test:false]) (push) Blocked by required conditions
Build & Test / Desktop Test (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:x64 os:ubuntu-latest platform:linux target:x86_64-unknown-linux-gnu test:true]) (push) Blocked by required conditions
Build & Test / Desktop Test (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:x64 os:windows-latest platform:windows target:x86_64-pc-windows-msvc test:true]) (push) Blocked by required conditions
Build & Test / Desktop bundle check (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:arm64 os:macos-latest platform:macos target:aarch64-apple-darwin test:true]) (push) Blocked by required conditions
Build & Test / Desktop bundle check (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:x64 os:macos-latest platform:macos target:x86_64-apple-darwin test:false]) (push) Blocked by required conditions
Build & Test / Desktop bundle check (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:x64 os:ubuntu-latest platform:linux target:x86_64-unknown-linux-gnu test:true]) (push) Blocked by required conditions
Build & Test / Desktop bundle check (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:x64 os:windows-latest platform:windows target:x86_64-pc-windows-msvc test:true]) (push) Blocked by required conditions
Build & Test / 3, 2, 1 Launch (push) Blocked by required conditions
Sync I18n with Crowdin / synchronize-with-crowdin (push) Waiting to run
Sync I18n with Crowdin / i18n-codegen (push) Blocked by required conditions
Some checks are pending
Build & Test / Analyze (javascript, affine) (push) Waiting to run
Build & Test / Analyze (javascript, blocksuite) (push) Waiting to run
Build & Test / Analyze (typescript, affine) (push) Waiting to run
Build & Test / Analyze (typescript, blocksuite) (push) Waiting to run
Build & Test / Lint (push) Waiting to run
Build & Test / Typecheck (push) Waiting to run
Build & Test / Lint Rust (push) Waiting to run
Build & Test / Check Git Status (push) Blocked by required conditions
Build & Test / Check yarn binary (push) Waiting to run
Build & Test / E2E BlockSuite Test (1) (push) Waiting to run
Build & Test / E2E BlockSuite Test (10) (push) Waiting to run
Build & Test / E2E BlockSuite Test (2) (push) Waiting to run
Build & Test / E2E BlockSuite Test (3) (push) Waiting to run
Build & Test / E2E BlockSuite Test (4) (push) Waiting to run
Build & Test / E2E BlockSuite Test (5) (push) Waiting to run
Build & Test / E2E BlockSuite Test (6) (push) Waiting to run
Build & Test / E2E BlockSuite Test (7) (push) Waiting to run
Build & Test / E2E BlockSuite Test (8) (push) Waiting to run
Build & Test / E2E BlockSuite Test (9) (push) Waiting to run
Build & Test / E2E BlockSuite Cross Browser Test (chromium, 1) (push) Waiting to run
Build & Test / E2E BlockSuite Cross Browser Test (chromium, 2) (push) Waiting to run
Build & Test / E2E BlockSuite Cross Browser Test (firefox, 1) (push) Waiting to run
Build & Test / E2E BlockSuite Cross Browser Test (firefox, 2) (push) Waiting to run
Build & Test / E2E BlockSuite Cross Browser Test (webkit, 1) (push) Waiting to run
Build & Test / E2E BlockSuite Cross Browser Test (webkit, 2) (push) Waiting to run
Build & Test / E2E Test (1) (push) Waiting to run
Build & Test / E2E Test (10) (push) Waiting to run
Build & Test / E2E Test (2) (push) Waiting to run
Build & Test / E2E Test (3) (push) Waiting to run
Build & Test / E2E Test (4) (push) Waiting to run
Build & Test / E2E Test (5) (push) Waiting to run
Build & Test / E2E Test (6) (push) Waiting to run
Build & Test / E2E Test (7) (push) Waiting to run
Build & Test / E2E Test (8) (push) Waiting to run
Build & Test / E2E Test (9) (push) Waiting to run
Build & Test / E2E Mobile Test (1) (push) Waiting to run
Build & Test / E2E Mobile Test (2) (push) Waiting to run
Build & Test / E2E Mobile Test (3) (push) Waiting to run
Build & Test / E2E Mobile Test (4) (push) Waiting to run
Build & Test / E2E Mobile Test (5) (push) Waiting to run
Build & Test / Unit Test (1) (push) Blocked by required conditions
Build & Test / Unit Test (2) (push) Blocked by required conditions
Build & Test / Unit Test (3) (push) Blocked by required conditions
Build & Test / Unit Test (4) (push) Blocked by required conditions
Build & Test / Unit Test (5) (push) Blocked by required conditions
Build & Test / Build AFFiNE native (${{ matrix.spec.target }}) (map[os:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Build & Test / Build AFFiNE native (${{ matrix.spec.target }}) (map[os:macos-latest target:x86_64-apple-darwin]) (push) Waiting to run
Build & Test / Build AFFiNE native (${{ matrix.spec.target }}) (map[os:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Build & Test / Build AFFiNE native (${{ matrix.spec.target }}) (map[os:windows-latest target:aarch64-pc-windows-msvc]) (push) Waiting to run
Build & Test / Build AFFiNE native (${{ matrix.spec.target }}) (map[os:windows-latest target:x86_64-pc-windows-msvc]) (push) Waiting to run
Build & Test / Build Server native (push) Waiting to run
Build & Test / Build @affine/electron renderer (push) Waiting to run
Build & Test / Native Unit Test (push) Blocked by required conditions
Build & Test / Server Test (0, 8) (push) Blocked by required conditions
Build & Test / Server Test (1, 8) (push) Blocked by required conditions
Build & Test / Server Test (2, 8) (push) Blocked by required conditions
Build & Test / Server Test (3, 8) (push) Blocked by required conditions
Build & Test / Server Test (4, 8) (push) Blocked by required conditions
Build & Test / Server Test (5, 8) (push) Blocked by required conditions
Build & Test / Server Test (6, 8) (push) Blocked by required conditions
Build & Test / Server Test (7, 8) (push) Blocked by required conditions
Build & Test / Server Test with Elasticsearch (push) Blocked by required conditions
Build & Test / Server E2E Test (push) Blocked by required conditions
Build & Test / miri code check (push) Waiting to run
Build & Test / loom thread test (push) Waiting to run
Build & Test / fuzzing (push) Waiting to run
Build & Test / y-octo binding test on ${{ matrix.settings.target }} (map[os:macos-13 target:x86_64-apple-darwin]) (push) Waiting to run
Build & Test / y-octo binding test on ${{ matrix.settings.target }} (map[os:macos-latest target:aarch64-apple-darwin]) (push) Waiting to run
Build & Test / y-octo binding test on ${{ matrix.settings.target }} (map[os:ubuntu-24.04-arm target:aarch64-unknown-linux-gnu]) (push) Waiting to run
Build & Test / y-octo binding test on ${{ matrix.settings.target }} (map[os:ubuntu-latest target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Build & Test / y-octo binding test on ${{ matrix.settings.target }} (map[os:windows-11-arm target:aarch64-pc-windows-msvc]) (push) Waiting to run
Build & Test / y-octo binding test on ${{ matrix.settings.target }} (map[os:windows-latest target:x86_64-pc-windows-msvc]) (push) Waiting to run
Build & Test / Run native tests (push) Waiting to run
Build & Test / Server Copilot Api Test (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (1, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (10, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (2, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (3, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (4, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (5, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (6, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (7, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (8, 10) (push) Blocked by required conditions
Build & Test / Frontend Copilot E2E Test (9, 10) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud Desktop E2E Test script:yarn affine @affine/electron build:dev
# Workaround for Electron apps failing to initialize on Ubuntu 24.04 due to AppArmor restrictions
# Disables unprivileged user namespaces restrictio… (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 1/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=1/10 shard:1]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 10/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=10/10 shard:10]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 2/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=2/10 shard:2]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 3/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=3/10 shard:3]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 4/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=4/10 shard:4]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 5/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=5/10 shard:5]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 6/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=6/10 shard:6]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 7/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=7/10 shard:7]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 8/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=8/10 shard:8]) (push) Blocked by required conditions
Build & Test / ${{ matrix.tests.name }} (map[name:Cloud E2E Test 9/10 script:yarn affine @affine-test/affine-cloud e2e --forbid-only --shard=9/10 shard:9]) (push) Blocked by required conditions
Build & Test / Desktop Test (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:arm64 os:macos-latest platform:macos target:aarch64-apple-darwin test:true]) (push) Blocked by required conditions
Build & Test / Desktop Test (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:x64 os:macos-latest platform:macos target:x86_64-apple-darwin test:false]) (push) Blocked by required conditions
Build & Test / Desktop Test (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:x64 os:ubuntu-latest platform:linux target:x86_64-unknown-linux-gnu test:true]) (push) Blocked by required conditions
Build & Test / Desktop Test (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:x64 os:windows-latest platform:windows target:x86_64-pc-windows-msvc test:true]) (push) Blocked by required conditions
Build & Test / Desktop bundle check (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:arm64 os:macos-latest platform:macos target:aarch64-apple-darwin test:true]) (push) Blocked by required conditions
Build & Test / Desktop bundle check (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:x64 os:macos-latest platform:macos target:x86_64-apple-darwin test:false]) (push) Blocked by required conditions
Build & Test / Desktop bundle check (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:x64 os:ubuntu-latest platform:linux target:x86_64-unknown-linux-gnu test:true]) (push) Blocked by required conditions
Build & Test / Desktop bundle check (${{ matrix.spec.os }}, ${{ matrix.spec.platform }}, ${{ matrix.spec.arch }}, ${{ matrix.spec.target }}, ${{ matrix.spec.test }}) (map[arch:x64 os:windows-latest platform:windows target:x86_64-pc-windows-msvc test:true]) (push) Blocked by required conditions
Build & Test / 3, 2, 1 Launch (push) Blocked by required conditions
Sync I18n with Crowdin / synchronize-with-crowdin (push) Waiting to run
Sync I18n with Crowdin / i18n-codegen (push) Blocked by required conditions
fix AI-339
This commit is contained in:
parent
93f13e9e01
commit
847ef00a75
@ -141,6 +141,7 @@ export abstract class CopilotProvider<C = any> {
|
||||
this.logger.debug(`getTools: ${JSON.stringify(options.tools)}`);
|
||||
const ac = this.moduleRef.get(AccessController, { strict: false });
|
||||
const docReader = this.moduleRef.get(DocReader, { strict: false });
|
||||
const models = this.moduleRef.get(Models, { strict: false });
|
||||
const prompt = this.moduleRef.get(PromptService, {
|
||||
strict: false,
|
||||
});
|
||||
@ -182,7 +183,12 @@ export abstract class CopilotProvider<C = any> {
|
||||
const docContext = options.session
|
||||
? await context.getBySessionId(options.session)
|
||||
: null;
|
||||
const searchDocs = buildDocSearchGetter(ac, context, docContext);
|
||||
const searchDocs = buildDocSearchGetter(
|
||||
ac,
|
||||
context,
|
||||
docContext,
|
||||
models
|
||||
);
|
||||
tools.doc_semantic_search = createDocSemanticSearchTool(
|
||||
searchDocs.bind(null, options)
|
||||
);
|
||||
@ -204,7 +210,6 @@ export abstract class CopilotProvider<C = any> {
|
||||
break;
|
||||
}
|
||||
case 'docRead': {
|
||||
const models = this.moduleRef.get(Models, { strict: false });
|
||||
const getDoc = buildDocContentGetter(ac, docReader, models);
|
||||
tools.doc_read = createDocReadTool(getDoc.bind(null, options));
|
||||
break;
|
||||
|
||||
@ -2,7 +2,7 @@ import { tool } from 'ai';
|
||||
import { z } from 'zod';
|
||||
|
||||
import type { AccessController } from '../../../core/permission';
|
||||
import type { ChunkSimilarity } from '../../../models';
|
||||
import type { ChunkSimilarity, Models } from '../../../models';
|
||||
import type { CopilotContextService } from '../context';
|
||||
import type { ContextSession } from '../context/session';
|
||||
import type { CopilotChatOptions } from '../providers';
|
||||
@ -11,7 +11,8 @@ import { toolError } from './error';
|
||||
export const buildDocSearchGetter = (
|
||||
ac: AccessController,
|
||||
context: CopilotContextService,
|
||||
docContext: ContextSession | null
|
||||
docContext: ContextSession | null,
|
||||
models: Models
|
||||
) => {
|
||||
const searchDocs = async (
|
||||
options: CopilotChatOptions,
|
||||
@ -45,7 +46,24 @@ export const buildDocSearchGetter = (
|
||||
}
|
||||
if (!docChunks.length && !fileChunks.length)
|
||||
return `No results found for "${query}".`;
|
||||
return [...fileChunks, ...docChunks];
|
||||
|
||||
const docMetas = await models.doc
|
||||
.findAuthors(
|
||||
docChunks.map(c => ({
|
||||
// oxlint-disable-next-line no-non-null-assertion
|
||||
workspaceId: options.workspace!,
|
||||
docId: c.docId,
|
||||
}))
|
||||
)
|
||||
.then(docs => new Map(docs.filter(d => !!d).map(doc => [doc.id, doc])));
|
||||
|
||||
return [
|
||||
...fileChunks,
|
||||
...docChunks.map(c => ({
|
||||
...c,
|
||||
...docMetas.get(c.docId),
|
||||
})),
|
||||
] as ChunkSimilarity[];
|
||||
};
|
||||
return searchDocs;
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user