chore: assign todos (#7297)

This commit is contained in:
forehalo
2024-06-21 07:54:14 +00:00
parent e085b927f6
commit 7b3673ae82
121 changed files with 137 additions and 157 deletions
@@ -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]>
) => {