@jackwener/opencli 0.9.1 → 0.9.2
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.
package/dist/cli-manifest.json
CHANGED
package/dist/clis/codex/read.js
CHANGED
|
@@ -10,9 +10,14 @@ export const readCommand = cli({
|
|
|
10
10
|
func: async (page) => {
|
|
11
11
|
const historyText = await page.evaluate(`
|
|
12
12
|
(function() {
|
|
13
|
+
// Precise Codex selector for chat messages
|
|
14
|
+
const turns = Array.from(document.querySelectorAll('[data-content-search-turn-key]'));
|
|
15
|
+
if (turns.length > 0) {
|
|
16
|
+
return turns.map(t => t.innerText || t.textContent).join('\\n\\n---\\n\\n');
|
|
17
|
+
}
|
|
18
|
+
|
|
13
19
|
// Fallback robust scraping heuristic for chat history panes
|
|
14
|
-
|
|
15
|
-
const threadContainer = document.querySelector('[role="log"], [data-testid="conversation"], main, .thread-container, .messages-list');
|
|
20
|
+
const threadContainer = document.querySelector('[role="log"], [data-testid="conversation"], .thread-container, .messages-list, main');
|
|
16
21
|
|
|
17
22
|
if (threadContainer) {
|
|
18
23
|
return threadContainer.innerText || threadContainer.textContent;
|
package/dist/clis/codex/send.js
CHANGED
|
@@ -6,7 +6,7 @@ export const sendCommand = cli({
|
|
|
6
6
|
domain: 'localhost',
|
|
7
7
|
strategy: Strategy.UI,
|
|
8
8
|
browser: true,
|
|
9
|
-
args: [{ name: 'text', required: true, help: 'Text, command (e.g. /review), or skill (e.g. $imagegen)' }],
|
|
9
|
+
args: [{ name: 'text', required: true, positional: true, help: 'Text, command (e.g. /review), or skill (e.g. $imagegen)' }],
|
|
10
10
|
columns: ['Status', 'InjectedText'],
|
|
11
11
|
func: async (page, kwargs) => {
|
|
12
12
|
const textToInsert = kwargs.text;
|
package/package.json
CHANGED
package/src/clis/codex/read.ts
CHANGED
|
@@ -11,9 +11,14 @@ export const readCommand = cli({
|
|
|
11
11
|
func: async (page) => {
|
|
12
12
|
const historyText = await page.evaluate(`
|
|
13
13
|
(function() {
|
|
14
|
+
// Precise Codex selector for chat messages
|
|
15
|
+
const turns = Array.from(document.querySelectorAll('[data-content-search-turn-key]'));
|
|
16
|
+
if (turns.length > 0) {
|
|
17
|
+
return turns.map(t => t.innerText || t.textContent).join('\\n\\n---\\n\\n');
|
|
18
|
+
}
|
|
19
|
+
|
|
14
20
|
// Fallback robust scraping heuristic for chat history panes
|
|
15
|
-
|
|
16
|
-
const threadContainer = document.querySelector('[role="log"], [data-testid="conversation"], main, .thread-container, .messages-list');
|
|
21
|
+
const threadContainer = document.querySelector('[role="log"], [data-testid="conversation"], .thread-container, .messages-list, main');
|
|
17
22
|
|
|
18
23
|
if (threadContainer) {
|
|
19
24
|
return threadContainer.innerText || threadContainer.textContent;
|
package/src/clis/codex/send.ts
CHANGED
|
@@ -7,7 +7,7 @@ export const sendCommand = cli({
|
|
|
7
7
|
domain: 'localhost',
|
|
8
8
|
strategy: Strategy.UI,
|
|
9
9
|
browser: true,
|
|
10
|
-
args: [{ name: 'text', required: true, help: 'Text, command (e.g. /review), or skill (e.g. $imagegen)' }],
|
|
10
|
+
args: [{ name: 'text', required: true, positional: true, help: 'Text, command (e.g. /review), or skill (e.g. $imagegen)' }],
|
|
11
11
|
columns: ['Status', 'InjectedText'],
|
|
12
12
|
func: async (page, kwargs) => {
|
|
13
13
|
const textToInsert = kwargs.text as string;
|