Skip to content

Commit 5623663

Browse files
test: add tests for thinking (#9)
* WIP test: add tests for thinking * chore: fix thinking test - add chrush.md - add check to google provider - make all tests use testify * chore: remove duplicate name const * test: add more specific reasoning tests * chore: remove some annoying spell checks * chore: reorganize thinking tests --------- Co-authored-by: Kujtim Hoxha <kujtimii.h@gmail.com>
1 parent 9596881 commit 5623663

18 files changed

Lines changed: 732 additions & 322 deletions

CRUSH.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# CRUSH.md - Fantasy AI SDK
2+
3+
## Build/Test/Lint Commands
4+
- **Build**: `go build ./...`
5+
- **Test all**: `task test` or `go test ./... -count=1`
6+
- **Test single**: `go test -run TestName ./package -v`
7+
- **Test with args**: `task test -- -v -run TestName`
8+
- **Lint**: `task lint` or `golangci-lint run`
9+
- **Format**: `task fmt` or `gofmt -s -w .`
10+
- **Modernize**: `task modernize` or `modernize -fix ./...`
11+
12+
## Code Style Guidelines
13+
- **Package naming**: lowercase, single word (ai, openai, anthropic, google)
14+
- **Imports**: standard library first, then third-party, then local packages
15+
- **Error handling**: Use custom error types with structured fields, wrap with context
16+
- **Types**: Use type aliases for function signatures (`type Option = func(*options)`)
17+
- **Naming**: CamelCase for exported, camelCase for unexported
18+
- **Constants**: Use const blocks with descriptive names (ProviderName, DefaultURL)
19+
- **Structs**: Embed anonymous structs for composition (APICallError embeds *AIError)
20+
- **Functions**: Return error as last parameter, use context.Context as first param
21+
- **Testing**: Use testify/assert, table-driven tests, recorder pattern for HTTP mocking
22+
- **Comments**: Godoc format for exported functions, explain complex logic inline
23+
- **JSON**: Use struct tags for marshaling, handle empty values gracefully
24+
25+
## Project Structure
26+
- `/ai` - Core AI abstractions and agent logic
27+
- `/openai`, `/anthropic`, `/google` - Provider implementations
28+
- `/providertests` - Cross-provider integration tests with VCR recordings
29+
- `/examples` - Usage examples for different patterns

0 commit comments

Comments
 (0)