Giter Club home page Giter Club logo

jarvis's People

Contributors

anaisbetts avatar blythmeister avatar filipesilva avatar mho105 avatar pardahlman avatar patriksvensson avatar punker76 avatar qmatteoq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jarvis's Issues

Discussion: score and distance

The IQueryResult has properties for Score and Distance. These are calculated and displayed for each result.

My first though is: Is this really something that interests the end user?. I'm not sure that a typical Jarvis users (or Addin developer for that matter ๐Ÿ˜‰) know of Levenshtein or understand the difference between score and distance. Furthermore, sites like Google are experts at guessing what the user means even if it is way off. I would argue that their algorithms are more accurate and that in some scenarios the distance/score will not reflect the actual relevance?

What are your thoughts on this?

Non threadsafe code in QueryProviderService

The QueryProviderService resolves a list of IQueryProvider based on the supplied command. Each provider kicks of an task that performs the query and updates the same IList<IQueryResult>. Here's a code snippet

for (var i = target.Count - 1; i >= 0; i--)
{
    var current = target[i];
    if (!result.Contains(current))
    {
        target.Remove(target[i]);
    }
}

If two threads simultaneous enters this for loop they would both get the same initial value for i, which is a problem in the following scenario:

  • One of the threads execute the entire code block and removes the element before the second thread tries to access target[i], and an index out of bounds exception will be thrown
  • The threads execute in parallel but in the remove statement they both access target[i] and one of them is going to succeed and the other one would get an index out of bounds

The reason this is not a problem today is that Jarvis only has three query providers, and none of them are overlapping.

I think it would make sense to execute the query providers in parallel, but edit the list in once all providers have returned their results.

Consider remove fallback from Query signature

Hello again ๐Ÿ‘‹ ,

I was looking through the code and stumbled upon IQueryProvider and the signature

Task<IEnumerable<IQueryResult>> Query(Query query, bool fallback);

It was not immediately clear to me what fallback was in this context so I started to dig around. It looks like it is used in the following code block

var result = (await provider.Query(query, false)).ToArray();
if (result.Length == 0)
{
    result = (await provider.Query(query, true)).ToArray();
}

So basically, the same method gets called again with fallback set to true if the provider was unable to provide any results. The provider itself knows if it didn't find any results and code provide the fallback if it is able to do so. There are scenarios where a provider does not have a reasonable fallback result (like the FileProvider). IMHO the fallback argument adds unnecessary complexity, as it is magic bool that adds little value.

My suggestion is to remove the fallback argument and let the providers supply fallback when/if applicable. This would also simplify the interface as well as the logic in the call site (as it wouldn't need to check length of result etc).

Feel free to tell my why this is a stupid idea ๐Ÿ˜†

Run as administrator option

Hi, I really like this tool. It's a great addon for Windows that made me feel much more at home as a hardcore mac user. I would like to propose a feature: Run as administrator.

Now when I run Powershell I can't start it as administrator from the tool.
It would be nice if you could use Ctrl+Shift+Enter to start an item as administrator.

Disable document and folder search?

Since document and folder indexing is taking up a lot of memory, perhaps we should disable this until we can implement something better. Perhaps by using the Windows Search API or one of the ways described in #34.

File indexing throws exception

Not showed results on search - Versions tested 0.9.0-preview0006, v0.9.0-preview0003 and 0.8.0

Windows 10 Pro 1803 (build 17134.228)

Log file:

2018-09-10 14:55:52.617 -03:00 [INF] Saved settings to 'C:/Users/srmp/AppData/Roaming/Jarvis/settings.dat'.
2018-09-10 14:55:53.215 -03:00 [INF] [ServiceOrchestrator] Starting update service...
2018-09-10 14:55:53.216 -03:00 [INF] [ServiceOrchestrator] Starting file indexing service...
2018-09-10 14:55:53.220 -03:00 [INF] [ServiceOrchestrator] Update service started.
2018-09-10 14:55:53.220 -03:00 [INF] [ServiceOrchestrator] File indexing service started.
2018-09-10 14:55:53.245 -03:00 [DBG] [FileIndexer] Running 'User document' indexer...
2018-09-10 14:55:53.245 -03:00 [DBG] [FileIndexer] Running 'Start menu' indexer...
2018-09-10 14:55:53.245 -03:00 [DBG] [FileIndexer] Running 'UWP' indexer...
2018-09-10 14:55:58.558 -03:00 [ERR] [ServiceOrchestrator] File indexing service: Um ou mais erros. (System.AggregateException)
2018-09-10 14:55:58.558 -03:00 [INF] [ServiceOrchestrator] File indexing service stopped.
2018-09-10 14:55:58.558 -03:00 [INF] [UpdateService] We were instructed to stop (1).
2018-09-10 14:55:58.558 -03:00 [INF] [ServiceOrchestrator] Update service stopped.

Add an option to change hotkey

I use ALT + Space to open CMD in visual Studio solutions explore selected directory,so it will be nice to have an option to changes that.

Everything integration

Hi thanks for releasing this tool...looks pretty slick...I have been using Keypirinha which is written in python and has excellent integration with Everything ...everything is probably the best open source file search tool out there at the moment.
Probably can borrow some ideas from the implementation :)

