pushai 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +10 -10
- package/output.txt +58 -0
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
${
|
|
4
|
-
`,outro:"Successfully synced with the remote repository.",noteTitle:"Ready to commit",gitRepoMissing:"There's no Git repository in this directory.",initConfirm:"Would you like to initialize a new Git repository?",initSuccess:"Git repository initialized successfully.",abortNoRepo:"A Git repository is required to continue.",noChanges:"No changes were found to commit.",generating:"Putting together a commit message..",generatingSlow10:"Please wait.. This might take a moment.",generatingSlow60:"This is taking longer than usual..",generated:"Commit message generated.",generationFailed:"AI failed to generate commit message.",generationCancelled:"Commit message generation cancelled.",emptyMessageTitle:"Empty commit message",emptyMessagePrompt:"AI returned an empty commit message. What would you like to do?",emptyRegenerate:"Regenerate",emptyManual:"Enter manually",emptyCancel:"Cancel",stillEmptyWarning:"Still empty, try manual entry.",manualMessagePrompt:"Enter commit message manually:",manualMessageRequired:"Message cannot be empty",manualAccepted:"Manual message accepted.",actionPrompt:"What would you like to do next?",actions:{accept:"Commit and push changes",edit:"Edit commit message",regenerate:"Generate another message",cancel:"Cancel operation"},editPrompt:"Update the commit message:",regenerating:"Regenerating a new commit message..",regenerated:"New commit message ready.",regenerationFailed:
|
|
5
|
-
File: ${
|
|
2
|
+
import Me from"chalk";import{basename as Ee}from"path";import{Command as Te}from"commander";import b from"chalk";import{confirm as fe,intro as he,isCancel as ye,outro as M}from"@clack/prompts";import Q from"os";import q from"path";import h from"fs";import B from"keytar";var D="pushai",U="api-key";async function j(){let o=k(),t={};if(h.existsSync(o))try{t=JSON.parse(h.readFileSync(o,"utf-8"))}catch{}let i=await B.getPassword(D,U);return i&&(t.apiKey=i),t}async function V(o){let t=k(),{apiKey:i,...l}=o;i&&await B.setPassword(D,U,i);let a={};if(h.existsSync(t))try{a=JSON.parse(h.readFileSync(t,"utf-8"))}catch{}let m={...a,...l};h.writeFileSync(t,JSON.stringify(m,null,2),"utf-8")}async function J(){try{let o=Q.homedir(),t=q.join(o,".config","pushai"),i=!1;return h.existsSync(t)&&(h.rmSync(t,{recursive:!0,force:!0}),i=!0),await B.deletePassword(D,U),i}catch(o){return console.error("Failed to reset config:",o),!1}}function k(){let o=q.join(Q.homedir(),".config","pushai");return h.existsSync(o)||h.mkdirSync(o,{recursive:!0}),q.join(o,"config.json")}import w from"chalk";var e={common:{operationCancelled:"Operation cancelled.",interrupted:"Request interrupted.",dryRun:"[DRY RUN] No changes were committed or pushed.",noRemote:{header:"There's no Git remote repository configured.",instruction:"Try adding a remote repository (e.g. `git remote add origin <url>`) and run the command again."},success:{committed:"Changes committed successfully.",pushed:"Changes pushed successfully."}},commit:{intro:(o,t)=>`
|
|
3
|
+
${w.cyan("\u25CF")} ${w.bgCyan.black.bold(` ${o.toUpperCase()} `)} ${w.dim("\u2022")} ${w.white(t)}
|
|
4
|
+
`,outro:"Successfully synced with the remote repository.",noteTitle:"Ready to commit",gitRepoMissing:"There's no Git repository in this directory.",initConfirm:"Would you like to initialize a new Git repository?",initSuccess:"Git repository initialized successfully.",abortNoRepo:"A Git repository is required to continue.",noChanges:"No changes were found to commit.",generating:"Putting together a commit message..",generatingSlow10:"Please wait.. This might take a moment.",generatingSlow60:"This is taking longer than usual..",generated:"Commit message generated.",generationFailed:"AI failed to generate commit message.",generationCancelled:"Commit message generation cancelled.",emptyMessageTitle:"Empty commit message",emptyMessagePrompt:"AI returned an empty commit message. What would you like to do?",emptyRegenerate:"Regenerate",emptyManual:"Enter manually",emptyCancel:"Cancel",stillEmptyWarning:"Still empty, try manual entry.",manualMessagePrompt:"Enter commit message manually:",manualMessageRequired:"Message cannot be empty",manualAccepted:"Manual message accepted.",actionPrompt:"What would you like to do next?",actions:{accept:"Commit and push changes",edit:"Edit commit message",regenerate:"Generate another message",cancel:"Cancel operation"},editPrompt:"Update the commit message:",regenerating:"Regenerating a new commit message..",regenerated:"New commit message ready.",regenerationFailed:o=>`Couldn't generate another message: ${o}`,processStopped:"Process stopped. No changes were committed or pushed.",committing:"Creating commit..",committingSlow10:"Almost there..",committingSlow60:"Still processing your request..",pushing:"Pushing changes to remote..",pushingSlow10:"Syncing changes..",pushingSlow60:"Still syncing changes.. Please wait.",operationFailed:"Something went wrong while completing the operation.",gitError:o=>`Git reported an error: ${o}`},config:{intro:"Welcome to PushAI. Let's get things set up.",outro:"Configuration complete. You're ready to go!",providerPrompt:"Choose from the available AI providers:",apiKeyPrompt:o=>`Enter your ${w.cyan.bold(o)} API key:`,apiKeyRequired:"You'll need an API key to continue. Simply copy and paste to proceed.",modelPrompt:"Which model would you like to use?",customModelSeparator:"Use a custom model ID",customModelPrompt:"Enter the custom model ID:",customModelRequired:"A model ID is required.",baseUrlPrompt:"Enter a base URL",baseUrlPromptPlaceholder:"Optional \u2014 press Enter to skip",saved:"Configuration saved successfully.",providerLabel:o=>`${w.white.bold("Provider:")} ${o}`,modelLabel:o=>`${w.white.bold("Model: ")} ${o}`,apiKeyLabel:o=>`${w.white.bold("API Key: ")} ****${o}`,configFile:o=>`
|
|
5
|
+
File: ${o}`,commandsHint:"Here are a few commands to try:",hintCommit:"Generate AI-powered commit messages",hintConfig:"Update provider or API settings",hintReset:"Clear saved configuration"},reset:{intro:"Resetting PushAI configuration",confirm:"Remove all PushAI configurations and API keys?",outro:"PushAI configuration removed successfully.",nothingToDelete:"There's no configuration data to remove."},errors:{authFix:"Run `pai reset` to update your credentials."}};async function Y(){he(b.yellow.bold(e.reset.intro));try{let o=await fe({message:b.red(e.reset.confirm),initialValue:!1});if(ye(o)){M(b.red(e.common.operationCancelled));return}if(!o){M(b.red(e.common.operationCancelled));return}await J()?M(b.green.bold(e.reset.outro)):M(b.dim(e.reset.nothingToDelete))}catch(o){if(o.name==="ExitPromptError"||o.name==="AbortError"){M(b.red(e.common.operationCancelled));return}throw o}}import p from"chalk";import{select as ee,password as Pe,isCancel as O,text as be,intro as Ce,note as te,outro as E}from"@clack/prompts";import{GoogleGenAI as we}from"@google/genai";var v=class{apiKey;model;constructor(t,i){this.apiKey=t,this.model=i}};var C=(o,t=!1)=>{let i=`
|
|
6
6
|
Generate a single conventional commit message from the git diff.
|
|
7
7
|
|
|
8
8
|
Rules:
|
|
@@ -30,14 +30,14 @@ Guidelines:
|
|
|
30
30
|
- Use specific scopes when relevant
|
|
31
31
|
|
|
32
32
|
Git diff:
|
|
33
|
-
${
|
|
34
|
-
`;return
|
|
33
|
+
${o}
|
|
34
|
+
`;return t&&(i+=`
|
|
35
35
|
|
|
36
36
|
Generate a DIFFERENT commit message for the same diff.
|
|
37
37
|
Use a different perspective or emphasis while following all rules.
|
|
38
|
-
`),
|
|
38
|
+
`),i.trim()};var G=class extends v{ai;constructor(t,i){super(t,i),this.ai=new we({apiKey:t})}async generateCommitMessage(t,i,l){let a=l?.regenerate||!1;try{let n=(await this.ai.models.generateContent({model:this.model,contents:C(t,a),config:{temperature:a?.8:.2,maxOutputTokens:100}})).text?.trim()||"";if(!(/^[a-z]+(\([a-z0-9-]+\))?: .+/.test(n)&&n.length<=200))throw new Error("Invalid commit message generated");return n}catch(m){throw m instanceof Error?m:new Error("Gemini API error")}}};import{InferenceClient as X}from"@huggingface/inference";var N=class extends v{async generateCommitMessage(t,i,l){let a=l?.regenerate||!1;try{return((await new X(this.apiKey,{endpointUrl:"https://router.huggingface.co/v1"}).chatCompletion({model:this.model,messages:[{role:"user",content:C(t,a)}],max_tokens:100,temperature:a?.8:.2},{signal:i})).choices[0]?.message.content||"").trim().replace(/['"]/g,"").replace(/^commit:\s*/i,"")}catch{try{return(await new X(this.apiKey).textGeneration({model:this.model,inputs:C(t,a),parameters:{max_new_tokens:100,temperature:a?.8:.2,return_full_text:!1}},{signal:i})).generated_text.trim().replace(/['"]/g,"").replace(/^commit:\s*/i,"")}catch(n){throw n instanceof Error?n:new Error("Hugging Face API error")}}}};import ve from"openai";var $=class extends v{constructor(t,i){super(t,i)}async generateCommitMessage(t,i,l){let a=l?.regenerate||!1,m=new ve({apiKey:this.apiKey});try{return(await m.chat.completions.create({model:this.model,messages:[{role:"user",content:C(t,a)}],temperature:a?.8:.7,max_tokens:100},{signal:i})).choices[0]?.message.content?.trim().replace(/['"]/g,"")||""}catch(n){throw n instanceof Error?n:new Error("OpenAI API error")}}};var F=[{name:"Google Gemini",value:"gemini",models:[{name:"Gemini 3.1 Flash Lite",value:"gemini-3.1-flash-lite",hint:"free \u2022 recommended"},{name:"Gemini 2.0 Flash Lite",value:"gemini-2.0-flash-lite",hint:"free"},{name:"Gemini 2.5 Flash",value:"gemini-2.5-flash",hint:"free \u2022 fast"},{name:"Gemini 2.5 Pro",value:"gemini-2.5-pro",hint:"paid \u2022 best quality"},{name:"Gemini 1.5 Flash",value:"gemini-1.5-flash",hint:"free \u2022 stable"},{name:"Gemini 1.5 Pro",value:"gemini-1.5-pro",hint:"paid"}]},{name:"OpenAI",value:"openai",models:[{name:"GPT-4.1 Mini",value:"gpt-4.1-mini",hint:"paid \u2022 recommended"},{name:"GPT-4.1",value:"gpt-4.1",hint:"paid \u2022 best quality"},{name:"GPT-4.1 Nano",value:"gpt-4.1-nano",hint:"paid \u2022 lightweight"},{name:"GPT-4o",value:"gpt-4o",hint:"paid \u2022 multimodal"},{name:"GPT-4o Mini",value:"gpt-4o-mini",hint:"free \u2022 fast"},{name:"GPT-4 Turbo",value:"gpt-4-turbo",hint:"paid"}]},{name:"Hugging Face",value:"huggingface",models:[{name:"Llama 3 8B Instruct",value:"meta-llama/Meta-Llama-3-8B-Instruct",hint:"free \u2022 recommended"},{name:"Llama 3.1 8B Instruct",value:"meta-llama/Llama-3.1-8B-Instruct",hint:"free"},{name:"Llama 3.1 70B Instruct",value:"meta-llama/Llama-3.1-70B-Instruct",hint:"free \u2022 high quality"},{name:"Mistral 7B Instruct",value:"mistralai/Mistral-7B-Instruct-v0.3",hint:"free \u2022 lightweight"},{name:"Mixtral 8x7B Instruct",value:"mistralai/Mixtral-8x7B-Instruct-v0.1",hint:"free \u2022 powerful"},{name:"Qwen 2 7B Instruct",value:"Qwen/Qwen2-7B-Instruct",hint:"free"},{name:"Qwen 2.5 7B Instruct",value:"Qwen/Qwen2.5-7B-Instruct",hint:"free \u2022 improved"},{name:"DeepSeek Coder 33B",value:"deepseek-ai/deepseek-coder-33b-instruct",hint:"free \u2022 coding"},{name:"Phi-3 Mini 4K",value:"microsoft/Phi-3-mini-4k-instruct",hint:"free \u2022 compact"}]}];function Z(o){switch(o.provider){case"gemini":return Promise.resolve(new G(o.apiKey,o.model));case"huggingface":return Promise.resolve(new N(o.apiKey,o.model));case"openai":return Promise.resolve(new $(o.apiKey,o.model));default:throw new Error(`Provider ${o.provider} is not supported.`)}}async function _(){Ce(p.blue.bold(e.config.intro));try{let o=await ee({message:e.config.providerPrompt,options:F.map(s=>({label:s.name,value:s.value}))});if(O(o)){E(p.red(e.common.operationCancelled));return}let t=o,i=F.find(s=>s.value===t),l=await Pe({message:e.config.apiKeyPrompt(t),mask:"*",validate:s=>{if(!s||s.trim()==="")return e.config.apiKeyRequired}});if(O(l)){E(p.red(e.common.operationCancelled));return}let a=l,m=await ee({message:e.config.modelPrompt,options:[...i?.models.map(s=>({label:s.name,value:s.value,hint:s.hint}))||[],{label:e.config.customModelSeparator,value:"custom_id"}]});if(O(m)){E(p.red(e.common.operationCancelled));return}let n=m;if(n==="custom_id"){let s=await be({message:e.config.customModelPrompt,placeholder:"...",validate:y=>{if(!y||y.trim()==="")return e.config.customModelRequired}});if(O(s)){E(p.red(e.common.operationCancelled));return}n=s}await V({provider:t,apiKey:a,model:n});let u=k(),f=`${e.config.providerLabel(F.find(s=>t===s.value)?.name||t)}
|
|
39
39
|
${e.config.modelLabel(n)}
|
|
40
40
|
${e.config.apiKeyLabel(a.slice(-4))}
|
|
41
|
-
${
|
|
42
|
-
${
|
|
43
|
-
${
|
|
41
|
+
${p.dim(e.config.configFile(u))}`;te(f,p.cyan(e.config.saved));let c=`${p.white.bold("pai commit:")} ${p.white(e.config.hintCommit)}
|
|
42
|
+
${p.white.bold("pai config:")} ${p.white(e.config.hintConfig)}
|
|
43
|
+
${p.white.bold("pai reset:")} ${p.white(e.config.hintReset)}`;te(c,p.cyan(e.config.commandsHint)),E(p.green.bold(e.config.outro))}catch(o){if(o.name==="ExitPromptError"){console.log(p.dim(e.common.operationCancelled));return}throw o}}import Re from"ora";import r from"chalk";import Ie from"simple-git";import{confirm as Ae,select as le,text as de,isCancel as T,note as se,outro as d}from"@clack/prompts";import oe from"chalk";import{outro as ie}from"@clack/prompts";function xe(o){if(!(o instanceof Error))return"Something unexpected went wrong.";let t=o.message.toLowerCase();if(t.includes("api key")||t.includes("invalid_api_key")||t.includes("authentication")||t.includes("authorization")||t.includes("unauthorized")||t.includes("401")||t.includes("403"))return"Authentication failed. The API key appears to be invalid.";if(t.includes("HTTP 408")||t.includes("RPC failed")||t.includes("remote end hung up unexpectedly"))return"GitHub connection timed out. Commit saved locally. Run `git push` to retry.";if(t.includes("429")||t.includes("quota")||t.includes("rate limit")||t.includes("resource_exhausted")||t.includes("too many requests")){let l=(o.message.match(/retry in ([\d.]+s?)/i)||o.message.match(/retrydelay":"(\d+s)"/i))?.[1];return l?`Rate limit exceeded. Try again in ${l}.`:"Rate limit exceeded. Please try again later."}return t.includes("model")&&(t.includes("not found")||t.includes("unsupported")||t.includes("does not exist"))?"The selected AI model is unavailable or unsupported.":t.includes("maximum context length")||t.includes("token limit")?"The git diff is too large for the selected AI model.":t.includes("safety")||t.includes("blocked")?"The AI provider blocked this request.":t.includes("fetch failed")||t.includes("network")||t.includes("econnreset")||t.includes("timeout")?"Network error. Please check your internet connection.":"Commit message generation cancelled."}function K(o){if(o.name==="ExitPromptError")return;let t=xe(o);ie(oe.red(t)),t.includes("Authentication failed")&&ie(oe.yellow(e.errors.authFix))}import{simpleGit as Se}from"simple-git";var x=Se();async function H(){if(!await x.checkIsRepo())return{isRepo:!1};let t=await x.status();return(t.not_added.length>0||t.modified.length>0||t.deleted.length>0)&&await x.add("--all"),{isRepo:!0,diff:await x.diff(["--cached"])}}async function re(){await x.init()}async function ne(){try{return(await x.getRemotes()).length>0}catch{return!1}}import ae from"chalk";function S(o,t,i){let l=setTimeout(()=>{o.isSpinning&&(o.color="yellow",o.text=ae.yellow(t))},1e4),a=setTimeout(()=>{o.isSpinning&&(o.color="red",o.text=ae.red(i))},6e4);return()=>{clearTimeout(l),clearTimeout(a),o.color="cyan"}}var me=Ie();async function ce(o,t,i,l,a){let m=o;for(;!m||m.trim()==="";){a.fail(r.red(e.commit.emptyMessageTitle));let n=await le({message:e.commit.emptyMessagePrompt,options:[{label:e.commit.emptyRegenerate,value:"regenerate"},{label:e.commit.emptyManual,value:"manual"},{label:e.commit.emptyCancel,value:"cancel"}]});if((T(n)||n==="cancel")&&(d(r.dim(e.commit.processStopped)),process.exit(0)),n==="regenerate"){a.start(r.blue(e.commit.regenerating));let u=S(a,e.commit.generatingSlow10,e.commit.generatingSlow60);try{if(m=await t.generateCommitMessage(i,l,{regenerate:!0}),u(),!m||m.trim()===""){a.warn(r.yellow(e.commit.stillEmptyWarning));continue}a.succeed(r.green(e.commit.regenerated))}catch(f){u(),a.fail(r.red(e.commit.regenerationFailed(f.message))),f.name==="AbortError"&&(d(r.yellow(e.commit.generationCancelled)),process.exit(0))}}else if(n==="manual"){let u=await de({message:e.commit.manualMessagePrompt,validate:f=>!f||f.trim()===""?e.commit.manualMessageRequired:void 0});T(u)&&(d(r.dim(e.commit.processStopped)),process.exit(0)),m=u,a.succeed(r.green(e.commit.manualAccepted))}}return m}async function z(o,t){let i=new AbortController;process.stdin.setRawMode?.(!0),process.stdin.resume(),process.stdin.setEncoding("utf8");let l=()=>{i.abort(),d(r.red(e.common.operationCancelled)),process.exit(0)},a=n=>{n===""&&l()};process.stdin.on("data",a),t?.(i);let m=()=>{i.abort(),d(r.red(e.common.operationCancelled)),process.exit(0)};process.once("SIGINT",m);try{let n=await j();if(!n.apiKey||!n.provider||!n.model){await _(),Object.assign(n,await j());return}console.log(e.commit.intro(n.provider.toUpperCase(),n.model));let u=await H();if(!u.isRepo){console.log(r.yellow(e.commit.gitRepoMissing));let g=await Ae({message:e.commit.initConfirm,initialValue:!0});T(g)&&(d(r.red(e.common.operationCancelled)),process.exit(0)),g?(await re(),console.log(r.green(e.commit.initSuccess)),u=await H()):(d(r.dim(e.commit.abortNoRepo)),process.exit(0))}let f=u.diff;f||(d(r.red(e.commit.noChanges)),process.exit(0));let c=Re({color:"cyan"}),s="",y;try{c.start(r.blue(e.commit.generating));let g=S(c,e.commit.generatingSlow10,e.commit.generatingSlow60);y=await Z(n),s=await y.generateCommitMessage(f,i.signal),g(),s=await ce(s,y,f,i.signal,c),c.succeed(r.green(e.commit.generated))}catch(g){c.fail(r.red.bold(e.commit.generationFailed)),g.name==="AbortError"&&(d(r.yellow(e.commit.generationCancelled)),process.exit(0)),K(g),process.exit(1)}o&&(se(r.bold(s),e.commit.noteTitle),d(r.yellow(e.common.dryRun)),process.exit(0));let L=!1;for(;!L;){se(r.bold(s),e.commit.noteTitle);let g=await le({message:e.commit.actionPrompt,options:[{label:e.commit.actions.accept,value:"accept"},{label:e.commit.actions.edit,value:"edit"},{label:e.commit.actions.regenerate,value:"regenerate"},{label:e.commit.actions.cancel,value:"cancel"}]});T(g)&&(d(r.dim(e.commit.processStopped)),process.exit(0));let I=g;if(I==="accept")L=!0;else if(I==="edit"){let A=await de({message:e.commit.editPrompt,initialValue:s});T(A)&&(d(r.dim(e.commit.processStopped)),process.exit(0)),s=A,L=!0}else if(I==="regenerate"){c.start(r.blue(e.commit.regenerating));let A=S(c,e.commit.generatingSlow10,e.commit.generatingSlow60);try{s=await y.generateCommitMessage(f,i.signal,{regenerate:!0}),A(),s=await ce(s,y,f,i.signal,c),c.succeed(r.green(e.commit.regenerated))}catch(W){A(),c.fail(r.red(e.commit.regenerationFailed(W.message))),W.name==="AbortError"&&(d(r.yellow(e.commit.generationCancelled)),process.exit(0))}}else d(r.dim(e.commit.processStopped)),process.exit(0)}await ne()||(c.fail(r.red.bold(e.common.noRemote.header)),d(r.yellow(e.common.noRemote.instruction)),process.exit(1));try{c.start(r.blue(e.commit.committing));let g=S(c,e.commit.committingSlow10,e.commit.committingSlow60);await me.commit(s),g(),c.succeed(r.green(e.common.success.committed)),c.start(r.blue(e.commit.pushing));let I=S(c,e.commit.pushingSlow10,e.commit.pushingSlow60);await me.push(),I(),c.succeed(r.green.bold(e.common.success.pushed)),d(r.green(e.commit.outro))}catch(g){c.fail(r.red.bold(e.commit.operationFailed)),d(r.red(K(g))),process.exit(1)}}catch(n){(n.name==="ExitPromptError"||n.name==="AbortError")&&(d(r.red(e.common.operationCancelled)),process.exit(0)),K(n),process.exit(1)}finally{process.stdin.removeListener("data",a),process.stdin.setRawMode?.(!1),t?.(null)}}var ue="1.0.14",ge="Ship commits at the speed of thought.";var R=null,P=new Te,ke=Ee(process.argv[1]);P.name(ke);P.description(ge);P.version(ue,"-v, --version","output the version number");P.action(async()=>{let t=process.argv.slice(2).includes("--dry-run");await z(t,i=>{R=i}),R=null});P.command("commit").description("Stage changes, generate a message, and push").option("--dry-run","Generate commit message but do not commit or push").action(async o=>{let t=process.argv.includes("--dry-run");await z(t,i=>{R=i}),R=null});P.command("config").description("Configure AI providers and API keys").action(_);P.command("reset").description("Delete the local config.json file").action(Y);process.on("SIGINT",()=>{console.log(Me.yellow(e.common.interrupted)),R?R.abort():process.exit(0)});P.parse();
|
package/output.txt
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
```markdown pai config
|
|
2
|
+
┌ Welcome to PushAI. Let's get things set up.
|
|
3
|
+
│
|
|
4
|
+
◇ Choose from the available AI providers:
|
|
5
|
+
│ Google Gemini
|
|
6
|
+
│
|
|
7
|
+
◇ Enter your gemini API key:
|
|
8
|
+
│ ***************************************
|
|
9
|
+
│
|
|
10
|
+
◇ Which model would you like to use?
|
|
11
|
+
│ Gemini 3.1 Flash Lite
|
|
12
|
+
│
|
|
13
|
+
└ Configuration complete. You're ready to go!
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
```markdown pai commit
|
|
17
|
+
┌ ● GEMINI • gemini-3.1-flash-lite
|
|
18
|
+
│
|
|
19
|
+
✔ Commit message generated.
|
|
20
|
+
│
|
|
21
|
+
◇ Ready to commit ───────────────────────────────────╮
|
|
22
|
+
│ │
|
|
23
|
+
│ feat(providers): add streaming support for Gemini │
|
|
24
|
+
│ │
|
|
25
|
+
├─────────────────────────────────────────────────────╯
|
|
26
|
+
│
|
|
27
|
+
◇ What would you like to do next?
|
|
28
|
+
│ Commit and push changes
|
|
29
|
+
│
|
|
30
|
+
✔ Changes committed successfully.
|
|
31
|
+
│
|
|
32
|
+
✔ Changes pushed successfully.
|
|
33
|
+
│
|
|
34
|
+
└ Successfully synced with the remote repository.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```markdown pai commit --dry-run
|
|
38
|
+
┌ ● GEMINI • gemini-3.1-flash-lite
|
|
39
|
+
│
|
|
40
|
+
✔ Commit message generated.
|
|
41
|
+
│
|
|
42
|
+
◇ Ready to commit ───────────────────────────────────╮
|
|
43
|
+
│ │
|
|
44
|
+
│ feat(providers): add streaming support for Gemini │
|
|
45
|
+
│ │
|
|
46
|
+
├─────────────────────────────────────────────────────╯
|
|
47
|
+
│
|
|
48
|
+
└ [DRY RUN] No changes were committed or pushed.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```markdown pai reset
|
|
52
|
+
┌ Resetting PushAI configuration
|
|
53
|
+
│
|
|
54
|
+
◇ Remove all PushAI configurations and API keys?
|
|
55
|
+
│ ● Yes / ○ No
|
|
56
|
+
│
|
|
57
|
+
└ PushAI configuration removed successfully.
|
|
58
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pushai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "Ship commits at the speed of thought.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"pai": "./dist/index.mjs",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"dev": "tsup src/index.ts --format esm --watch --clean",
|
|
11
|
-
"build": "tsup
|
|
11
|
+
"build": "tsup",
|
|
12
12
|
"start": "pnpm build && clear && node dist/index.mjs",
|
|
13
13
|
"pushout": "npm publish",
|
|
14
14
|
"pushout-inc": "npm version patch --no-git-tag-version && pnpm pushout"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"name": "Holiday",
|
|
39
39
|
"url": "https://thelastofinusa.vercel.app"
|
|
40
40
|
},
|
|
41
|
-
"license": "
|
|
41
|
+
"license": "MIT",
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@clack/prompts": "^1.4.0",
|
|
44
44
|
"@google/genai": "^2.3.0",
|