Skip to content

docs: document features from v0.0.55–v0.0.58 - #81

Merged
alichherawalla merged 1 commit into
mainfrom
docs/update-for-v055-v058
Feb 25, 2026
Merged

alichherawalla merged 1 commit into
mainfrom
docs/update-for-v055-v058

Conversation

@alichherawalla

Copy link
Copy Markdown
Collaborator

Summary

Update README.md, ARCHITECTURE.md, and CODEBASE_GUIDE.md to document features introduced in releases v0.0.55 through v0.0.58 that were missing from documentation:

  • Tool Calling — Full documentation of the tool calling system (web search, calculator, date/time, device info), tool loop, capability gating, and implementation files
  • KV Cache Type — Configurable f16/q8_0/q4_0 cache quantization
  • Flash Attention — User-configurable toggle with Android GPU constraint enforcement
  • Markdown Rendering — Rich text output in chat messages
  • llama.cpp Parameter Constraints — Automatic enforcement preventing native crashes
  • Background Downloads — Updated to reflect both-platform support (Android + iOS)

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (code change that neither fixes a bug nor adds a feature)
  • Chore (build process, CI, dependency updates, etc.)

Screenshots / Screen Recordings

N/A — documentation-only changes.

Checklist

General

  • My code follows the project's coding style and conventions
  • I have performed a self-review of my code
  • I have added/updated comments where the logic isn't self-evident
  • My changes generate no new warnings or errors

Testing

  • I have tested on Android (physical device or emulator)
  • I have tested on iOS (physical device or simulator)
  • I have tested in light mode and dark mode
  • Existing tests pass locally (npm test)
  • I have added tests that prove my fix is effective or my feature works

React Native Specific

N/A — no code changes.

Performance & Models

N/A — no code changes.

Security

  • No secrets, API keys, or credentials are included in the code
  • User input is validated/sanitized where applicable

Related Issues

N/A

Additional Notes

Reviewed release notes for v0.0.55, v0.0.56, v0.0.57, and v0.0.58. The most significant undocumented feature was the tool calling system introduced in v0.0.58.

…rendering

Document features from v0.0.55–v0.0.58 that were missing from docs:
- Tool calling system (web search, calculator, date/time, device info)
- Configurable KV cache type (f16/q8_0/q4_0) and flash attention toggle
- llama.cpp parameter constraint enforcement
- Markdown rendering in chat messages
- Background download improvements (both platforms)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @alichherawalla, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the project's documentation to cover features introduced in recent releases (v0.0.55–v0.0.58) that were previously undocumented. The changes primarily focus on detailing the new tool calling system, various LLM inference optimizations like KV cache types and flash attention, markdown rendering capabilities, and enhanced parameter constraint enforcement for llama.cpp. Additionally, the documentation for background downloads has been expanded to reflect cross-platform support.

Highlights

  • Tool Calling: Full documentation of the tool calling system, including web search, calculator, date/time, device info, tool loop, capability gating, and implementation files.
  • KV Cache Type: Documentation for configurable f16/q8_0/q4_0 cache quantization.
  • Flash Attention: Documentation for user-configurable toggle with Android GPU constraint enforcement.
  • Markdown Rendering: Documentation for rich text output in chat messages.
  • llama.cpp Parameter Constraints: Documentation for automatic enforcement preventing native crashes.
  • Background Downloads: Updated documentation to reflect both-platform support (Android + iOS).
