Skip to content

Commit

Permalink
feat: Make model required in gitCommit and startChat
Browse files Browse the repository at this point in the history
The 'model' parameter in both the `gitCommit` and `startChat` dispatchers is now required. This change enforces the explicit specification of the model to be used, improving clarity and reducing potential configuration errors. The corresponding schemas for parameters are also updated to reflect this change.
  • Loading branch information
yukimemi committed Dec 30, 2024
1 parent 2ea299c commit 52375db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions denops/futago/dispatcher/git_commit.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// =============================================================================
// File : git_commit.ts
// Author : yukimemi
// Last Change : 2024/12/30 09:50:56.
// Last Change : 2024/12/30 15:40:29.
// =============================================================================

import * as fn from "jsr:@denops/std@7.4.0/function";
Expand All @@ -13,7 +13,7 @@ import { SafetySettingsSchema } from "../schema/safety_settings.ts";
import { z } from "npm:zod@3.24.1";

export const GitCommitParamsSchema = z.object({
model: z.string().optional(),
model: z.string(),
db: z.instanceof(Deno.Kv),
prompt: z.string().optional(),
safetySettings: SafetySettingsSchema.optional(),
Expand Down
4 changes: 2 additions & 2 deletions denops/futago/dispatcher/start_chat.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// =============================================================================
// File : start_chat.ts
// Author : yukimemi
// Last Change : 2024/12/30 09:56:35.
// Last Change : 2024/12/30 15:47:23.
// =============================================================================

import * as batch from "jsr:@denops/std@7.4.0/batch";
Expand All @@ -18,7 +18,7 @@ import { getNow } from "../util.ts";
import { z } from "npm:zod@3.24.1";

export const StartChatParamsSchema = z.object({
model: z.string().optional(),
model: z.string(),
db: z.instanceof(Deno.Kv),
chatDir: z.string(),
opener: OpenerSchema,
Expand Down
4 changes: 2 additions & 2 deletions denops/futago/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// =============================================================================
// File : main.ts
// Author : yukimemi
// Last Change : 2024/12/30 09:31:25.
// Last Change : 2024/12/30 15:39:42.
// =============================================================================

import * as fn from "jsr:@denops/std@7.4.0/function";
Expand Down Expand Up @@ -192,8 +192,8 @@ export async function main(denops: Denops): Promise<void> {
);
} else {
await gitCommit(denops, {
db,
model,
db,
safetySettings,
generationConfig,
debug,
Expand Down

0 comments on commit 52375db

Please sign in to comment.