Skip to content

Commit 7b70de4

Browse files
Update website memory to use document processing from conversation memory (#1303)
- update website memory to use docparts - Update chunking approach - Update website library management panel to show in full tab view
1 parent bd58b9a commit 7b70de4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+13269
-5500
lines changed

ts/examples/chat/src/memory/knowproWebsite.ts

Lines changed: 559 additions & 19 deletions
Large diffs are not rendered by default.

ts/packages/agents/browser/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"azure-ai-foundry": "workspace:*",
5656
"bootstrap": "^5.3.3",
5757
"chalk": "^5.4.1",
58+
"cheerio": "^1.1.0",
5859
"common-utils": "workspace:*",
5960
"cytoscape": "^3.32.0",
6061
"cytoscape-dagre": "^2.5.0",

ts/packages/agents/browser/scripts/buildExtension.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ copyFileSync(
149149
`${srcDir}/websiteLibraryPanel.html`,
150150
`${chromeOutDir}/websiteLibraryPanel.html`,
151151
);
152+
copyFileSync(
153+
`${srcDir}/websiteLibraryPanel.css`,
154+
`${chromeOutDir}/websiteLibraryPanel.css`,
155+
);
152156
mkdirSync(`${chromeOutDir}/sites`, { recursive: true });
153157
copyFileSync(
154158
`${srcDir}/sites/paleobiodbSchema.mts`,

ts/packages/agents/browser/src/agent/actionHandler.mts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ import {
6363
resolveURLWithHistory,
6464
importWebsiteData,
6565
importWebsiteDataFromSession,
66+
importHtmlFolder,
67+
importHtmlFolderFromSession,
6668
searchWebsites,
6769
getWebsiteStats,
6870
} from "./websiteMemory.mjs";
@@ -380,6 +382,7 @@ async function updateBrowserContext(
380382
}
381383

382384
case "importWebsiteData":
385+
case "importHtmlFolder":
383386
case "searchWebsites":
384387
case "getWebsiteStats": {
385388
const websiteResult = await handleWebsiteAction(
@@ -626,6 +629,8 @@ async function executeBrowserAction(
626629
return closeWebPage(context);
627630
case "importWebsiteData":
628631
return importWebsiteData(context, action);
632+
case "importHtmlFolder":
633+
return importHtmlFolder(context, action);
629634
case "searchWebsites":
630635
return searchWebsites(context, action);
631636
case "getWebsiteStats":
@@ -1020,6 +1025,9 @@ async function handleWebsiteAction(
10201025
case "importWebsiteData":
10211026
return await importWebsiteDataFromSession(parameters, context);
10221027

1028+
case "importHtmlFolder":
1029+
return await importHtmlFolderFromSession(parameters, context);
1030+
10231031
case "searchWebsites":
10241032
// Convert to ActionContext format for existing function
10251033
const searchAction = {

ts/packages/agents/browser/src/agent/actionsSchema.mts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export type BrowserActions =
1919
| CaptureScreenshot
2020
| ReloadPage
2121
| ImportWebsiteData
22+
| ImportHtmlFolder
2223
| SearchWebsites
2324
| GetWebsiteStats;
2425

@@ -148,6 +149,31 @@ export type ImportWebsiteData = {
148149
};
149150
};
150151

152+
// Import HTML files from local folder path
153+
export type ImportHtmlFolder = {
154+
actionName: "importHtmlFolder";
155+
parameters: {
156+
// Folder path containing HTML files
157+
folderPath: string;
158+
// Import options
159+
options?: {
160+
extractContent?: boolean;
161+
enableIntelligentAnalysis?: boolean;
162+
enableActionDetection?: boolean;
163+
extractionMode?: "basic" | "content" | "actions" | "full";
164+
preserveStructure?: boolean;
165+
// Folder-specific options
166+
recursive?: boolean;
167+
fileTypes?: string[];
168+
limit?: number;
169+
maxFileSize?: number;
170+
skipHidden?: boolean;
171+
};
172+
// Import tracking ID
173+
importId: string;
174+
};
175+
};
176+
151177
// Search through imported website data
152178
export type SearchWebsites = {
153179
actionName: "searchWebsites";

0 commit comments

Comments
 (0)