Skip to content

Commit 652ab58

Browse files
committed
📝 ドキュメントと設定の改善(複数ファイル): より明確で正確なドキュメントと設定ファイルを作成し単体テストをパスするようにしました
いくつかのドキュメントを更新し、設定ファイルの変数名をより明確で理解しやすいものに変更しました。また、不要なコメントを削除し、コードのスタイルを統一しました。これにより、プロジェクトの可読性と保守性が向上します。 📝 Documentation and configuration improvements (multiple files): Improved clarity and accuracy of documentation and configuration files for pass unit test Updated several documentation sections and renamed configuration variables for better clarity and understanding. Removed unnecessary comments and standardized code style. This improves the readability and maintainability of the project.
1 parent 1ebbdc5 commit 652ab58

17 files changed

+84350
-98415
lines changed

.github/copilot-instructions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
- 新たに生成するコメントは日本語にしてください。ただし元のコメントが英語の場合は英語にしてください。
2+
- 「型アサーションを使用してundefined でないことを保証します」のような単にコードの動きを説明するコメントは追加しないでください。
23
- コード変更時に元からあるコメントは、そのまま残してください。
34
- JavaScriptやTypeScriptで行末のセミコロンは省略してください。
5+
- インデントは2にしてください。
46
- gitのコミットメッセージを作る時には以下の規則に従ってください。
57
- 従来のコミット規則に従ってください。
68
- GitMoji 規則を使用してください。

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,11 @@ oco --yes
124124
Create a `.env` file and add OpenCommit config variables there like this:
125125

126126
```env
127-
OCO_OPENAI_API_TYPE=<'openai', 'azure' or 'google'. The default is 'openai' >
128-
OCO_OPENAI_API_KEY=<your OpenAI API token>
129-
OCO_OPENAI_BASE_PATH=<may be used to set proxy path to OpenAI API. Required for Azure OpenAI. example: 'https://YourInstanceName.openai.azure.com/'>
130-
OCO_OPENAI_MAX_TOKENS=<max response tokens from OpenAI API>
127+
OCO_OPENAI_API_TYPE=<'openai', 'azure', 'gemini' or 'google'. The default is 'openai' > Obsolete, recommend using OCO_AI_PROVIDER
128+
OCO_OPENAI_API_KEY=<your OpenAI API token> Obsolete, recommend using OCO_API_KEY
129+
OCO_OPENAI_BASE_PATH=<may be used to set proxy path to OpenAI API. Required for Azure OpenAI. example: 'https://YourInstanceName.openai.azure.com/'> Obsolete, recommend using OCO_API_URL
130+
OCO_OPENAI_MAX_TOKENS=<max response tokens from OpenAI API> Obsolete, recommend using OCO_TOKENS_MAX_OUTPUT
131+
OCO_TOKEN_LIMIT=<max response tokens to OpenAI API> Obsolete, recommend using OCO_TOKENS_MAX_INPUT
131132
...
132133
OCO_DESCRIPTION=<postface a message with ~3 sentences description of the changes>
133134
OCO_EMOJI=<boolean, add GitMoji>
@@ -204,14 +205,14 @@ You may switch to gpt-4o which performs better, but costs more 🤠
204205

205206
```sh
206207
oco config set OCO_MODEL=gpt-4o
207-
oco config set OCO_TOKEN_LIMIT=32768
208+
oco config set OCO_TOKENS_MAX_OUTPUT=32768
208209
```
209210

210211
or for as a cheaper option:
211212

212213
```sh
213214
oco config set OCO_MODEL=gpt-3.5-turbo
214-
oco config set OCO_TOKEN_LIMIT=16384
215+
oco config set OCO_TOKENS_MAX_OUTPUT=16384
215216
```
216217

217218
### Switch to other LLM providers with a custom URL

jest.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/** @type {import('ts-jest').JestConfigWithTsJest} **/
2+
import { createJsWithTsEsmPreset } from 'ts-jest'
3+
4+
const presetConfig = createJsWithTsEsmPreset({
5+
//...options
6+
// tsconfig:
7+
// isolatedModules:
8+
// compiler:
9+
// astTransformers:
10+
diagnostics: false,
11+
// stringifyContentPathRegex:
12+
})
13+
14+
export default {
15+
testEnvironment: "node",
16+
transform: {
17+
"^.+.tsx?$": ["ts-jest",{}],
18+
},
19+
20+
testTimeout: 100_000,
21+
coverageProvider: 'v8',
22+
moduleDirectories: ['node_modules', 'src'],
23+
...presetConfig,
24+
setupFilesAfterEnv: ['<rootDir>/test/jest-setup.ts'],
25+
testRegex: ['.*\\.test\\.ts$'],
26+
transformIgnorePatterns: ['node_modules/(?!cli-testing-library)'],
27+
};

jest.config.ts

Lines changed: 0 additions & 28 deletions
This file was deleted.

opencommit.code-workspace

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@
8383
"extensions": {
8484
"recommendations": [
8585
"dbaeumer.vscode-eslint",
86-
"esbenp.prettier-vscode"
86+
"esbenp.prettier-vscode",
87+
"orta.vscode-jest"
8788
]
8889
}
8990
}

0 commit comments

Comments
 (0)