projectify-cli 2.0.2 → 2.0.3
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/ai/index.js +11 -12
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/ai/index.js
CHANGED
|
@@ -4,9 +4,8 @@ exports.CodeIntelligence = void 0;
|
|
|
4
4
|
const openai_1 = require("@langchain/openai");
|
|
5
5
|
const google_genai_1 = require("@langchain/google-genai");
|
|
6
6
|
const ollama_1 = require("@langchain/ollama");
|
|
7
|
-
const prebuilt_1 = require("@langchain/langgraph/prebuilt");
|
|
8
|
-
const langgraph_1 = require("@langchain/langgraph");
|
|
9
7
|
const messages_1 = require("@langchain/core/messages");
|
|
8
|
+
const langgraph_1 = require("@langchain/langgraph");
|
|
10
9
|
class CodeIntelligence {
|
|
11
10
|
constructor(provider, apiKey, modelName) {
|
|
12
11
|
let model;
|
|
@@ -39,19 +38,19 @@ class CodeIntelligence {
|
|
|
39
38
|
else {
|
|
40
39
|
throw new Error(`Unsupported provider: ${provider}`);
|
|
41
40
|
}
|
|
42
|
-
//
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
// Define the Graph
|
|
42
|
+
const graph = new langgraph_1.StateGraph(langgraph_1.MessagesAnnotation)
|
|
43
|
+
.addNode("agent", async (state) => {
|
|
44
|
+
const response = await model.invoke(state.messages);
|
|
45
|
+
return { messages: [response] };
|
|
46
|
+
})
|
|
47
|
+
.addEdge("__start__", "agent")
|
|
48
|
+
.addEdge("agent", "__end__");
|
|
49
|
+
this.app = graph.compile();
|
|
51
50
|
this.config = { configurable: { thread_id: "project-analysis-session" } };
|
|
52
51
|
}
|
|
53
52
|
async askAgent(systemPrompt, userContent) {
|
|
54
|
-
const result = await this.
|
|
53
|
+
const result = await this.app.invoke({
|
|
55
54
|
messages: [
|
|
56
55
|
new messages_1.SystemMessage(systemPrompt),
|
|
57
56
|
new messages_1.HumanMessage(userContent)
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ const program = new commander_1.Command();
|
|
|
18
18
|
program
|
|
19
19
|
.name('projectify')
|
|
20
20
|
.description('Projectify - Autonomous Code Analysis & Visualization')
|
|
21
|
-
.version('2.0.
|
|
21
|
+
.version('2.0.3');
|
|
22
22
|
program
|
|
23
23
|
.argument('[path]', 'Project path to analyze', '.')
|
|
24
24
|
.option('--no-ai', 'Skip AI analysis')
|