Changelog
  • README.md
    • Updated core features and capabilities to include tool calling and markdown rendering.
    • Introduced a new section detailing the 'Tool Calling' feature, including available tools like web search, calculator, date/time, and device info.
  • docs/ARCHITECTURE.md
    • Added 'Tool Calling' to the architecture table.
    • Documented configurable KV cache types (f16/q8_0/q4_0) and flash attention toggle with Android GPU constraints.
    • Included details on markdown rendering and automatic llama.cpp parameter constraint enforcement.
    • Added a comprehensive 'Tool Calling' section covering available tools, tool loop mechanics, capability gating, and implementation files.
    • Updated settings documentation to include flash attention, KV cache type, and enabled tools.
  • docs/standards/CODEBASE_GUIDE.md
    • Expanded core capabilities to include tool calling and markdown rendering.
    • Updated the description of BackgroundDownloadService to reflect iOS support.
    • Detailed the new directory structure for src/services/tools/ and related tool calling orchestration files.
    • Introduced a detailed section for 'Tool Calling Services', outlining the Tool Registry, Handlers, Loop, and LLM Tool Generation.
    • Updated the Settings table to include flashAttention, kvCacheType, and enabledTools.
    • Updated GenerationMeta to include kvCacheType and flashAttention fields.
    • Updated llmService description to include tool calling capability detection, configurable KV cache type, flash attention, and parameter constraint enforcement.
    • Added a note about tool calling entering the tool loop in the generation flow.
Activity
  • The author reviewed release notes for versions v0.0.55 through v0.0.58 to identify features lacking documentation.
  • The tool calling system, introduced in v0.0.58, was identified as the most significant undocumented feature.
  • The author performed a self-review, ensuring adherence to coding style and conventions.
  • Comments were added or updated where logic was not self-evident.
  • The changes generate no new warnings or errors.
  • Existing tests passed locally.
  • Security checks confirmed no secrets, API keys, or credentials are included, and user input is validated/sanitized.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@sonarqubecloud

Copy link
Copy Markdown

@alichherawalla
alichherawalla merged commit 987c5e1 into main Feb 25, 2026
5 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request provides a comprehensive documentation update for features introduced in versions v0.0.55 through v0.0.58. The changes across README.md, ARCHITECTURE.md, and CODEBASE_GUIDE.md are thorough and well-structured. I've identified a couple of minor areas in the documentation where accuracy and consistency could be improved, and I've provided suggestions for them.

Comment on lines +620 to +621
- Android: Persists download state in SharedPreferences, 500ms polling for progress
- iOS: Uses background URLSession with app lifecycle integration

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The documentation here suggests that download state persistence is an Android-only feature. However, the implementation in ios/DownloadManagerModule.swift shows that state is also persisted on iOS using UserDefaults. To improve accuracy, it would be clearer to state that persistence is supported on both platforms and then detail the platform-specific implementations.

Suggested change
- Android: Persists download state in SharedPreferences, 500ms polling for progress
- iOS: Uses background URLSession with app lifecycle integration
- Persists download state on both platforms (Android: SharedPreferences, iOS: UserDefaults)
- Android: 500ms polling for progress updates
- iOS: Uses background URLSession with app lifecycle integration

**Tool Loop (`generationToolLoop.ts`):**
- Orchestrates multi-turn tool execution: LLM → parse → execute → inject → repeat
- Hard limits: 3 iterations, 5 total tool calls
- Supports structured tool calls AND fallback XML tag parsing for smaller models

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with ARCHITECTURE.md (line 203), consider wrapping the XML tag <tool_call> in backticks to format it as code.

Suggested change
- Supports structured tool calls AND fallback XML tag parsing for smaller models
- Supports structured tool calls AND fallback XML tag parsing (`<tool_call>`) for smaller models

@alichherawalla

Copy link
Copy Markdown
Collaborator Author

Addressed both Gemini review comments in 4b35dda:

  1. Clarified download state persistence is on both platforms (Android: SharedPreferences, iOS: UserDefaults)
  2. Added backtick formatting for <tool_call> XML tag reference

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request does an excellent job of documenting several new features across the README, architecture guide, and codebase guide. The documentation is thorough and clear. I've found a few minor inconsistencies in property names within CODEBASE_GUIDE.md compared to the source code and have left suggestions to align them for accuracy.

