mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-08-22 23:26:12 +00:00
feat: copy toolStore deps
This commit is contained in:
parent
7b9997d3e6
commit
c058fd3d93
2 changed files with 15 additions and 3 deletions
|
|
@ -1,7 +1,20 @@
|
|||
import { createDecorator } from "#/_base/di";
|
||||
import type { ToolStore, ToolStoreData, ToolStoreKey } from '../../../tools/store';
|
||||
import type { Hooks } from '../hooks';
|
||||
|
||||
export interface ToolStoreData { }
|
||||
|
||||
export type ToolStoreKey = Extract<keyof ToolStoreData, string>;
|
||||
|
||||
export interface ToolStore {
|
||||
get<K extends ToolStoreKey>(key: K): ToolStoreData[K] | undefined;
|
||||
set<K extends ToolStoreKey>(key: K, value: ToolStoreData[K]): void;
|
||||
}
|
||||
|
||||
export interface ToolStoreUpdate<K extends ToolStoreKey = ToolStoreKey> {
|
||||
readonly key: K;
|
||||
readonly value: ToolStoreData[K];
|
||||
}
|
||||
|
||||
export interface IToolStoreService extends ToolStore {
|
||||
data(): Readonly<Partial<ToolStoreData>>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
import { Disposable, registerSingleton, SyncDescriptor } from "#/_base/di";
|
||||
import type { ToolStoreData, ToolStoreKey } from '../../../tools/store';
|
||||
import { OrderedHookSlot } from '../hooks';
|
||||
import type { WireRecord } from '../types';
|
||||
import { IWireRecord } from '../wireRecord/wireRecord';
|
||||
import { IToolStoreService } from './toolStore';
|
||||
import { IToolStoreService, type ToolStoreData, type ToolStoreKey } from './toolStore';
|
||||
|
||||
declare module '../types' {
|
||||
interface WireRecordMap {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue