pi-repl-py 0.7.0 → 0.7.1
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/package.json +1 -1
- package/src/extension/prompt.ts +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-repl-py",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A pi extension with a single tool: execute, running a TypeScript host with a persistent Python (ipykernel) evaluator and a user-configurable toolbox of functions.",
|
|
6
6
|
"keywords": [
|
package/src/extension/prompt.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export const executeToolDescription =
|
|
2
|
-
"Execute Python in a Jupyter notebook. Your workspace is
|
|
2
|
+
"Execute Python in a Jupyter notebook. Your workspace is a notebook where every cell runs in a " +
|
|
3
3
|
"shared Python environment: variables, functions, imports, classes, and data defined in one cell " +
|
|
4
4
|
"stay available and reuseable for later cells for the life of the notebook. " +
|
|
5
|
-
"Output is truncated to 45K with an explicit marker
|
|
5
|
+
"Output is truncated to 45K with an explicit marker";
|
|
6
6
|
|
|
7
|
-
export const executePromptSnippet = "
|
|
7
|
+
export const executePromptSnippet = "Execute Python in a Jupyter notebook (read, write, run, search, and more)";
|
|
8
8
|
|
|
9
9
|
export function buildPromptGuidelines(preloaded: string[]): string[] {
|
|
10
10
|
return [
|
|
11
|
-
"Write
|
|
12
|
-
"Find, Filter, Fetch
|
|
13
|
-
"Make surgical
|
|
14
|
-
"
|
|
15
|
-
"If output begins with <repl_engine_reset>, the runtime rebuilt and the
|
|
11
|
+
"Write idiomatic Python.",
|
|
12
|
+
"Find, Filter, Fetch, Sample and Narrow down the output in Python, always print the exact (slice, snippet, Excerpt) you need. Be precise.",
|
|
13
|
+
"Make surgical changes over rewrites or whole-file dumps: read the exact lines first, anchor them, then replace, verify and read the file back before trusting it.",
|
|
14
|
+
"REUSE existing variables, functions, imports, classes, and data from prior cells/namespaces rather than recomputing or reconstructing states that already exist in the notebook.",
|
|
15
|
+
"If output begins with <repl_engine_reset>, the runtime rebuilt and the kernel was restored from a snapshot; reverify surviving states before building on them.",
|
|
16
16
|
...(preloaded.length
|
|
17
17
|
? [
|
|
18
18
|
[
|