saeeol 1.2.7 → 1.2.9
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/bin/saeeol +187 -0
- package/package.json +15 -13
- package/src/cli/cmd/tui/component/dialog/dialog-command.tsx +2 -3
- package/src/cli/cmd/tui/component/dialog/dialog-mcp.tsx +0 -2
- package/src/cli/cmd/tui/component/dialog/dialog-stash.tsx +0 -1
- package/src/cli/cmd/tui/context/app/helper.tsx +2 -3
- package/src/cli/cmd/tui/context/app/sdk.tsx +2 -4
- package/src/cli/cmd/tui/context/app/sync.tsx +0 -1
- package/src/cli/cmd/tui/context/app/theme.tsx +0 -1
- package/src/cli/cmd/tui/context/runtime/local.tsx +0 -3
- package/src/ltm/config.ts +2 -12
- package/src/ltm/memory/procedural.ts +2 -12
- package/src/ltm/pipeline.ts +3 -19
- package/src/ltm/scheduler.ts +2 -14
- package/src/ltm/store.ts +2 -11
- package/src/ltm/types.ts +2 -8
- package/src/provider/local/embedder.ts +2 -18
- package/src/session/core/llm.ts +2 -6
- package/src/session/core/retry.ts +2 -6
- package/src/session/core/session-events.ts +101 -0
- package/src/session/core/session-types.ts +5 -7
- package/src/session/core/session.ts +5 -43
- package/src/session/message/message-errors.ts +2 -6
- package/src/session/message/message-parts.ts +2 -4
- package/src/session/prompt/prompt.ts +2 -3
- package/src/tool/file/apply_patch.ts +0 -21
- package/src/tool/file/edit-replacers.ts +2 -3
- package/src/tool/integration/package.ts +2 -4
- package/src/tool/search/warpgrep.ts +0 -8
- package/src/tool/search/webfetch.ts +2 -10
- package/tsconfig.json +19 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Effect, Schema } from "effect"
|
|
1
|
+
import { Effect, Schema } from "effect"
|
|
2
2
|
import { HttpClient, HttpClientRequest } from "effect/unstable/http"
|
|
3
3
|
import * as Tool from "../core/tool"
|
|
4
4
|
import TurndownService from "turndown"
|
|
@@ -49,8 +49,6 @@ export const WebFetchTool = Tool.define(
|
|
|
49
49
|
})
|
|
50
50
|
|
|
51
51
|
const timeout = Math.min((params.timeout ?? DEFAULT_TIMEOUT / 1000) * 1000, MAX_TIMEOUT)
|
|
52
|
-
|
|
53
|
-
// Build Accept header based on requested format with q parameters for fallbacks
|
|
54
52
|
let acceptHeader = "*/*"
|
|
55
53
|
switch (params.format) {
|
|
56
54
|
case "markdown":
|
|
@@ -92,8 +90,6 @@ export const WebFetchTool = Tool.define(
|
|
|
92
90
|
),
|
|
93
91
|
Effect.timeoutOrElse({ duration: timeout, orElse: () => Effect.die(new Error("Request timed out")) }),
|
|
94
92
|
)
|
|
95
|
-
|
|
96
|
-
// Check content length
|
|
97
93
|
const contentLength = response.headers["content-length"]
|
|
98
94
|
if (contentLength && parseInt(contentLength) > MAX_RESPONSE_SIZE) {
|
|
99
95
|
throw new Error("Response too large (exceeds 5MB limit)")
|
|
@@ -125,8 +121,6 @@ export const WebFetchTool = Tool.define(
|
|
|
125
121
|
}
|
|
126
122
|
|
|
127
123
|
const content = new TextDecoder().decode(arrayBuffer)
|
|
128
|
-
|
|
129
|
-
// Handle content based on requested format and actual content type
|
|
130
124
|
switch (params.format) {
|
|
131
125
|
case "markdown":
|
|
132
126
|
if (contentType.includes("text/html")) {
|
|
@@ -167,12 +161,10 @@ async function extractTextFromHTML(html: string) {
|
|
|
167
161
|
skipContent = true
|
|
168
162
|
},
|
|
169
163
|
text() {
|
|
170
|
-
// Skip text content inside these elements
|
|
171
164
|
},
|
|
172
165
|
})
|
|
173
166
|
.on("*", {
|
|
174
167
|
element(element) {
|
|
175
|
-
// Reset skip flag when entering other elements
|
|
176
168
|
if (!["script", "style", "noscript", "iframe", "object", "embed"].includes(element.tagName)) {
|
|
177
169
|
skipContent = false
|
|
178
170
|
}
|
|
@@ -199,4 +191,4 @@ function convertHTMLToMarkdown(html: string): string {
|
|
|
199
191
|
})
|
|
200
192
|
turndownService.remove(["script", "style", "meta", "link"])
|
|
201
193
|
return turndownService.turndown(html)
|
|
202
|
-
}
|
|
194
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "@tsconfig/bun/tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"jsx": "preserve",
|
|
6
|
+
"jsxImportSource": "@opentui/solid",
|
|
7
|
+
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
|
8
|
+
"types": [],
|
|
9
|
+
"noUncheckedIndexedAccess": false,
|
|
10
|
+
"customConditions": ["browser"],
|
|
11
|
+
"paths": {
|
|
12
|
+
"@/*": ["./src/*"],
|
|
13
|
+
"@/saeeol/*": ["./src/overlay/*"],
|
|
14
|
+
"@tui/*": ["./src/cli/cmd/tui/*"],
|
|
15
|
+
"@test/*": ["./test/*"]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"exclude": ["src/provider/models-snapshot.ts"]
|
|
19
|
+
}
|