| **Loading Flags** | `isLoadingModel`, `isGeneratingImage` | Not persisted |
| **Downloads** | `downloadProgress{}`, `activeBackgroundDownloads[]` | Background downloads persisted (Android) |
| **Settings** | `systemPrompt`, `temperature`, `maxTokens`, `topP`, `repeatPenalty`, `contextLength`, `nThreads`, `nBatch`, `useGPU`, `nGPULayers`, `modelLoadingStrategy` | All persisted |
| **Settings** | `systemPrompt`, `temperature`, `maxTokens`, `topP`, `repeatPenalty`, `contextLength`, `nThreads`, `nBatch`, `useGPU`, `nGPULayers`, `modelLoadingStrategy`, `flashAttention`, `kvCacheType` | All persisted |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's a small inconsistency between the documented setting names and the actual implementation in the appStore. The documentation lists flashAttention and kvCacheType, but the store uses flashAttn and cacheType. To maintain consistency, it would be best to update the documentation to match the code.

Suggested change
| **Settings** | `systemPrompt`, `temperature`, `maxTokens`, `topP`, `repeatPenalty`, `contextLength`, `nThreads`, `nBatch`, `useGPU`, `nGPULayers`, `modelLoadingStrategy`, `flashAttention`, `kvCacheType` | All persisted |
| **Settings** | `systemPrompt`, `temperature`, `maxTokens`, `topP`, `repeatPenalty`, `contextLength`, `nThreads`, `nBatch`, `useGPU`, `nGPULayers`, `modelLoadingStrategy`, `flashAttn`, `cacheType` | All persisted |


GenerationMeta
├── gpu, gpuBackend?, gpuLayers?
├── kvCacheType?, flashAttention?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The GenerationMeta type definition in the documentation seems to have a couple of inconsistencies with the actual type in src/types/index.ts. The documentation adds kvCacheType? and flashAttention?, but the type definition uses cacheType? and does not include flashAttention. It would be great to align the documentation with the implementation.

Suggested change
├── kvCacheType?, flashAttention?
├── cacheType?

- Final message saved to conversation with `generationMeta`:
- `tokensPerSecond`, `decodeTokensPerSecond`, `timeToFirstToken`, `tokenCount`
- `gpu` (boolean), `gpuBackend`, `gpuLayers`
- `kvCacheType`, `flashAttention`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to another comment, the properties listed for generationMeta here don't quite match the implementation. The documentation lists kvCacheType and flashAttention, but the GenerationMeta type in the code uses cacheType and doesn't include a flash attention property. Let's update this for accuracy.

Suggested change
- `kvCacheType`, `flashAttention`
- `cacheType`

@alichherawalla

Copy link
Copy Markdown
Collaborator Author

Addressed all 3 new Gemini comments in 1879ecf:

  1. Fixed flashAttention → flashAttn to match appStore.ts field name
  2. Fixed kvCacheType → cacheType to match GenerationMeta type and appStore.ts
  3. Fixed default cacheType from f16 to q8_0 to match implementation

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request provides a comprehensive update to the project's documentation, covering new features from versions v0.0.55 to v0.0.58, including tool calling, KV cache types, and Flash Attention. The changes are clear and well-integrated into the existing documentation. I've found one minor inconsistency that could be improved for clarity.

**Tool Loop (`generationToolLoop.ts`):**
- Orchestrates multi-turn tool execution: LLM → parse → execute → inject → repeat
- Hard limits: 3 iterations, 5 total tool calls
- Supports structured tool calls AND fallback XML tag parsing for smaller models

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with ARCHITECTURE.md and to provide more detail, it would be good to mention the specific XML tag used for fallback tool call parsing.

Suggested change
- Supports structured tool calls AND fallback XML tag parsing for smaller models
- Supports structured tool calls AND fallback XML tag parsing (`<tool_call>`) for smaller models

@alichherawalla

Copy link
Copy Markdown
Collaborator Author

The <tool_call> backtick formatting was already applied in 4b35dda. The current code at line 645 matches the suggestion exactly. No further changes needed.

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.

1 participant