Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[FR]: Testing agent should handle AppFunctionUriGrant results and pass returned images to the model

未关闭
#63 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
android, kotlin
领域
ai, mobile

调研方向

Start with AgentOrchestrator.handleLlmResponse around line 301 and trace how function results are converted into chat content; compare the existing imageUri handling with AppFunctionUriGrant. Then inspect GeminiProviderImpl to see how the next model turn is built. Done means granted image URIs reach Gemini as image input and the returned image is handled in chat as described.

由索引模型根据 Issue 内容生成。

描述

Description

A function can return an image the standard way, as an AppFunctionUriGrant (a content URI plus FLAG_GRANT_READ_URI_PERMISSION). The Testing Agent doesn't recognize this:

  1. Not shown: AgentOrchestrator.handleLlmResponse (around line 301) only picks up images from a result field named imageUri, the agent's own convention from generateImage (see #12). A standard AppFunctionUriGrant result is passed to the model as plain text, and no image appears in the chat.
  2. Not seen by the model: even with imageUri, the image is only attached to the chat message for the user. GeminiProviderImpl never sends image content to the model, so a function's returned image never reaches the LLM.
Why it matters

Visual apps rely on returning renders so the agent can check its own work. For example, a design app can expose renderDesign(): AppFunctionUriGrant and instruct the agent to render after changes and correct what it sees. With the Testing Agent, the model works blind, so this loop can't be tested at all, even though it is exactly the kind of flow a system agent would need to support.

Suggested behavior
  • Recognize AppFunctionUriGrant (or any result whose URI points to an image/* type) as an image result, alongside the imageUri convention.
  • Read it through the granted permission and attach it to the next model turn as image input (Gemini inline_data), so the model can see it.
  • Optionally show it inline in the chat, as #12 did for imageUri.
Environment
  • Testing Agent at a3a2a89 (main, Oct 23, 2026)
  • androidx.appfunctions 1.0.0-beta01
  • Android 17 (API 37) emulator

Related: #12 (inline image URIs in the chat), #62.

主要语言
Kotlin
星标
210
派生
45
平均合并
12 小时 24 分钟
30 天内合并 PR
3

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

android/appfunctions 的其他 Issue

查看 android/appfunctions 的全部 Issue

相似的 Issue

更多 Kotlin Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。