kbot: include fix | vpl tests

This commit is contained in:
Code 2025-02-02 00:15:41 +01:00
parent 371dc97aa8
commit b02f05fe25
13 changed files with 122 additions and 37 deletions

View File

@ -551,6 +551,32 @@
"outputCapture": "std", "outputCapture": "std",
"console": "integratedTerminal", // <= the relevant part "console": "integratedTerminal", // <= the relevant part
}, },
{
"type": "node",
"request": "launch",
"name": "images:jpg-svg",
"skipFiles": [],
"program": "${workspaceFolder}\\main.js",
"outFiles": [
"${workspaceFolder}/**/*.js"
],
"cwd": "${workspaceFolder}",
"args": [
"identify all components (control panel), as markdown table : id, name, description, specs, count, ... - its a plastic extruder using PIDs",
"--logLevel=2",
"--include=./tests/images/lydia-4.5-ex-cp.jpg",
"--dst=./tests/images/lydia-4.5-ex-cp.md",
"--mode=completion",
"--preferences=none",
"--router2=openai",
"--model2=openai/gpt-4o",
"--disable='npm,terminal,search,interact,git'"
],
"resolveSourceMapLocations": [
"${workspaceFolder}/**"
],
"outputCapture": "std"
},
{ {
"type": "node", "type": "node",
"request": "launch", "request": "launch",

View File

@ -61,6 +61,7 @@ const onCompletion = async (result = "", options) => {
process.stdout.write(content); process.stdout.write(content);
} }
(0, script_1.dumpAsScript)(options); (0, script_1.dumpAsScript)(options);
process.exit(0);
return result; return result;
}; };
exports.onCompletion = onCompletion; exports.onCompletion = onCompletion;
@ -78,4 +79,4 @@ const runCompletion = async (client, params, options) => {
return result; return result;
}; };
exports.runCompletion = runCompletion; exports.runCompletion = runCompletion;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVuLWNvbXBsZXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY29tbWFuZHMvcnVuLWNvbXBsZXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRUEsbUNBQStCO0FBQy9CLHFEQUFnRD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TSxDQUFXLENBQUM7UUFDakQsT0FBTyxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUE7SUFDL0IsQ0FBQztJQUNELElBQUEscUJBQVksRUFBQyxPQUFPLENBQUMsQ0FBQTtJQUNyQixPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFBO0lBQ2YsT0FBTyxNQUFNLENBQUE7QUFDZixDQUFDLENBQUE7QUFwQlksUUFBQSxZQUFZLGdCQW9CeEI7QUFFTSxNQUFNLGFBQWEsR0FBRyxLQUFLLEVBQUUsTUFBYyxFQUFFLE1BQVcsRUFBRSxPQUFrQixFQUFFLEVBQUU7SUFDckYsSUFBSSxPQUFPLENBQUMsR0FBRyxFQUFFLENBQUM7UUFDaEIsVUFBTSxDQUFDLElBQUksQ0FBQyw2QkFBNkIsQ0FBQyxDQUFBO1FBQzFDLE9BQU8sS0FBSyxDQUFBO0lBQ2QsQ0FBQztJQUNELE1BQU0sVUFBVSxHQUFHLE1BQU0sTUFBTSxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUFDO1FBQ3RELEtBQUssRUFBRSxPQUFPLENBQUMsS0FBSztRQUNwQixRQUFRLEVBQUUsTUFBTSxDQUFDLFFBQVE7S0FDMUIsQ0FBQyxDQUFBO0lBQ0YsTUFBTSxNQUFNLEdBQUcsVUFBVSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsT0FBTyxDQUFBO0lBQ3BELElBQUEsb0JBQVksRUFBQyxNQUFNLEVBQUUsT0FBTyxDQUFDLENBQUE7SUFDN0IsT0FBTyxNQUFNLENBQUE7QUFDZixDQUFDLENBQUE7QUFaWSxRQUFBLGFBQWEsaUJBWXpCIn0=

File diff suppressed because one or more lines are too long

View File

@ -1,30 +0,0 @@
# Personal Preferences Configuration
This file stores personal information and preferences to help the AI assistant provide more personalized and contextual responses.
## My Preferences
Gender : male
Location : Sentmenat, Barcelona, Spain
Language : German, prefer english
Occupation : software developer, Typescript
Age : 45+
## Contacts
My email address : cgoflyn@gmail.com
My wife's email (Anne) : barbier.anne13@gmail.com
## Content
When creating content
- always Markdown
- always add links to sources
- when sending emails, always add 'kind regards, Guenter'
- when sending emails to Anne, always in french
- when searching for news, always add links to videos, search via Google and other news outlets
- always include the prompt in the result
- Markdown
- always new lines after headings
- no need to test file for existence

View File

@ -27,6 +27,7 @@ export const onCompletion = async (result: any = "", options: IKBotTask) => {
process.stdout.write(content) process.stdout.write(content)
} }
dumpAsScript(options) dumpAsScript(options)
process.exit(0)
return result return result
} }

View File

