mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-24 05:48:59 +08:00
chore: assign todos (#7297)
This commit is contained in:
@@ -108,7 +108,7 @@ export function actionToStream<T extends keyof BlockSuitePresets.AIActions>(
|
||||
docId: host.doc.id,
|
||||
workspaceId: host.doc.collection.id,
|
||||
} as Parameters<typeof action>[0];
|
||||
// @ts-expect-error todo: maybe fix this
|
||||
// @ts-expect-error TODO(@Peng): maybe fix this
|
||||
stream = action(options);
|
||||
if (!stream) return;
|
||||
yield* stream;
|
||||
|
||||
@@ -223,7 +223,7 @@ function actionToStream<T extends keyof BlockSuitePresets.AIActions>(
|
||||
Object.assign(options, data);
|
||||
}
|
||||
|
||||
// @ts-expect-error todo: maybe fix this
|
||||
// @ts-expect-error TODO(@Peng): maybe fix this
|
||||
stream = action(options);
|
||||
if (!stream) return;
|
||||
yield* stream;
|
||||
@@ -253,7 +253,7 @@ function actionToStream<T extends keyof BlockSuitePresets.AIActions>(
|
||||
workspaceId: host.doc.collection.id,
|
||||
} as Parameters<typeof action>[0];
|
||||
|
||||
// @ts-expect-error todo: maybe fix this
|
||||
// @ts-expect-error TODO(@Peng): maybe fix this
|
||||
stream = action(options);
|
||||
if (!stream) return;
|
||||
yield* stream;
|
||||
|
||||
@@ -215,7 +215,7 @@ declare global {
|
||||
): AIActionTextResponse<T>;
|
||||
}
|
||||
|
||||
// todo: should be refactored to get rid of implement details (like messages, action, role, etc.)
|
||||
// TODO(@Peng): should be refactored to get rid of implement details (like messages, action, role, etc.)
|
||||
interface AIHistory {
|
||||
sessionId: string;
|
||||
tokens: number;
|
||||
|
||||
@@ -32,7 +32,7 @@ export type ActionEventType =
|
||||
* To use it, downstream (affine) has to provide AI actions implementation,
|
||||
* user info etc
|
||||
*
|
||||
* todo: breakdown into different parts?
|
||||
* TODO: breakdown into different parts?
|
||||
*/
|
||||
export class AIProvider {
|
||||
static get slots() {
|
||||
@@ -124,7 +124,7 @@ export class AIProvider {
|
||||
console.warn(`AI action ${id} is already provided`);
|
||||
}
|
||||
|
||||
// @ts-expect-error todo: maybe fix this
|
||||
// @ts-expect-error TODO: maybe fix this
|
||||
this.actions[id] = (
|
||||
...args: Parameters<BlockSuitePresets.AIActions[T]>
|
||||
) => {
|
||||
|
||||
Reference in New Issue
Block a user