Skip to content

Run Prettier #6086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .github/workflows/submit-github-dependency-graph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Submit Gradle Dependency Graph For Dependabot

on:
push:
branches: ['main']
branches: ["main"]

permissions:
contents: write
Expand All @@ -11,15 +11,15 @@ jobs:
dependency-submission:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v4
with:
# The gradle project is not in the root of the repository.
build-root-directory: extensions/intellij
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v4
with:
# The gradle project is not in the root of the repository.
build-root-directory: extensions/intellij
19 changes: 11 additions & 8 deletions core/data/log.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ const TEST_EVENT: DevDataLogEvent = {
};

const TEST_AGENT_INTERACTION_EVENT: DevDataLogEvent = {
name: 'chatInteraction',
name: "chatInteraction",
data: {
prompt: "Hello, world!",
completion: "Hello, world!",
modelProvider: "openai",
modelTitle: "gpt-4",
sessionId: "1234",
tools: ['test-tool1']
tools: ["test-tool1"],
},
}
};

const SCHEMA = "0.2.0";

describe("DataLogger", () => {
Expand Down Expand Up @@ -171,22 +171,25 @@ describe("DataLogger", () => {
expect(fileContent).toContain('"eventName":"tokensGenerated"');
});

it('should write agent interaction data to local file', async () => {
it("should write agent interaction data to local file", async () => {
// Call the method to log data locally
await dataLogger.logLocalData(TEST_AGENT_INTERACTION_EVENT);

// Verify the file was created
const filepath = getDevDataFilePath(TEST_AGENT_INTERACTION_EVENT.name, SCHEMA);
const filepath = getDevDataFilePath(
TEST_AGENT_INTERACTION_EVENT.name,
SCHEMA,
);
expect(fs.existsSync(filepath)).toBe(true);

// Read file contents and verify
const fileContent = fs.readFileSync(filepath, "utf8");
console.log('debug1 filecontent', fileContent)
console.log("debug1 filecontent", fileContent);
expect(fileContent).toContain('"eventName":"chatInteraction"');
expect(fileContent).toContain('"prompt":"Hello, world!"');
expect(fileContent).toContain('"completion":"Hello, world!"');
expect(fileContent).toContain('"tools":["test-tool1"]');
})
});
});

describe("logDevData", () => {
Expand Down
Loading
Loading