Skip to content
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

Font: Add Ollama logo #3281

Merged
merged 5 commits into from
Mar 5, 2024
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
29 changes: 21 additions & 8 deletions lib/icons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,30 @@ Contains the [cody-icons](font) font, used by the VS Code extension to show Cody

## Character Table

| Character | Icon |
| --------- | ------------------------------ |
| `A` | ![A icon](svg-originals/A.svg) |
| `B` | ![B icon](svg-originals/B.svg) |
| `C` | ![C icon](svg-originals/C.svg) |
| `D` | ![D icon](svg-originals/D.svg) |
| `E` | ![E icon](svg-originals/E.svg) |
| `H` | ![H icon](svg-originals/H.svg) |
| Character | Icon | Font Character |
| --------- | ------------------------------ | -------------- |
| `A` | ![A icon](svg-originals/A.svg) | 0041 |
| `B` | ![B icon](svg-originals/B.svg) | 0042 |
| `C` | ![C icon](svg-originals/C.svg) | 0043 |
| `D` | ![D icon](svg-originals/D.svg) | 0044 |
| `E` | ![E icon](svg-originals/E.svg) | 0045 |
| `F` | ![F icon](svg-originals/F.svg) | 0046 |
| `H` | ![H icon](svg-originals/H.svg) | 0048 |

## Regenerating

1. Regenerate the font file from the SVGs:

```sh
pnpm run font
```

## Use the regenerated font file with new changes in VS Code

1. Replace the `vscode/resources/cody-icons.ttf` with the newly generated `cody-icons.ttf` file

```sh
cp font/cody-icons.ttf ../../vscode/resources/cody-icons.ttf
```

2. Register the icons in `vscode/package.json` in the `icons` field.
Binary file modified lib/icons/font/cody-icons.ttf
Binary file not shown.
Binary file modified lib/icons/font/cody-icons.woff
Binary file not shown.
Binary file modified lib/icons/font/cody-icons.woff2
Binary file not shown.
7 changes: 7 additions & 0 deletions lib/icons/svg-originals/F.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions lib/icons/svg-outlined/F.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This is a log of all notable changes to Cody for VS Code. [Unreleased] changes a
- Custom Commands: You can now assign keybindings to individual custom commands. Simply search for `cody.command.custom.{CUSTOM_COMMAND_NAME}` (e.g. `cody.command.custom.commit`) in the Keyboard Shortcuts editor to add keybinding. [pull/3242](https://github.com/sourcegraph/cody/pull/3242)
- Chat/Search: Local indexes are rebuilt automatically on a daily cadence when they are stale. Staleness is determined by checking whether files have changed across Git commits and in the set of working file updates not yet committed. [pull/3261](https://github.com/sourcegraph/cody/pull/3261)
- Debug: Added `Export Logs` functionality to `Settings & Support` sidebar for exporting output logs when `cody.debug.enabled` is enabled. Also available in the Command Palette under `Cody: Export Logs`. [pull/3256](https://github.com/sourcegraph/cody/pull/3256)
- Font: Adds Ollama logo. [pull/3281](https://github.com/sourcegraph/cody/pull/3281)

### Fixed

Expand Down
7 changes: 7 additions & 0 deletions vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,13 @@
"fontCharacter": "\\0045"
}
},
"ollama-logo": {
"description": "Ollama logo",
"default": {
"fontPath": "resources/cody-icons.woff",
"fontCharacter": "\\0046"
}
},
"new-comment-icon": {
"description": "Cody logo heavy",
"default": {
Expand Down
Binary file modified vscode/resources/cody-icons.woff
Binary file not shown.
2 changes: 2 additions & 0 deletions vscode/src/edit/input/get-items/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const getModelProviderIcon = (provider: string): string => {
return '$(openai-logo)'
abeatrix marked this conversation as resolved.
Show resolved Hide resolved
case 'Mistral':
return '$(mistral-logo)'
case 'Ollama':
return '$(ollama-logo)'
default:
return ''
}
Expand Down
Loading