@tomflow/chatloop-extension 0.4.50 → 0.4.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,10 +78,16 @@ async function nativeMentionAndSend(id,appId,prompt){
78
78
  '[data-testid*="app-item"]','[data-testid*="mention-item"]'];
79
79
  for(let i=0;i<55;i++){
80
80
  if(location.pathname!=='/')return fail('ENTRY_PAGE_CHANGED');
81
- const nodes=[...document.querySelectorAll(selectors.join(','))]
82
- .filter(visible).filter(e=>(e.innerText||'').includes('Chat Loop'));
83
- const matching=nodes.filter(e=>e.getAttribute('data-plugin-impression-id')===appId);
84
- if(matching.length===1){choice=matching[0];break;}
81
+ const all=[...document.querySelectorAll(selectors.join(','))]
82
+ .filter(visible);
83
+ // ChatGPT may render the exact App option with empty innerText.
84
+ // Validate the native App ID first, not its incidental display text.
85
+ const matching=all.filter(e=>e.getAttribute('data-plugin-impression-id')===appId);
86
+ if(matching.length>1)return fail('ENTRY_NATIVE_APP_OPTION_AMBIGUOUS');
87
+ if(matching.length===1&&!matching[0].disabled){
88
+ choice=matching[0];break;
89
+ }
90
+ const nodes=all.filter(e=>(e.innerText||'').includes('Chat Loop'));
85
91
  const exact=nodes.filter(e=>{
86
92
  const t=(e.innerText||'').trim();
87
93
  return t==='Chat Loop'||t.startsWith('Chat Loop\n');
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Chat Loop Extension",
4
- "version": "0.4.50",
4
+ "version": "0.4.51",
5
5
  "description": "Chat Loop browser companion: Eye actions, Turn observer, Continue and Handoff Actions",
6
6
  "permissions": [
7
7
  "activeTab",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomflow/chatloop-extension",
3
- "version": "0.4.50",
3
+ "version": "0.4.51",
4
4
  "type": "module",
5
5
  "description": "Chat Loop Extension: reviewed formal Action pages, including TEST_ONLY native App entry",
6
6
  "bin": {