Skip to content

Comments

Fix: getWindowId and getTabId#86

Merged
veasion merged 2 commits intoFellouAI:developfrom
HairlessVillager:fix/getWindowId-in-getTabId
Mar 4, 2025
Merged

Fix: getWindowId and getTabId#86
veasion merged 2 commits intoFellouAI:developfrom
HairlessVillager:fix/getWindowId-in-getTabId

Conversation

@HairlessVillager
Copy link
Contributor

这个 PR 尝试修复在执行 getTabId 函数时出现的 "Could not find a valid tab" 报错。这个 PR 做了以下修改:

  1. getTabId函数中获取windowId的方式从let windowId = context.variables.get('windowId') as any;修改为let windowId = await getWindowId(context);
  2. 修改了getCurrentTabId的实现,现在它不再返回不期望的undefined了;
  3. 添加了很多日志。

这个 PR 的验证需要很多“在当前标签页操作”的用例(例如“点开这个页面的第一个链接”)。


This PR attempts to fix the "Could not find a valid tab" error that occurs when executing the getTabId function. The following changes have been made in this PR:

  1. The method of obtaining windowId in the getTabId function has been changed from let windowId = context.variables.get('windowId') as any; to let windowId = await getWindowId(context);.
  2. The implementation of getCurrentTabId has been modified so that it no longer returns the undesired undefined.
  3. Numerous logs have been added.

The verification of this PR requires numerous use cases involving "operating within the current tab" (e.g., "click on the first link on this page").

@HairlessVillager HairlessVillager requested a review from veasion March 1, 2025 12:40
@veasion veasion merged commit 4e54beb into FellouAI:develop Mar 4, 2025
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.

2 participants