Skip to content

Commit de2a8ca

Browse files
[NA] [NA] New Cursor Opik extension (#3277)
* Cursor extension * WIP * Cursor extension * Cursor extension * Simplified opik methods * Added support for default workspace in Typescript SDK * Optimised images with calibre/image-actions * Fix Typescript tests --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 320eb51 commit de2a8ca

39 files changed

+8192
-51
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Publish Cursor Extension
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
packages: write
14+
defaults:
15+
run:
16+
working-directory: extensions/cursor
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v2
21+
22+
- name: Set up Node.js
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: '22'
26+
27+
- name: Install dependencies
28+
run: npm install
29+
30+
- name: Compile TypeScript
31+
run: npm run compile
32+
33+
- name: Package Extension
34+
run: npm run build
35+
36+
- name: Get Extension Filename
37+
id: get_filename
38+
run: echo "filename=$(ls *.vsix)" >> $GITHUB_OUTPUT
39+
40+
- name: Publish Extension to Open VSX
41+
env:
42+
OVSX_PAT: ${{ secrets.OVSX_PAT }}
43+
run: |
44+
npx ovsx publish ./${{ steps.get_filename.outputs.filename }} -p ${{ secrets.OVSX_PAT }}

README.md

Lines changed: 46 additions & 45 deletions
Large diffs are not rendered by default.

apps/opik-documentation/documentation/fern/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ navigation:
181181
- page: Cohere
182182
path: docs/tracing/integrations/cohere.mdx
183183
slug: cohere
184+
- page: Cursor
185+
path: docs/tracing/integrations/cursor.mdx
186+
slug: cursor
184187
- page: Crewai
185188
path: docs/tracing/integrations/crewai.mdx
186189
slug: crewai
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
The Cursor extension for Opik allows you to log all your Cursor conversations to Opik. Once they are available in Opik,
2+
you can easily review them and share them with your team.
3+
4+
<Tip>
5+
You can link your Cursor conversations to PR's by just adding an Opik link, can be very useful when reviewing code
6+
changes !
7+
</Tip>
8+
9+
<Frame>
10+
<img src="/img/tracing/cursor_opik_thread.png" />
11+
</Frame>
12+
13+
## Installation
14+
15+
<Button intent="primary" href="cursor:extension/jverre.opik">
16+
Install Cursor extension
17+
</Button>
18+
19+
You can also install the Cursor extension manually by navigating to the `Extensions` tab at the top of the file sidebar and search for `Opik`.
20+
From there, simply click on the `Install` button.
21+
22+
### Configuring the extension
23+
24+
In order to use the extension, you will need to configure your Opik API key. There are a few ways to do this:
25+
26+
<Tabs>
27+
<Tab title="Extension settings">
28+
The most straightforward way to configure the extension is to use the extension settings.
29+
30+
When you install the extension, you will see the following modal in the bottom left of your screen:
31+
<img src="/img/tracing/cursor_opik_extension_settings.png" />
32+
33+
In this modal, click on `Open Settings` and paste your Opik API key in the `Opik: Opik API Key` field.
34+
You can find your API key in the [Opik dashboard](https://www.comet.com/api/my/settings).
35+
36+
</Tab>
37+
<Tab title="Configuration file">
38+
You can also use a configuration file in your home directory (`~/.opik.config`). While you can create the file manually (reference documentation can be
39+
found [here](/tracing/sdk_configuration)), assuming you have the Opik Python SDK installed we recommend using the `opik configure` command to create
40+
the file for you.
41+
</Tab>
42+
43+
</Tabs>
44+
45+
Once the extension is installed, all your new Cursor conversations will be logged to Opik.
46+
47+
## Viewing your conversations
48+
49+
Once the extension is installed and configured, all your conversations will be available in the `cursor` project in Opik. To
50+
view the full conversation, you can navigate to the `threads` tab and click on any of the chats.
51+
52+
You can also review individual LLM responses by clicking on a trace in the `traces` tab. In the traces sidebar view, you can
53+
see the full cursor event data in the metadata section.

apps/opik-documentation/documentation/fern/docs/tracing/integrations/overview.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Opik helps you easily log, visualize, and evaluate everything from raw LLM calls
1414
| BytePlus | Log traces for BytePlus calls | [Documentation](/docs/opik/tracing/integrations/byteplus) | (_Coming Soon_) |
1515
| Cloudflare Workers AI | Log traces for Cloudflare Workers AI calls | [Documentation](/docs/opik/tracing/integrations/cloudflare-workers-ai) | (_Coming Soon_) |
1616
| Cohere | Log traces for Cohere calls | [Documentation](/docs/opik/tracing/integrations/cohere) | (_Coming Soon_) |
17+
| Cursor | Log traces for Cursor conversations | [Documentation](/docs/opik/tracing/integrations/cursor) | (_Native UI integration, see documentation_) |
1718
| CrewAI | Log traces for CrewAI agent calls | [Documentation](/docs/opik/tracing/integrations/crewai) | [![Open Quickstart In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/comet-ml/opik/blob/main/apps/opik-documentation/documentation/docs/cookbook/crewai.ipynb) |
1819
| DeepSeek | Log traces for DeepSeek calls | [Documentation](/docs/opik/tracing/integrations/deepseek) | (_Coming Soon_) |
1920
| Dify | Log traces for Dify calls | [Documentation](/docs/opik/tracing/integrations/dify) | (_Coming Soon_) |

apps/opik-documentation/documentation/fern/docs/tracing/log_traces.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ Opik provides different ways to log your LLM calls and traces to the platform:
1919
3. **Using the Python SDK:** This allows for the most flexibility and customizability and is recommended if you want to have full control over the logging process.
2020
4. **Using the Opik REST API:** If you are not using Python, you can use the REST API to log traces to the platform. The REST API is currently in beta and subject to change.
2121

22+
## Logging chat conversations
23+
24+
In addition to logging LLM calls to the platform, you can also log chat conversations. You can learn more about this in the [Logging conversations](/tracing/log_chat_conversations) guide,
25+
the short of it is that you can use the `thread_id` parameter when using either the low level SDK, the `@track` decorator or our integrations to indicate
26+
that the traces belong to the same conversation.
27+
28+
<Frame>
29+
<img src="/img/tracing/chat_conversations.png" />
30+
</Frame>
31+
2232
## Logging with the Python SDK
2333

2434
In order to use the Opik Python SDK, you will need to install it and configure it:
-157 KB
Loading
-211 KB
Loading
-57.3 KB
Loading
-95.4 KB
Loading

0 commit comments

Comments
 (0)