Skip to content

rewrite#3

Merged
otnc merged 11 commits into
mainfrom
refactor/rewrite
May 20, 2026
Merged

rewrite#3
otnc merged 11 commits into
mainfrom
refactor/rewrite

Conversation

@otnc

@otnc otnc commented May 20, 2026

Copy link
Copy Markdown
Owner

closes #2

otnc and others added 11 commits May 19, 2026 01:15
- Replace JS with TypeScript (strict, verbatimModuleSyntax, isolatedDeclarations, erasableSyntaxOnly)
- Build with tsdown (ESM + CJS dual output)
- Replace axios with ky
- Rename allModels() -> models(); remove curated data/ list
- Remove all parameter from searchModels(); always searches live API
- Add vitest test suite (28 tests across 5 files)
- Add ESLint flat config + Prettier
- Add GitHub Actions: ci.yml and publish.yml (manual, creates release tag)
- Remove canary/ (dead code duplicate)
- Fix conflicting types/closewords.d.ts that shadowed package's own types

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add StreamChunk type to src/types.ts
- Add stream() async generator and ask() shortcut to src/generate.ts
- Add setSystem(), clearMessages(), useConversation(), ask(), stream()
  to AI class; constructor accepts system option
- Conversation history is keyed by arbitrary string ID; calls without
  an active ID are stateless
- Update src/index.ts exports
- Add varsIgnorePattern to eslint no-unused-vars rule
- Add examples/stream.js

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- closewords v3.1.1 ships proper ESM/CJS dual exports; remove
  workaround type cast in search.ts and stale createRequire comment
- Mock closewords in search.test.ts via vi.mock (now possible with
  ESM exports); fixes internal levenshtein.get error in v3.1.1
- Update repository, bugs, and homepage URLs from oto-lab to otnc

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Restructure both READMEs: clean method tables with Returns column,
  separate static context and conversation sections, add CompletionResponse
  to Types, annotate stream() return type as AsyncGenerator<string>
- Add README-ja.md (Japanese translation, fully aligned with English)
- Keep "unlimited-ai is back!" and v6.x caution (v7 not yet published)
- Note conversation history as a new feature in the changelog

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedtypescript-eslint@​8.59.31001007498100
Addedvitest@​4.1.6961007999100
Addedclosewords@​3.1.1841008888100
Addedeslint-config-prettier@​10.1.810010010087100
Addedky@​2.0.28810010093100
Addedtsdown@​0.22.0981008896100
Added@​eslint/​js@​10.0.110010010088100
Addedeslint@​10.4.08910010096100
Addedtypescript@​6.0.3100100909690
Addedprettier@​3.8.3901009793100

View full report

@otnc otnc self-assigned this May 20, 2026
@otnc otnc merged commit 2c45909 into main May 20, 2026
3 checks passed
@otnc otnc deleted the refactor/rewrite branch May 20, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rewrite TS

1 participant