feat(opencode): Add output channel logging and minimal variant
This commit is contained in:
@@ -116,3 +116,5 @@ async function handleGenerateCommitMessage(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function deactivate(): void {}
|
export function deactivate(): void {}
|
||||||
|
|
||||||
|
export const output = vscode.window.createOutputChannel("ai-commit-ext");
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { exec, spawn, ExecException } from "child_process";
|
import { exec, spawn, ExecException } from "child_process";
|
||||||
import * as vscode from "vscode";
|
import * as vscode from "vscode";
|
||||||
import { getGitDiff, getRepositoryRoot } from "./gitService";
|
import { getGitDiff, getRepositoryRoot } from "./gitService";
|
||||||
|
import { output } from "./extension";
|
||||||
|
|
||||||
export interface GenerateOptions {
|
export interface GenerateOptions {
|
||||||
model?: string;
|
model?: string;
|
||||||
@@ -53,8 +54,17 @@ ${diff}
|
|||||||
|
|
||||||
Generate a concise Conventional Commit message for these changes:`;
|
Generate a concise Conventional Commit message for these changes:`;
|
||||||
|
|
||||||
|
const log = `[${Date.now()}]\r\n${prompt}`;
|
||||||
|
output.appendLine(log);
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const args: string[] = ["run", "--format", "default"];
|
const args: string[] = [
|
||||||
|
"run",
|
||||||
|
"--format",
|
||||||
|
"default",
|
||||||
|
"--variant",
|
||||||
|
"minimal",
|
||||||
|
];
|
||||||
|
|
||||||
if (model) {
|
if (model) {
|
||||||
args.push("--model", model);
|
args.push("--model", model);
|
||||||
|
|||||||
Reference in New Issue
Block a user