• Will Chen's avatar
    Inject web crawl user messages correctly (#2129) · eea719f0
    Will Chen 提交于
    <!-- CURSOR_SUMMARY -->
    > [!NOTE]
    > **Fix stable user-message injection across steps**
    > 
    > - Extracts `prepareStepMessages` logic into `prepare_step_utils` with
    `transformContentPart`, `processPendingMessages`, and
    `injectMessagesAtPositions` to track injected messages with
    `insertAtIndex` and FIFO `sequence`, then re-inject them each step at
    the same positions
    > - Updates `local_agent_handler` to use `prepareStepMessages`,
    maintaining `pendingUserMessages` and accumulated `allInjectedMessages`
    > 
    > **Web crawl behavior update**
    > 
    > - `web_crawl` now requires a screenshot and injects only screenshot +
    markdown (HTML removed); clone instructions emphasize screenshot as
    primary visual reference
    > 
    > **Tests**
    > 
    > - Adds comprehensive unit tests for the new utilities and an
    integration-style multi-step simulation validating stable ordering and
    reinjection
    > 
    > <sup>Written by [Cursor
    Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
    3b02b73cf25b497a2d09ab6239ec9e3598ae823e. This will update automatically
    on new commits. Configure
    [here](https://cursor.com/dashboard?tab=bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    
    <!-- This is an auto-generated description by cubic. -->
    ---
    ## Summary by cubic
    Fixes incorrect injection of web-crawl user messages across agent steps.
    Messages are now re-injected at stable positions each step so screenshot
    and markdown context persist across tool rounds.
    
    - **Bug Fixes**
    - Track injected user messages with an insertion index and re-inject
    them every step (sorted in reverse) to keep order and prevent loss.
    - Web crawl now requires a screenshot and injects only screenshot +
    markdown (HTML removed). Updated clone instructions to emphasize the
    screenshot.
    
    <sup>Written for commit 3b02b73cf25b497a2d09ab6239ec9e3598ae823e.
    Summary will update on new commits.</sup>
    
    <!-- End of auto-generated description by cubic. -->
    eea719f0
名称
最后提交
最后更新
..
add_dependency.ts 正在载入提交数据...
add_integration.ts 正在载入提交数据...
delete_file.ts 正在载入提交数据...
edit_file.ts 正在载入提交数据...
execute_sql.ts 正在载入提交数据...
get_supabase_project_info.ts 正在载入提交数据...
get_supabase_table_schema.ts 正在载入提交数据...
list_files.ts 正在载入提交数据...
read_file.ts 正在载入提交数据...
read_logs.ts 正在载入提交数据...
rename_file.ts 正在载入提交数据...
search_replace.ts 正在载入提交数据...
set_chat_summary.ts 正在载入提交数据...
types.ts 正在载入提交数据...
web_crawl.ts 正在载入提交数据...
web_search.ts 正在载入提交数据...
write_file.ts 正在载入提交数据...