Improve trie memory usage

At the moment, we keep all the data in the trie data structure which makes the memory usage go through the roof when the user have a lot of documents.

There are some approaches to this problem we could take:

  • Trie + Akavache (Easiest and probably the best approach)
  • Trie + B+tree + Cache (A lot of work)
  • Lucene.net (not sure about memory usage/performance here, A good fit?)

@paulcbetts How is Akavache performace when fetching large number of items? Do you think this will be a problem?

Doubts about implementation

Information for developers

I would like to obtain information about the IDE's used for the implementation of this project. Thanks

Instant answers: Calculator, Unit-converter, etc.

I maintain a website with some instant answers: http://quickinfo.io.
Here's what it can do: http://quickinfo.io/?%3F (or just type demo there)

I've recently refactored out the engine that generates answers and decoupled it from the Html backend so it can provide answers for console, mobile etc.

Would you consider adding instant answers similar to the above? On a Mac pressing Cmd+Space supports math calculator, etc. You can type 2+3 and get 5 instantly. I thought it'd be a great idea for Jarvis. Let me know what your thoughts are and I'd be happy to help if needed.

Remove global keyboard hook and re-add hot keys

It wasn't a great idea after all to remove hot keys and add global keyboard hooks. Should be reverted since it's not 100% reliable when another application have registered a global keyboard hook for the same thing (looking at you Visual Studio).

Focus application if open, instead of launching new instance

If there's already an instance open of an application it would be preferable to have that application receive focus instead of launching a new instance. That way Jarvis could be used to quickly to switch between applications in addition to launching them.

A key combination could force a launch of a new instance. Shift+Enter would be in keeping with the Windows default of launching new instances when shift-clicking an application on the taskbar and when using Win+Shift+ to switch application on the taskbar.

Jarvis ownership and roadmap?

Top of the morning, @patriksvensson โ˜•๏ธ

I think Jarvis has potential, but I'm wondering a bit about the roadmap and overship of the product.

Many successful open source projects are typically owned by a (Github) organization that represents the project itself. Looking at Serilog as an example, it's organization contains OSS developers that been involved in the project. This is great for the project, as the workload can be shared among the members, members feels a responsibility for the project etc.

If I understand things correctly, Spectre Systems AB is your one-man consulting firm. If that's the case then it makes sense that you don't want open source contributors to join your company's organization (that is conceptually awkward), and I believe it wouldn't feel right for the contributor either. With the current setup, you are the focal point in the project, and its progress is depend on how much time you can commit to it.