@ -114,6 +114,11 @@ export const processRun = async (opts: IKBotTask) => {
* *
*/ */
function extractPaths(input: string): string[] { function extractPaths(input: string): string[] {
if(exists(path.resolve(resolve(input)))){
return [input]
}
// Matches either a Windows drive pattern like "C:\" or a forward slash "/". // Matches either a Windows drive pattern like "C:\" or a forward slash "/".
// Parentheses group with `|` to match either part correctly. // Parentheses group with `|` to match either part correctly.
const pathStartRegex = /([A-Za-z]:\\)|\//g; const pathStartRegex = /([A-Za-z]:\\)|\//g;
@ -155,8 +160,9 @@ export const run = async (opts: IKBotTask) => {
const ret = [] const ret = []
if (opts.include) { if (opts.include) {
if (isString(opts.include)) { if (isString(opts.include)) {
opts.include = extractPaths(opts.include) opts.include = [opts.include]
}else if (isArray(opts.include)) { }
if (isArray(opts.include)) {
opts.include = flattenArrays(opts.include.map(extractPaths)) opts.include = flattenArrays(opts.include.map(extractPaths))
} }
opts.include = Array.from(new Set(opts.include)) opts.include = Array.from(new Set(opts.include))

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -0,0 +1,10 @@
| ID | Name | Description | Size | Configuration |
|---|---|---|---|---|
| 1 | Motor Flange | Connection point for motor | Ø160mm | Circular flange with bolt holes |
| 2 | Drive Coupling | Connects motor to screw | Ø60mm approx. | Threaded connection |
| 3 | Support Flange | Bearing support and alignment | Ø100mm approx. | Flanged bearing housing |
| 4 | Screw | Material conveying element | Ø40mm approx. | Helical flight design |
| 5 | Barrel | Main extruder body | Ø50mm | Cylindrical tube |
| 6 | End Cap | Barrel termination | Ø50mm | Threaded or bolted connection |
The image shows a typical plastic extruder screw assembly. The components are arranged in a linear configuration with the motor flange at one end and the end cap at the other. The screw appears to be a standard single-flight design housed within the cylindrical barrel. The total assembly length appears to be approximately 600-800mm based on the relative proportions shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -0,0 +1,14 @@
Here's a markdown table identifying the visible components of the plastic extruder control panel:
| ID | Name | Description | Specs | Count |
|---|---|---|---|---|
| 1 | Large Access Panel | Left side panel cover | Approx. 6"x6" | 1 |
| 2 | Small Access Panel | Middle panel cover | Approx. 4"x4" | 1 |
| 3 | Digital Displays | LCD/LED temperature displays | Likely 3-4 digit LED | 3 |
| 4 | Power Switches | On/Off rocker switches with indicator | Red illuminated, 120/240V rated | 2 |
| 5 | Control Knobs | Temperature/Parameter adjustment knobs | Potentiometer style | 4 |
| 6 | Mounting Points | Rack mount holes | Standard 19" rack spacing | 6 |
| 7 | Main Panel | Control panel face plate | 19" rack mount width, ~3U height | 1 |
| 8 | Mounting Screws | Panel mounting hardware | Likely M4 or similar | Multiple |
Note: This appears to be a 19" rack-mountable control panel for a plastic extruder system, with PID temperature control capability through the digital displays and adjustment knobs. The access panels likely provide entry to internal wiring and components.

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@ -0,0 +1,16 @@
| ID | Name | Description | Configuration |
|---|---|---|---|
| 1 | Electric Motor | Main drive motor with cooling fins | Vertical mount, top position |
| 2 | Hopper | Material feed container with mounting holes | Cylindrical, top-mounted |
| 3 | Gear Reducer | Speed reduction gearbox | Right-angle configuration |
| 4 | Extrusion Barrel | Main processing chamber | Horizontal orientation |
| 5 | Control Panel | Interface with switches and indicators | Front-mounted, integrated |
| 6 | Base Frame | Main support structure | Black powder-coated |
| 7 | Drive Coupling | Motor to gearbox connection | Flanged mount |
| 8 | Ventilation Port | Cooling/exhaust opening | Side-mounted circular port |
| 9 | Control Buttons | Operation controls | Front panel mounted |
| 10 | Indicator Lights | Status display | Front panel mounted |
| 11 | Access Panels | Maintenance covers | Side-mounted removable |
| 12 | End Fitting | Discharge assembly | Threaded connection |
This appears to be a small-scale extrusion system with integrated controls and drive system.

View File

@ -0,0 +1,38 @@
# Personal Preferences Configuration
## Personal Information
| Category | Value |
| --------- | ----- |
| Gender | Male |
| Location | Sentmenat, Barcelona, Spain |
| Age | 45+ |
| Occupation | Software Developer (Typescript) |
| Languages | German, prefers English |
## Contact Information
| Contact | Email |
| ------- | ----- |
| My Email | cgoflyn@gmail.com |
| Wife's Email (Anne) | barbier.anne13@gmail.com |
## Content Preferences
- Content Formatting:
- Always use Markdown
- Always add new lines after headings
- Always add links to sources
- Always include the prompt in the result
- Email Preferences:
- Always add "kind regards, Guenter" as signature
- When sending emails to Anne, always use French
- News Search Preferences:
- Always add links to videos
- Search via Google and other news outlets
- Development Preferences:
- No need to test file for existence
- Prefer modify_project_files tool over write_file when possible