lobehub / lobe-cli-toolbox Goto Github PK
View Code? Open in Web Editor NEW๐ช Lobe CLI Toolbox - AI CLI Toolbox, enhancing git commit and i18n workflow efficiency
License: MIT License
๐ช Lobe CLI Toolbox - AI CLI Toolbox, enhancing git commit and i18n workflow efficiency
License: MIT License
serdgh
wae
ๆฑๅฉ๏ผ้ๅฐๅฆไธๆฅ้
Error: Invalid environment; fetch is not defined
at new ChatGPTAPI (file:///C:/Users/***/AppData/Roaming/npm/node_modules/@lobehub/commit-cli/node_modules/chatgpt/build/index.js:174:13)
็ญ็ญ
ๆฒกๆฅๅฐๆไน่งฃๅณ่ฟไธช้ฎ้ข๏ผๅธๆๅคงไฝฌไธ่ฆๆๆemmm
Windows
2.9.3
WSL2ไธญๆ ๆณๆญฃๅธธ่พๅ ฅๆๅญ๏ผๆฏๅฝ้่ฆ่พๅ ฅๆๅญ็ๆถๅ๏ผ็จๅบๅฐฑ่ชๅจ็ปๆญขไบ
> uname -a
Linux DESKTOP-C9MSV31 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
> node -v
v18.16.0
> lobe-commit -V
2.9.3
No response
No response
No response
I'm really impressed by tools with auto-translate features like Lobe i18n. However, there are still some languages that ChatGPT doesn't translate accurately, and even Google Translate does a better job. My current difficulty is that while most countries' languages work well, some still need manual translation, which is very time-consuming.
Thank you
I hope you can add more translation services, like I18n Ally or locize does. Additionally, it would be helpful to have a configuration option for specific languages that are not translated accurately, eg. most languages will use Chat GPT and some will allowing the use of other services like Google Translate or something similar.
No response
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
.github/workflows/issue-auto-comments.yml
wow-actions/auto-comment v1
wow-actions/auto-comment v1
wow-actions/auto-comment v1
actions-cool/issues-helper v3
.github/workflows/issue-close-require.yml
actions-cool/issues-helper v3
actions-cool/issues-helper v3
actions-cool/issues-helper v3
actions-cool/issues-helper v3
.github/workflows/issues-translate.yml
usthe/issues-translate-action v2.7
.github/workflows/release.yml
actions/checkout v4
oven-sh/setup-bun v2
.github/workflows/test.yml
actions/checkout v4
oven-sh/setup-bun v2
package.json
@commitlint/cli ^19
@sindresorhus/tsconfig ^5
@types/lodash-es ^4
@types/node ^20
@types/pangu ^4
@types/react ^18
@types/update-notifier ^6
@umijs/lint ^4
clean-pkg-json ^1
commitlint ^19
eslint ^8
husky ^9
ink-testing-library ^3
lerna ^8
lint-staged ^15
multi-semantic-release ^3
pkgroll ^2
prettier ^3
remark ^14
remark-cli ^11
semantic-release ^21
ts-node ^10
typescript ^5
node >=18
packages/lobe-cli-shebang/package.json
commander ^12
consola ^3
update-notifier ^7
node >=18
packages/lobe-cli-ui/package.json
@inkjs/ui ^1
arr-rotate ^1
consola ^3
fast-deep-equal ^3
figures ^6
ink ^4.2
react ^18
@inkjs/ui >=1
consola >=3
ink >=4
react >=18
node >=18
packages/lobe-commit/package.json
@inkjs/ui ^1
chalk ^5
commander ^12
conf ^12
dotenv ^16
execa ^8
fast-deep-equal ^3
gitconfig ^2
gpt-tokenizer ^2
ink ^4.2
lodash-es ^4
octokit ^3
pangu ^4
path-exists ^5
react ^18
swr ^2
update-notifier ^7
zustand ^4
ink >=4
react >=18
node >=18
packages/lobe-i18n/package.json
@inkjs/ui ^1
chalk ^5
commander ^12
conf ^12
consola ^3
cosmiconfig ^9
dotenv ^16
fast-deep-equal ^3
glob ^10
gpt-tokenizer ^2
gray-matter ^4
ink ^4.2
json-stable-stringify ^1
just-diff ^6
lodash-es ^4
p-map ^7
pangu ^4
react ^18
remark-frontmatter ^4
remark-gfm ^3
remark-parse ^10
remark-stringify ^10
swr ^2
unified ^11
unist-util-visit ^5
update-notifier ^7
zustand ^4
@types/json-stable-stringify ^1
ink >=4
react >=18
node >=18
packages/lobe-label/package.json
@inkjs/ui ^1
@octokit/rest ^20
commander ^12
conf ^12
consola ^3
ink ^4.2
lodash-es ^4
react ^18
update-notifier ^7
ink >=4
react >=18
node >=18
packages/lobe-seo/package.json
@inkjs/ui ^1
chalk ^5
commander ^12.0.0
conf ^12
consola ^3
cosmiconfig ^9
dotenv ^16
fast-deep-equal ^3
glob ^10
gpt-tokenizer ^2
gray-matter ^4
ink ^4.2
json-stable-stringify ^1
just-diff ^6
lodash-es ^4
p-map ^7
pangu ^4
react ^18
remark-frontmatter ^4
remark-gfm ^3
remark-parse ^10
remark-stringify ^10
swr ^2
unified ^11
unist-util-visit ^5
update-notifier ^7
zustand ^4
@types/json-stable-stringify ^1
ink >=4
react >=18
node >=18
Mac
2.14.0
ERROR Cannot read properties of undefined (reading 'text') 17:16:34
at NoOpOutputParser.parseResult (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/@langchain/core/dist/output_parsers/base.js:50:42)
at NoOpOutputParser.parseResultWithPrompt (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/@langchain/core/dist/output_parsers/base.js:17:21)
at LLMChain._getFinalOutput (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/langchain/dist/chains/llm_chain.js:121:55)
at LLMChain._call (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/langchain/dist/chains/llm_chain.js:156:46)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async LLMChain.call (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/langchain/dist/chains/base.js:117:28)
at async Promise.all (index 0)
at async MapReduceDocumentsChain._call (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/langchain/dist/chains/combine_docs_chain.js:184:29)
at async MapReduceDocumentsChain.call (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/langchain/dist/chains/base.js:117:28)
at async xt.genSummary (/Users/xx/.nvm/versions/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/dist/cli.js:8:1592)
No response
No response
No response
Other Linux
Automatic1111, current, also current for Lobe
Text in the prompt is unreadable, same color as background. Only when drag selected it is readable. The negative prompt dispplay is fine.
readable prompt
start, type something,
If I inspect element, in css I have an
element.style {
color: transparent;
}
If I disble this the text shows again. It seems also that if I deselect the prompt syntax highlighting
in the lobe configuration menu, that the issue also resolves.
Enabling the advanced text editor, Scroll or realizable do not change this, nor does activating prompt editor
I am somewhat suspecting it's from nativeTextarea.style.color = 'transparent';
in src/modules/PromptHighlight/App.tsx
, but simply changing that didn't resolve the issue
ๅฝๅคๆฌก็ฟป่ฏ็ๆถๅ๏ผ่ฒไผผๅชๆฃๆฅไบ็ฟป่ฏๅๆไปถๆฏๅฆๅญๅจ๏ผๅนถๆช่ฟ่ก hash ๆ ก้ช๏ผๅฏผ่ดๅข้็ๆไผๆ้ฎ้ขใ
้่ฟ่ฎก็ฎๆฏไธชๅๅงๆไปถ็ hash ๅผ็ผๅญ AI ็็ฟป่ฏ็ปๆ๏ผ่ฟไธช็ปๆๅนถๅญๅจๅจ้กน็ฎ็ cache ๆไปถๅคนๅ
้จใ
ๆฏๆฌก่ฟ่กๆถ๏ผไป cache ไธญๆฃๆฅ hash ๅผ๏ผๅนถ่ฟๆปคๅฏนๅบๆไปถใ
ๅฏ่ฝๆไผๆไบคไธไธช PR ๅป่งฃๅณ่ฟไธช้ฎ้ข๏ผไธ่ฟ่ฟๆฒก็่ฟ้กน็ฎไปฃ็
When i change the prompt by editing, the prompt display and cursor position go out of sync. The prompt wraps differently than is diplayed. If you thereafter place the cursor at a different position, what you type does not end up where you placed the cursor. You can 'fix' this by resizing the prompt box, and then the prompt wrapping will fix itself and then you can type again. My language for the prompt is English. It is not very far off, so maybe it's just an off-by-one for the word wrapping position.
I once worked on an ren'py editor and recall having something similar at one point. It is probably not going to help but that code is here:
edit_button.rpy
Windows
2.13.0
ๆญฃๅธธ่ฟ่กไธไผๆ้ๅฝฑ
ๅจ Terminal ไธญ่พๅ ฅ lobe๏ผ้ๆ้ๆฉ item ๆ่ ่พๅ ฅไปปไฝๅญ็ฌฆๅณๅฏๅค็ฐ
ๅจ macOS ่ชๅธฆ็ Terminal ไธ่ฟ่กๅ VS Code ๅ ๅปบ็ Terminal ้ฝๆฏๅๆ ท็็ปๆใ
Lobe Version: v2.13.0
Node Version: v21.6.1
OS Type: Darwin
OS Platform: darwin
OS Architecture: arm64
OS Release: 23.3.0
master
branch failed. ๐จI recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iโm sure you can fix this ๐ช.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those donโt help, or if this issue is reporting something you think isnโt right, you can always ask the humans behind semantic-release.
semantic-release cannot push the version tag to the branch master
on the remote Git repository with URL https://[secure]@github.com/canisminor1990/lobe-commit.git
.
This can be caused by:
Good luck with your project โจ
Your semantic-release bot ๐ฆ๐
i18n็็ธๅ ณๆไปถ๏ผๆ้ฝๆฏๅๅจ/src/locales/defaultไธญ็ๅ๏ผ็ถๅ่ฟไบ้ฝๆฏtsๆไปถ๏ผๆๅบ่ฏฅๆไนๅๅงๅๅจ/localesไธญ็ๆdefaultๅฏนๅบ็zh-CN.jsonๆไปถๅข๏ผ
No response
macOS
"@lobehub/i18n-cli": "^1.18.1",
โน Current model setting: gpt-4o (temperature: 0) [JSON Mode]} 11:41:29
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ /locales/zh-TW/setting.json
ERROR Translate failed, SyntaxError: Unexpected token 'S', "Sure, it l"... is not valid JSON 11:41:31
error: script "i18n" exited with code 1
่ฏท้ฎๅบ่ฏฅๅฆไฝๆๆฅ้ฎ้ข๏ผ
No response
No response
ๆไปถ๏ผuse-on-standalone-init.md
ๅๅงๅ ๅฎน๏ผ
ๆไปถ๏ผsubmit-market.zh-CN.md
Windows
ๆๆฐ็
่พๅ ฅๅๆ ๆณ่ฟ่กไปปไฝ่ฎพ็ฝฎ๏ผๅ ๆฌexitๅ่ฝฆ้ฝไธ็ฎก็จ
lobe-commit --config
No response
npm install -g @lobehub/commit-cli
cd D:\Git้กน็ฎ\lobe
lobe-commit --config
No response
Windows
2.10.0
Failed to calculate number of tokens, falling back to approximate count TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11372:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async RetryOperation._fn (/node/v18.18.2/lib/node_modules/@lobehub/commit-cli/node_modules/p-retry/index.js:50:12) {
cause: Error: certificate has expired
at TLSSocket.onConnectSecure (node:_tls_wrap:1600:34)
at TLSSocket.emit (node:events:517:28)
at TLSSocket._finishInit (node:_tls_wrap:1017:8)
at ssl.onhandshakedone (node:_tls_wrap:803:12) {
code: 'CERT_HAS_EXPIRED'
}
}
No response
No response
No response
First of all, thank you very much for providing this tool๏ผ
I'm having some problems now.
This my script:
...
execSync(`lobe-i18n md --config ${componentTranslateConfigPath}`, {
cwd: process.cwd(),
stdio: "inherit",
env: {
OPENAI_PROXY_URL: "xxxx",
OPENAI_API_KEY: "xxxx"
}
});
...
and this is my .i18nrc.js
:
const path = require("path");
const { defineConfig } = require("@lobehub/i18n-cli");
module.exports = defineConfig({
markdown: {
entry: [path.resolve(__dirname, "./index.md")],
entryLocale: "en-US",
entryExtension: ".md",
outputLocales: ["zh-CN"],
outputExtensions: (locale, { getDefaultExtension }) => {
//if (locale === "en-US") return ".md";
return getDefaultExtension(locale);
}
}
});
All the config load normally, but it's failed:
โน start translate portal doc... 17:17:02
o Lobe I18N is analyzing your markdown... ๐คฏ๐๐ 17:17:05
o Running in ๐ 1 Markdown, and translating to zh-CN locales.. 17:17:05
i ๐ To zh-CN: src\portal\index.md 17:17:05
i Current model setting: gpt-3.5-turbo (temperature: 0) } 17:17:05
โโโโ ๐ E:\project\incall-fuxi\packages\fuxi\src\portal\index.zh-CN.md
- from en-US to zh-CN [Tokens: 1619]
โ ง 0% [0/1 chunks]
ERROR Translate failed, TypeError: Cannot read properties of undefined (reading 'message') 17:17:07
No response
macOS
1.18.1
node: v20.10.0
os: macOS
่ฟ่ก lobe-i18n -o ๆฅ้
ERROR Cannot read properties of null (reading 'useEffect')
node_modules/@lobehub/cli-ui/node_modules/react/cjs/react.development.js:1634:21
1631: }
1632: function useEffect(create, deps) {
1633: var dispatcher = resolveDispatcher();
1634: return dispatcher.useEffect(create, deps);
1635: }
1636: function useInsertionEffect(create, deps) {
1637: var dispatcher = resolveDispatcher();
No response
No response
No response
my examples:
locales/en-US/a.json
locales/en-US/subpath1/b.json
locales/en-US/subpath1/subpath2/c.json
locales/en-US/subpath1/.../d.json
....
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.