Looking at myself, I would feel better putting in hours in this project if:

  • The repo was owned by an organization representing Jarvis
  • If the file headers would read Licensed to Jarvis Contributers (again similar to what Serilog does

Now, I can think of a few reasons why you still want Jarvis to be owned by your company... Anyways, looking forward hearing your thoungs!

Ability to run applications in administrative mode

Sometimes you need to run an application, with elevated privileges. Would be nice if we had that ability with Jarvis - preferably without having to resort to using the mouse. Pretty sure this is something you have on your mental road map, but putting it here part as a reminder and part so other people can ๐Ÿ‘ to help prioritize

High idle memory usage

Using Jarvis for a few days. Noticed it is constantly at 1gb+ of memory usage while idle.

Is this expected? Known issue?

Search for words, not complete string

When I'm searcing for "SQL Manag", I'd like Jarvis to find "SQL Server Managment Studio", but it comes up empty. I have to search for "SQL Server Mana" to find it.

Jarvis should find results where the words match words in the applications, not just the complete string.

Open to looking at this my self, any hints on where in the code I should start would be appreciated.

Also, I'm guessing that this behaviour should be turned off or on via some settings?

Exclude folders

I would like to have an option to exclude a set of folders from indexing.

Migrate to new csproj?

Hej ๐Ÿ˜‰

Great work with this project ๐Ÿ‘ . Quick question, as it is probably me missing some aspect of the application, but here goes: any particular reason that the projects uses full framework csprojs (the Windows Classic Desktop)? I can see how the WPF parts needs .NET Framework, but I think it makes sense for addins (and possibly other libraries) to target .NET Standard.

Introduce Properties on IQueryResult

One of the reasons I started to think about scoring in #40 was that I had a look at the stack exchange API. The search endpoint contains some interesting information for the results like: tags, is_answered and creation_date (full result here).

These are actually things that I would like to see in Jarvis' result view. They are also very StackExchange specific. So I propose that:

  • A Properties property of the IDictionary<string, string> is introduced to the IQueryProvider interface. Each key value pair is rendered for each result in the results view.
  • Scoring and Distance is replaced by the Properties (they are now just a key value pair). If desired the Google and Wiki provider could remain intact, with custom get and set methods.

Thoughts?

Possible performance issue?

If I'm reading the code right, ExecuteQuery is triggered from the ShellView whenever the search query is updated (which makes sense ๐Ÿ˜‰). The call leads down to the QueryServiceProvider that kicks of n tasks (n being the number of matching IQueryProviders). The problem is that this process will run to completion for each text change, even if there are more resent queries.

Now, consider an IQueryProvider that performs compute intense or long running queries or that there are many registered providers. This would allocate unnecessary resources. It also adds some delay to the user experience, which can be noticed today by typing wiki and then push some keys in a rapid succession.

To solve this issue I propose that:

  • All applicable async method should implement task cancellation using CancellationTokens. In particular, the methods in IQueryProvider should be updated.
  • The QueryProviderService should be responsible for canceling a query execution if a new query is received.
  • Possibly implement (or use?) debounce to decrease number of dispatched events.

Thought?

Indexing failed

Last thing in the logs was:

Could not get stream for 'C:/Windows/SystemApps/Microsoft.BioEnrollment_cw5n1h2txyewy/AppxManifest.xml'.

[ServiceOrchestrator] File indexing service: One or more errors occurred. (System.AggregateException)

Delete the logs and restarted and everything seems fine. Only thing I had done prior to that was upgade, then change the settings to add some additional folders (Dropbox in my case), but it didn't seem to have indexed those at all looking at the logs, but indexed them all fine on restart.

How to use Jarvis?

Heya, I'm sorry if this is a stupid question but... how do I actually use Jarvis?

I've downloaded the installer from releases page in github, then ran it to install Jarvis. Now my start menu shows Jarvis in the recently added. When I click on it I see a prompt saying "Jarvis is already running".

I don't know how to bring Jarvis up though. I guess there's a hotkey but it doesn't seem to be in the readme. This repository doesn't seem to have a wiki, and a cursory search in the issues doesn't seem to have anyone else asking the same.

I must be missing something... can someone tell me the hotkey please?

Wildcard Commands (or query language:ish?)

I think it would be useful if Jarvis could have support for something like:

  • wiki:se foo - search language specific wiki page. se would be for Swedish, but could be replaced by any two letter language abbreviation.
  • so:tags .net pattern-match for StackOverflow questions matching tags
  • spotify:artist david brent for searching artists

The idea being that a Jarvis query can contain "specifiers" that is not part of the query expression, but rather a dynamic part of the command that tells the provider how to query downstream.

I just want to hear some initial thoughts. Does this add unwanted complexity to Jarvis? For StackOverflow (and other future provider) it might be desired to have multiple "specifiers" like "tag .net and question contains NotFoundException". Not sure how to support this ๐Ÿคทโ€โ™‚๏ธ. It can perhaps be done in a similar way as GitHub's queries: is:open is:issue author:pardahlman

Exception when running Jarvis as administrator

I tried to start as an administrator:
UnauthorizedAccessException:
Access to the path "C:\ProgramData\Microsoft\Windows\Start Menu\Programme"
was denied.

Windows 10 Pro 1803(Build 17134.228)

Spotify provider

Wouldn't it be cool if Jarvis would have a provider that would search Spotify, and who's Execute action would trigger the Spotify application to play the matching song/album/playlist? In the simplest form, it would be something like

spotify living on a prayer

I haven't looked at Spotify API much, but there are one or two OSS projects that uses it that might be used straight of or used for inspiration.

There are som issues from the top of my mind:

  • Authentication/Authorization - I believe all calls to the API requires an access token. The access token can be provided through one of three authorization flows, I think the implicit flow is the only one applicable here as it otherwise would compromise client secret. There might be some work getting the UX right, as the provider would need to prompt the user to authorize Jarvis (at least once).
  • Not sure how to trigger the song to actually start playing. Spotify has registered the schema spotify and I think that the Spotify URI can be used. (Update: I think it should be possible to use the play endpoint which I think would work even if the user listens through a different device)

What do you think?

Add support for external addins.

It would be cool to support 3rd part addins. From quick scanning through the code it looks like it should be a simple addition - the list of assemblies with plugins is passed here - https://github.com/spectresystems/jarvis/blob/develop/src/Jarvis/Bootstrapper.cs#L40-L43 - and at the moment just is hardcoded to the existing plugins' assemblies.

An easy fix would be to additionally load assemblies from /addins (or whatever, probably configurable) directory. More interesting would be adding some kind of "store" / repository for addins but it's probably overkill at the current stage.

Is cross-platform support in mind?

See title, I'm wondering since there's not much platform dependent code. Might be useful to provide multiple frontends in the future โ“

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.