feat(pi): materialize effective plugin worker tools
This commit is contained in:
@@ -6,8 +6,12 @@ import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
|
||||
import { createRequire } from 'node:module';
|
||||
import { tmpdir } from 'node:os';
|
||||
import { join, resolve } from 'node:path';
|
||||
import { PiWorkerProcess } from '../../electron/coding-runtime/pi/worker-process';
|
||||
import {
|
||||
PI_CORE_TOOL_NAMES,
|
||||
PiWorkerProcess,
|
||||
} from '../../electron/coding-runtime/pi/worker-process';
|
||||
import { PiManagedExtensionHost } from '../../electron/coding-runtime/pi/extension-host';
|
||||
import { DATA_SERVICE_PLUGIN_DEFINITION } from '../../shared/coding-plugins';
|
||||
import {
|
||||
PI_RUNTIME_MANIFEST,
|
||||
PI_RUNTIME_VERSION,
|
||||
@@ -85,6 +89,8 @@ describe('locked Pi worker process smoke', () => {
|
||||
generation: 1,
|
||||
projectId: 'real-project',
|
||||
extensionsDir: join(root, 'extensions'),
|
||||
catalogRevision: 7,
|
||||
tools: [...DATA_SERVICE_PLUGIN_DEFINITION.tools],
|
||||
});
|
||||
await extensionHost.bindRun('real-conversation', 1, 'real-run');
|
||||
const probe = await materializeActiveToolsProbe(root);
|
||||
@@ -94,6 +100,10 @@ describe('locked Pi worker process smoke', () => {
|
||||
cwd,
|
||||
configDir,
|
||||
sessionDir,
|
||||
tools: [
|
||||
...PI_CORE_TOOL_NAMES,
|
||||
...DATA_SERVICE_PLUGIN_DEFINITION.tools.map(({ name }) => name),
|
||||
],
|
||||
additionalArgs: [
|
||||
'--extension', extension.extensionPath,
|
||||
'--extension', probe.extensionPath,
|
||||
@@ -118,6 +128,7 @@ describe('locked Pi worker process smoke', () => {
|
||||
'task_state',
|
||||
'changed_file',
|
||||
'runtime_context',
|
||||
...DATA_SERVICE_PLUGIN_DEFINITION.tools.map(({ name }) => name),
|
||||
]));
|
||||
await expect(worker.stop('test_injection')).resolves.toMatchObject({ mode: 'stdin-close', code: 0 });
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user